Creating an Android app

Ok, so far and till this point, you could have tested everything as an HTML5 application. For the development process, this works, but with mobile devices you should also start testing on a device very early. They have much less computing power than a desktop PC. And if you run into a performance problem, well you can only detect this on the device.

Anyway, when you build and transfer your app onto a device, it will always have the name Monkey Game, by default, and a default icon. For sure, you want to change that.

Changing icons

Google has a pretty good description of how icons have to be designed for certain usage. At the time of writing this book, the information is available at: http://developer.android.com/guide/practices/ui_guidelines/icon_design.html.

There, under Providing Density-Specific Icon Sets, is described which sizes they should have. Basically, you need three icons, 36 x 36, 48 x 48, and 72 x 72 pixels, in dimension. So, create these three icons as regular PNG files. Next, you have to build your Android project. Inside the Build/Android folder, you will find another res folder. There you find three drawable-... folders. In that folder you copy your icons depending on if it is for the lower (ldpi), medium (mdpi), or high (hdpi) resolution. The next time you build and transfer your project to the device, you will find that it now has the icons that you have copied into the folder structure.

Do a name change

To change the name of the app, locate the file yourProjectFolder/Build/android/CONFIG.TXT.

There, you have two fields that have to be set—APP_LABEL for the name and APP_PACKAGE to make it unique. Change both according to the description. The next time you build and transfer your project to the device, the app will have a new name.

Signing an application for the market

We will talk about signing an application correctly for the Android market, in Chapter 10. However, this link will give you a little information on how to do it —http://www.monkeycoder.co.nz/Community/post.php?topic=1014&post=8800.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.163.250