Tag Archives: android

Create an Android Jar library for distribution

Questions: I know of Android Library projects, which allow you to create a shared-source project that can be pulled into Android Applications as needed. However, that requires that source be available. I’m looking for a way to build and distribute a closed-source library that can be used in other Android projects like a traditional JAR.… Read More »

Universal way to write to external SD card on Android

Questions: In my application, I need to store lots of images in the device storage. Such files tend to fulfill the device storage, and I want to allow users to be able to choose external SD card as the destination folder. I read everywhere that Android doesn’t allow users to write to external SD card,… Read More »

How to use WeakReference in Java and Android development?

Questions: I have been a java developer for 2 years. But I have never wrote a WeakReference in my code. How to use WeakReference to make my application more efficient especially the Android application? Answers: Using a WeakReference in Android isn’t any different than using one in plain old Java. Here is a great guide… Read More »

Using Retrofit in Android

Questions: I have an android app that has 3 activities : A login activity A tasks acivity where all tasks pertaining to a user are displayed (Populated using an Array Adapter) A task_details activity which results from clicking a task on the list I have to consume REST Apis. The research I have done so… Read More »

Driver JDBC PostgreSQL with Android [duplicate]

Questions: This question already has an answer here: java.lang.ClassNotFoundException: org.postgresql.Driver, Android 5 answers Answers: While not the strict answer to your question, I do have a suggestion. Don’t try to use JDBC on the Android device directly. You’ll save a lot of hassle that way. I wrote about that in more detail on the “JDBC… Read More »

Android : java.lang.OutOfMemoryError:

Questions: I developed an application that uses lots of images on Android. There are lots of images present in drawable folder say more then 100, I am developing application for animation of images. I used imageview to show GIF images. I have used the concept of Split gif images into multiple PNG format images and… Read More »

Firebase with java (non-android) retrieve information

Questions: I have been trying to get my data for firebase database using java code(non-android). I used same method how I retrieved in android app. But its not getting data. Firebase firebase = new Firebase(“https://——.firebaseIO.com”); firebase.addValueEventListener(new ValueEventListener(){ @Override public void onDataChange(DataSnapshot ds) { long i = ds.child(“Users”).getChildrenCount(); userlist = new String[(int)i]; int j = 0;… Read More »

How can I parse this JSON in Android?

Questions: I want to pull out the user block. The JSON result will always change, sometimes 4 users will be returned, sometimes 10 etc. { “results”: [ { “user”: { “avatar_url_thumb”: “http://avatars.stocktwits.com/production/9998/thumb-1270014645.png?1270014645”, “avatar_url_medium”: “http://avatars.stocktwits.com/production/9998/medium-1270014645.png?1270014645”, “created_at”: “2010-03-15T05:44:51Z”, “following_count”: 14, “updated_at”: “2010-08-30T18:22:15Z”, “id”: 9998, “updates_count”: 31, “avatar_url_large”: “http://avatars.stocktwits.com/production/9998/large-1270014645.png?1270014645”, “investor_relations”: false, “last_name”: “Reporter”, “followers_count”: 25, “recommended”: false, “bio”:… Read More »

SRC folder in Eclipse is empty (MainActivity class not created) after creating a new android project using Eclipse

Questions: SRC folder in Eclipse is empty (MainActivity class not created) after creating a new android project using Eclipse- I created a new android project using Eclipse. But I am seeing SRC folder is empty in the project explorer. But as per my understanding it should create few .java files automatically like MainActivity.java. Answers: I… Read More »