Packaging multiple items in an Android APK - android

If I create an application for Android, how do you package extra items in with it like a live wallpaper or widgets? For example, google maps does this by including a live wallpaper with the download of the latest version.
On a related note, with google maps, it's available for, I believe, 1.6 and up, but it seems that it is all the same download. So how do you ensure that, even though there may be a 2.x only feature included, it still shows up for lower OS phones? Or is the marketplace maybe actually holding onto two separate APKs for each OS?

I don't know anything about live wallpapers, but widgets aren't really a separate item from the app; if you read the development guide about widgets, you'll see that they're actually just another component of an application.
I'm not sure what you're getting at for the second question. Are you asking how Google Maps is deployed for multiple platforms? If so, maybe you should check the answer I posted to your last question (which is more focused on multiple platform deployment). The specifics I don't know; I'm not sure if they're two separate APKs or if Google just used their backwards compatibility.

Related

Manage multiple .apks on Google Play

We create apps and distribute the on Google Play and have gone years being able to create one .apk and distribute to all devices.
Recently we found one device (Samsung Galaxy Core Prime SM-G360V
Android version: 5.1.1) that we will need to make a special build.
It is probably possible to find something that will work on all devices, but I just don't want to force my thousands of users to update their app just because of one phone.
I have read this:
https://support.google.com/googleplay/android-developer/answer/7353455?hl=en
and I have read this:
https://developer.android.com/google/play/publishing/multiple-apks
They don't really go over a strategy for doing what we want to do:
Leave our existing .apk in the store and keep the 5.1.1 device from downloading it.
Add a new .apk that only the 5.1.1 device will download.
One element of my concern is that the instructions talk about a list of excluded phones but they don't talk about a list of supported phones.
I would like to exclude a phone on our existing .apk; and set a supported phone on the new .apk (implying that all other devices are excluded).
This is also making changes to a production app without really being able to test so we have to have clear instructions of the side effects of anything we are changing on Google Play.
Using a whole APK variant for a single device is pretty unusual. Much more common reasons for using Multiple APKs are:
having an old version for older phones on old SDKs, and new versions for newer phones
having different versions for different native libraries
having different versions for different densities of assets
For all of these use cases developers are now encouraged to use the Android App Bundle rather than publishing multiple APKs.
To be honest, if you are only doing the change for one phone I'd encourage a single "if" statement in the code. It's a pain for users to get an update, you are right, but if the change is small, Google Play patching and compression should keep the update size pretty small.

Can't find Android App in Google play Store

i have my own app called Geoperks-rewards for you, the problem is i am not able to find my app from google play store for some handsets and even in tablet pc>Can anyone tell me what actually might be the reason behind this.I cannot specifically say for which models and OS versions, its appearing for random models.
The App compatibility depends on many factors, i.e. screen sizes, OS version, device hardware support, some features added in app, etc... All this information is provided on Android Developer website by Google. You can go through the topic Filters on Google Play and maybe revise the manifest.xml file of your app. You might get some idea why it is not compatible with several devices.

Is there a good reason we should not always use Google API SDK?

So far, I used the regular SDK in most projects, and used Google API SDK only when the project will utilize some of Google's feature.
I am now wondering is there a good reason I should NOT always use Google API SDK?
There are devices without Google services installed. In this case the Google API is not available. By not using the Google API SDK, your app can still run on these devices.
E.g. consider the Kindle Fire, it doesn’t have the Play store installed, as well as various low-budget tablets and Chinese phones. Custom builds from the open-source code such as Cyanogenmod also don’t have the Google apps installed (although many users add them manually).
Although Android itself is open-source, the Google apps require the vendor to get a license from Google. I know this because custom builds were asked by Google to not include their apps. Also having their own store instead of the Play Store is attractive for some manufacturers because then they get a share of the revenue instead of letting Google have all the profits. This is why not all devices have them.
One potential reason is this: why should you include something if you aren't using it? When you write a new class, do you import the entirety of the Android framework? No, you wouldn't, because at worst it could cause problems in your code, and even in the best case it takes up extra space in your resulting APK.
I'm not sure how much additional space would be taken up in memory/storage by building your app using the Google API SDK, but I can't imagine it's 0, and in mobile development you can't really afford not to be judicious with resource usage.

