Android developers are being asked to build proper app for the Android platform. You surely might have heard about the battery backup issues on Android devices. This is the reason, several sessions were made at Google I/O 2010 to let the developers know how to make better apps by avoiding these:
protected void doInBackground(Void… arg0) {
//Do your time consuming process..
publishProgress();
return null;
}
protected void onProgressUpdate(Void… arg0){
}
protected void onPostExecute(Void result){
}
PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Wakelock");
PARTIAL_WAKE_LOCK
SCREEN_DIM_WAKE_LOCK
SCREEN_BRIGHT_WAKE_LOCK
FULL_WAKE_LOCK
- Release as soon as you can
- Specify a timeout
- Don’t use them in Activities, instead use them in Window
wl.acquire(10000);
//Screen and power stays on
wl.release();
“Doing what the user aspects with respect to navigation flow is absurdly important for overall user satisfaction.”
- -User experience should be your top priority
- -Respect user expectations for navigating your app
- -The back button should always navigate back through previously seen screens
- -Always support trackball navigation
- -Understand your navigation when try point is o notification or widget
- -Navigating between application elements should be easy and intuitive
- -Don’t hijack the native experience
- -Don’t hide the status bar
- -Back button should always navigate through previous screens
- -Use native icons consistently
- -Don’t override the menu button
- -Put menu options behind the menu button
- -Respect user preferences
- -Use only enabled location-based services
- -Ask permission before transmitting location data
- -Only transfer data in the background if user enables
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
boolean backgroundEnabled = cm.getBackgroundDataSetting();
- -Don’t fight with System, mean don’t use unofficial documented APIs
- -Undocumented APIs will gonna be breached by Google in next update. Think about it before using it.
- -Make your app behave consistently with the system
- -Respect the application lifecycle model: on pour on start. saving data saving cache

There are just so many architectures that Android OS supports, that easily can’t be guessed. Android OS supports almost all the major hardware architecture. If you taget at any one type of device you might miss the 2/3 of market. Try centralizing resources, like images and strings, etc. that will help you maintain the resources for all different devices available ion market. It also helps in Internationalizing your application.
One Response to “Five deadly sins that Android Developers should avoid”
Leave a Reply
You must be logged in to post a comment.




May 5th, 2013 at 2:17 am
HTTP://Www.Gearheadmom.Com/Member/15283/…
Android Developers | Android Apps Developers | Android Application Development…