Universal Android APK

Are there any plans on introducing the Universal .apk or what Google call the Multiple APK? That way the resulting binary would be usable on a multitude of devices and will adapt accordingly (if the code supports it). More so like the Humble Indie Android Bundle.

The wish list is generally left open at Ansca for years, I even doubt a response from any official developers at Ansca, but it would be nice to know. [import]uid: 3826 topic_id: 21936 reply_id: 321936[/import]

JayantV,

I think you have misunderstood what the Multiple APK feature is. It is a feature of the Android Market and not of the APK package format. In the Apple sense of “Universal APK” all Android APKs are universal and have been since Android 1.0. What Google means by the ‘Multiple APK’ feature of the Android Market is that you as the developer can create multiple custom APKs for particular device configurations and upload them all to a single Marketplace product entry. Then when a user downloads your app from the Marketplace, the best match for their particular device is the APK that will be downloaded. You can read more about it here: http://developer.android.com/guide/market/publishing/multiple-apks.html

You can do this in Corona by creating different versions of your app; creating separate APKs for each version and uploading each to the same product entry. IOW, you might create a version for 800x600 screens (7 in tablets), one for 800x480 screens, etc.

That, though, would be a lot of work and very difficult to cover all possible configurations. With Corona, you have at least two other options.

The easiest would be to take advantage of the dynamic scaling feature built into Corona. (See this page: http://blog.anscamobile.com/2010/11/content-scaling-made-easy/). In this option you build for a certain screen dimension and Corona will handle the scaling for you. The downside to this option is that your app is either scaled disproportionately or ‘letter boxed’. But for most apps that is a very minor side effect to having your app support any potential screen size.

The third option is a bit more work than the built-in scale but not near as much as the multiple APK option. For this you would read the screen sizes at run-time and make dynamic adjustments to make your app best fit in whatever screen size it finds itself. I do this in my current apps using a virtual coordinate system to help handle the work. (I’m working on a blog post about my system but it is still some weeks away from being completed.)

Hope this helps!!

Stephen
Kigra Software (http://www.kigrasoft.com)
Corona Ambassador [import]uid: 4639 topic_id: 21936 reply_id: 87216[/import]