You can set the target app store in Corona by adding the following metadata tag to your “AndroidManifest.xml” file…
\<manifest ...\> \<application ...\> \<meta-data android:name="targetedAppStore" android:value="amazon"/\> \</application\> \</manifest\>
The value string that you set will be taken as is. Meaning if you make up your own store name, say “abc”, then our Lua API such as system.getInfo(“targetAppStore”) will return that string.
Unfortunately, there isn’t a simple “build variable” equivalent like in C/C++. This is a common complaint in the native Android development world because this isn’t simple to set up. The next best thing you’ve got is your “build.xml” where you can set up different build targets or set up ant properties to make the build do different things. A common technique that I’ve seen in the native Android world is to set up multiple string resource files, each providing a different store name that the app will be targeting. So, when you build for a particular store via ant, your ant’s build.xml would then copy one string resource file for the app store it is targeting just before it compiles the APK. Your AndroidManifest.xml file can reference that string resource via the ‘@’ symbol, as documented by Google.
Or, you can keep it simple and just fork your application project for each app store you are targeting. Some native Android developers do this too because they may include different libraries for different stores. For example, if you are targeting the Amazon app store, then you may want to include their Amazon SDK if you want to leverage its features… but it wouldn’t make to include those libraries when targeting any other app store. So, forking your app in this case actually keeps things much simpler.