Game Development Reference
In-Depth Information
Set the minSdkVersion and targetSdkVersion attributes of the <uses-sdk>
element (e.g., minSdkVersion is set to 3 and targetSdkVersion is set to 16).
7.
Create a folder called drawable/ in the res/ folder and copy the res/
drawable-mdpi/ic_launcher.png file to this new folder. This is the
location Android 1.5 will search for the launcher icon. If you don't want to
support Android 1.5, you can skip this step.
8.
There you have it. Eight easy steps that will generate a fully defined application that will
be installed to the SD card (on Android 2.2 and over), will have a fixed orientation, will not
explode on a configuration change, will allow you to access the SD card and wake locks,
and will work on all Android versions starting from 1.5 up to the latest version. Here's the final
AndroidManifest.xml content after executing the preceding steps:
<?xml version= "1.0" encoding= "utf-8" ?>
<manifest xmlns:android= " http://schemas.android.com/apk/res/android "
package= "com.badlogic.awesomegame"
android:versionCode= "1"
android:versionName= "1.0"
android:installLocation= "preferExternal" >
<application android:icon= "@drawable/icon"
android:label= "Awesomnium"
android:debuggable= "true" >
<activity android:name= ".GameActivity"
android:label= "Awesomnium"
android:screenOrientation= "landscape"
android:configChanges= "keyboard|keyboardHidden|orientation" >
<intent-filter>
<action android:name= "android.intent.action.MAIN" />
<category android:name= "android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name= "android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name= "android.permission.WAKE_LOCK" />
<uses-sdk android:minSdkVersion= "3" android:targetSdkVersion= "16" />
</manifest>
As you can see, we got rid of the @string/app_name in the label attributes of the <application>
and <activity> elements. This is not really necessary, but having the application definition in
one place is preferred. From now on, it's all about the code! Or is it?
Google Play Filters
There are so many different Android devices, with so many different capabilities, that it's necessary
for the hardware manufacturers to allow only compatible applications to be downloaded and run
on their device; otherwise, the user would have the bad experience of trying to run an application
that's just not compatible with the device. To deal with this, Google Play filters out incompatible
applications from the list of available applications for a specific device. For example, if you have
a device without a camera, and you search for a game that requires a camera, it simply won't
show up. For better or worse, it will appear to you, the user, as if the app just doesn't exist.
 
Search WWH ::




Custom Search