Android begining: Some problems those I faced when I started to develop android !!!

I have been developing android application since last 8 months. During that time I faced a lot of weird problems which wasted a lot of time and created a lot mental pressure on me. No I always try to keep in mind on those things before coding for android application. Let’s discuss some of those things…..

1. First of all I faced problem when I tried to work with functionality which takes a lot of time to finish execution( i.e  parsing a web url response content). It caused ANR (application not responding). Android recommendation was to use asynchronus task for heavy process ( . It is really simple to understand. But as beginner I wasted time to figure out it.

2. Second problem was to update the UI from background function/thread. There is a nice technique for this, use runOnUiThread() method for updating the UI instead from background thread.

3. Most time wasting issue was working with networking on android device specially with WIFI. If you use wifi for net connection or communicate through wifi wireless device/router don’t forget to wait until there is valid DHCP is assigned to your android phone/device. I was tried to do stuff as soon as wifi is enabled checking the network is available. Though there is a method for checking network availablity that made me a real fool for a long period of time. It shows that network is available but still the valid DHCP is not assigned.

4. The most dangerous issue I faced was “Virtual machine memory budget issue”. I worked on multiple IP camera streaming. First stage of development memory budget issue was occurring frequently and the app was crashing unexpectedly. There were so many threads and about 4 input streaming is closed at the same time and I found that if the heap memory size exceeds more than 10 MB (Android 1.6) then memory issue occurs. So when working with stream and graphics care should be taken that the app doesn’t hold up much heap memory.


One Response to “Android begining: Some problems those I faced when I started to develop android !!!”

  1. Arpit jain Says:

    Dear Amitku
    please help me on my android project. i m developing an android app which is a form now i m stuck with the database issue. I want that when i run my app on emulator it will save data entered by user on a local server database. So please can u guide me how can i create database and connect it with local server?? i was trying it by Sqlite but it will store data internally on the device but i want that data to be saved on server. Please help me. Give me some suggestions….so that i can complete my project.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: