How exactly do I limit to a certain OS version?

Monkey Targets Forums/Android/How exactly do I limit to a certain OS version?

Grey Alien(Posted 2014) [#1]
I'm massively confused and could so with some help please. Thanks!

I've heard that I need to edit the AndroidManifest.xml to change this line:
	<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" />

Those are the values I want to limit it OS 4.03.

However, is that only for the Google Play Store because I know that I can distribute the apk not on the store and I'm guess if there's now manifest with it then it would just try to run on anything? Or does the manifest get embedded in the apk somehow?

Also I know that there are several versions of the manifest floating around:
- There's the one in the same folder as the MonkeyGame-debug.apk (Why is it called debug even though I told the compile to use Release mode? It's definitely in release mode as my debug features are turned off).
- There's another one folder level up, but when I edited that it just got overwritten next time I made a build
- And there's another one in Monkey\targets\android\template\templates. I edited the template one but the changes didn't seem to carry through to the one in bin when I compiled, which is weird, but I don't understand how the target/templates system works properly yet.
- [EDIT] OK I found a 4th one in the build/android/templates folder and that one seemed to do the trick.

There's also a project.properities file with this line in it:
# Project target.
target=android-13

So I wonder if I'm supposed to change that to 15 as well except that it says "Do not modify this file -- YOUR CHANGES WILL BE ERASED!" at the top.

So am I supposed to be setting the target SDK in some other file related to Monkey or in the Android SDK tools somewhere?

Thanks for any advice to a much-confused Android noob!


tiresius(Posted 2014) [#2]
This post has some info that might be helpful as to what the different sdk versions are
http://www.monkey-x.com/Community/posts.php?topic=8591


therevills(Posted 2014) [#3]
Or does the manifest get embedded in the apk somehow?

When you build an Android APK, the manifest is part of the build and it is vital piece of the APK.

Just apply your changes the the manifest file and you should be fine.