Publishing same app with different names in the Play store

I know it is technically possible to put the same application into the app store with 2 almost identical APKs (different package names and titles), although probably a bit dodgy - I imagine this would not be allowed by Google, but I don't see anything in their Ts & Cs that prohibit this
https://play.google.com/about/developer-distribution-agreement.html
E.g. "My cool app free" And "The awesomest app trial"
Question: Is this allowed?
Reason: A colleague and I were debating the effect of titles and descriptions of downloads (based on different indexes/user searches) and wondering if people ever post a game/app with 2 different ones to see which is more successful
You can if the package name of the app is different, as you said. This is done quite often for apps with trial and paid version. Regarding your question, we have right now around 6 apps in Google Play which are different branded versions of the same app. This means, they have their own package name, splash screen, and some database data, but the app is really the same. So far we didn't get any trouble with Google, so I would say it's possible.
Just for reference, in case you are interested in doing something similar, the best option in terms of maintainability of your app, consists in using an Android library project.
Basically you have one main big project with the "Android Library" option checked in Eclipse. You have all the main code there.
On the other hand, you create two additional projects linked to your library. They will just need their manifest.xml and some activity to call the main activity of the library. Their package names must be different if you want to publish both apps in Google Play.
Additionally, you can override some resources for every project. For instance, you could have a boolean in /res/values indicating whether the project is a trial or paid version, with different values for them. Then, in the library you could check this boolean to show advertisements if it's a trial version.
Another useful thing you can do is using a custom splash screen for every app, by having different image resources in every project with the same name.
As far as I know, it is allowed and certainly has been done in the past (malware masquerading as popular games). Provided the app you're publishing is your own work (and really only the name is different), then I can't see anyone reporting it either.
It is prohibited according to Play Console Developer Program Policy (effective October 21, 2020).
We don't allow apps that merely provide the same experience as other apps already on Google Play. Apps should provide value to users through the creation of unique content or services.
Here are some examples of common violations:
Copying content from other apps without adding any original content or value.
Creating multiple apps with highly similar functionality, content, and user experience. If these apps are each small in content volume, developers should consider creating a single app that aggregates all the content.

Android minSdkVersion

I've programmed my app with Eclipse and android 2.2. However I think that my app would work for previous version and so it would allow more users to use my app. The problem is that I'm not sure... for instance I'm using Gestures which I think is a more recent feature... but otherwise I'm just using some Button, ListView, and WebView.
So is there a way to detect automatically the Minimum Sdk Version needed ( by checking which function my app is using) ?
I can't download the SDK of each previous version of android and test it until it doesn't work ...
Thanks
I can't download the SDK of each previous version of android and test it until it doesn't work ..
Why cant you? This is what the rest of us do. Create various different Emulators and test it out. I've released many apps by testing this way.
Take a look at the Compatibility page on Android's developer website.
It has some great information on how to make sure your application will work on different versions of Android and how to stop users from downloading the application if they do not have the right features on their device. In your case that would be the gestures feature.
To manage this, Android defines
feature IDs. Every capability has a
corresponding feature ID defined by
the Android platform. For instance,
the feature ID for compass is
“android.hardware.sensor.compass”,
while the feature ID for Live
Wallpapers is
“android.software.live_wallpapers”.
Each of these IDs also has a
corresponding Java-language constant
on the PackageManager class that you
can use to query whether feature is
supported at runtime.
To be totally sure you have to test your app against every platform version you target. Otherwise users of your app will do it for you (and that might be not good for app rating).
On the https://developer.android.com/about/dashboards/index.html page you can see the latest up-to-date platforms share info. So just decide how many potential users you're going to leave without your app :)

Categories

Resources