Because of its numerous UI features, I needed to limit my OrbitLab app to tablet-sized devices, which is easy to do in iOS since there's only the iPhone and iPad, but for Android it's a bit more difficult. When you upload your beta apk, there are nearly 4,000 devices available, and more to be available in the future, so it would be a pretty big job to try to go through and check off all the excluded devices.
After uploading to Google Play, I also noticed that my apk listed three supported languages: es, he, and iw. In fact I had taken the trouble of localizing my app in 29 extra languages using Smooth Localize, so I wanted this to be reflected in my apk, in case any Android stores were looking at that to decide on how to display it in other locales.
Once you have that up and running, you only need to do something like the following:
apktool d -f OrbitLab.apk Orbitlab1.0b10
Where "d" means decompile and "-f" means overwrite an existing decompiled folder.
Restricting to tablets
Inside your folder you can now see a file called AndroidManifest.xml. To restrict to tablets, open that with a text editor and add the lines:
<supports-screens android:smallScreens="false" android:normalScreens="false" android:largeScreens="true" android:xlargeScreens="true" />
Add these prior to the line:
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="OrbitLab">
While you're in there, you need to change the package in the first line from:
to something like:
Otherwise Google Play will give you an error after uploading your apk.
Making languages known
If you go into your decompiled apk folder, you'll find a res folder. Inside of that there will be a values folder with some default strings in a strings.xml file. You'll also see values-es, values-he, and values-iw, which contain their own strings.xml with their own translations. It's these folders and files Google Play looks at to determine how many languages your app is translated into.
Bear in mind, I don't even know if this matters, so I might be doing unnecessary effort. But I also found that including the folder alone did nothing, because the compiler removes it if it's empty. So you have to have that strings.xml file in there. I edited it down to one line, since they're all just Facebook strings of no importance to my app.
Then I copied the folders and renamed like so:
values-ar values-cs values-da values-de etc.
Now recompile using apktool like this:
apktool b OrbitLab1.0b10 OrbitLab_temp.apk
Next you have to sign the apk using jarsigner. If you upload without signing, Google Play will give you an error. I'll assume you've already set up all the keystore and stuff like that. Assuming you have, then all you have to do is this, where <keystore path> of course is your own path to your keystore:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore C:\<keystore path>\orbitlab.keystore Orbitlab_temp.apk aliasname
Finally you have to zipalign the signed apk. If you upload without zipaligning, Google Play will give you an error. This is pretty easy, just:
zipalign -fv 4 OrbitLab_temp.apk OrbitLab.apk
An added benefit of all this is that my apk went from 22 megs to 14.
Now my apk shows that it's been localized in default + 29 languages, and the number of supported devices is reduced to under 1000.