Now I’m using Android Studio to develop Android Application. Eclipse not good enough for me to develop android application, sorry to say especially for eclipse’s fans (Because Eclipse ever delete all my folders inside the workspace folder for no reason – not only once). And also Eclipse 3.6 (Helios) is no longer supported with the latest version of ADT (Check Here). With Android Studio, you can easily import library with Gradle with simple way.
So I will share you about Android Studio have many shortcut / tips to help you develop Android Application. Here tips of the day From Philippe Breault (Thanks to him) and here the Wiki that collects all current tips from him (on Pavlos Petros Tournaris’s Github -Thanks to Pavlos-Petros Tournaris) Or maybe you can visit Developerphil’s Website Part 1, Part 2, Part 3, Part 4, Part 5, Part 6 and also you can see every day Android Studio tips from Philippe Breault’s Google+).
Cheers guys and happy coding
We all know we cannot just pass object references to activities or fragments, we must put those in an Intent / Bundle. We only have two options, with Parcelable or Serializable. How about the performance / speed?
Here the results:
Serializable: 1.0004ms, Parcelable: 0.0850ms – 10.16x improvement.
Serializable: 1.8539ms – Parcelable: 0.1824ms – 11.80x improvement.
Serializable: 5.1224ms – Parcelable: 0.2938ms – 17.36x improvement.
Source By : http://www.developerphil.com/parcelable-vs-serializable/
Thanks to Philippe Breault.
And here the Source to download
One time I develop an application that requires trigger a notification every specific time. Then I create Alarm Manager for trigger Android Notification, but i got my Alarm Manager firing random time after first notification. So my notification sometimes show at random time.
// Example now date + 7 day
Date now = new date();
calendar = Calendar.getInstance();
myIntent = new Intent(mContext, MyReceiver.class);
pendingIntent = PendingIntent.getBroadcast(mContext, 0, myIntent, PendingIntent.FLAG_UPDATE_CURRENT);
alarmManager = (AlarmManager)mContext.getSystemService(Context.ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC, calendar.getTimeInMillis(), pendingIntent);
If we code inside an Activity and we need the application context we can use getApplicationContext().
Inside an Activity we can use getApplicationContext() if we need the application context. But what if we are not inside an Activity and we need that? I will explain how you can get the context of the application outside an Activity with simple coding.
MyBOLT! (Non Official) is an android application that helps users BOLT! to check the rest of quota and expiration date of quota. With MyBOLT!, users can easily monitor their quota and expiration date with widget. This application have simple design and material guidelines, and reminder alarm (notification) will alert users when before the quota expired.
Once time, I make android application and requires pull data from web servers (Json). And then i do HttpGET to load the data from web server (big enough), after that i must insert the data into database. It takes 12-15 minutes WTF.., how can i used the application if it takes so long?
Then i found Jackson Library And Use Bulk Insert after that it takes only 10 – 15 seconds. Very Amazing