• SQLite_in_Android

    SQLite in Android  SQLite in Android

    SQLite is an Open Source Database which is embedded into Android. SQLite is available on every Android device.

    SQLite require very less memory  at runtime (approx. 250 KByte)

    Enternally SQLite database creates filesystem so this may be slow, Therefore it is recommended to perform database operations inside the AsyncTask class.

    Read More
  • Service_Basics

    Service Basics  Service Basics

    ** A Service runs with the main application thread , so some time user interaction will lock the current application . Use Service inside a separate thread, you will reduce the risk of Application Not Responding (ANR) errors . So  application's main thread can remain dedicated to user interaction with your activities.

    ** If you are starting service inside any activity then it will block activity so when created service done then only your activity will unlock. in this mean time if user will interacting to activity then Application Not Responding (ANR) errors will come.

    ** If you want user interaction on when activity is visible and also some server or time taking tasks(performs intensive or blocking operations) then you might create a thread in onCreate(), start running it in onStart(), then stop it in onStop(). Also consider using AsyncTask or HandlerThread, instead of the traditional Thread class

    Read More