Sunday, October 5, 2014

Talking to an Android developer

This week we talked to Ivan. He is an experienced Android developer with lots of Java code under his belt and a few Enterprise solutions releases.

How do you design and test your Android app across multiple devices, i.e. different screen resolutions?

I use dp units on draw-able resources for 6 screens types ( ldpi, hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi). Plus I am using the different layouts for landscape and portrait orientation. For more information please take a look at this guidelines:

http://developer.android.com/guide/practices/screens_support.html

What is your experience with deploying native Android apps on a variety of platforms with different levels of resources available? (i.e. memory, storage) Give an example of a situation you had and how you addressed it.

For example for storage :
if(Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
       return new File(context.getExternalFilesDir(null),  getCurrentDate()  +".jpg");
    } else {
        return new File(context.getFilesDir(), getCurrentDate()  +".jpg");
     }

so different methods for the external storage access in different versions.

I know you also have experience with the following frame works: Titanium and PhoneGap. What is your opinion on them vs. writing native code?

PhoneGap is displaying the app in the WebView, so the app perfomance can be relatively slow, comparing to a native app. Here is a link to PhoneGap's website:

http://phonegap.com

Titanium is better, it gives you the ability to code with JavaScript. But sometimes you may have trouble with access to device sensors can. Here is a link to Titanium's website:

http://www.appcelerator.com/titanium/

So if you want the best performance, responsiveness and broad abilities working with device sensors, I recommend writing native code.

Make it a great day!

Adrian Corbuleanu
Miami Beach, FL
http://wittywebnow.com