Friday, April 27, 2012

Kickstarting Android Development

Here are some tips for those beginning Android development, specially at Umit Google Summer of Code '12/

0. Its important that you develop your application on a real phone. The emulator works good for most of the simple tasks but you will not get a real understanding of the performance of your application. Also, its important to test against the real world WiFi and 3G network. Networking is not the best parts of the emulator. You dont want to waste time on that.

1. Use the MOTODEV studio - its a customized Eclipse specially for Android development. It has built in support for both SDK and NDK. You can get it by creating an account here.

2. If you are writing native code and have segfaults or crashes, you can get the stack traces from /data/anr/traces.txt For applications already out in the market, you could use remote-stacktrace to collect the logs from the users.

3. Build your app for Android 2.2 and up. But make sure you test it on Gingerbread and Ice Cream Sandwich as well.

4. Just for the kicks, grab the android source code, and build it on your machine.

5. Android devices are getting really powerful - think 1.5GHz dual-core ARMv7 devices as becoming everyday phones. So you can actually think of porting any popular Linux tool to Android. There are lots of tools that Android is still missing.

6. If you want to do automated testing, you can write shell/perl scripts and run it from your computer that calls various activities (intents) in your app using adb. You can pass parameters to intents and build a complete testing suite for all your activities. More information on this coming soon.

7. Build fast, Release fast. Users are the best testers.

8. Use the inbuilt tcpdump to view raw packets.

9. To profile your application use the Android traceview 

No comments:

Post a Comment