I need to temporarily change the package name of an Android app.
The reason I need to do this is because my customer does not yet have a Google Play account, but wants to test the app I've been developing for him. So I want to put it on an internal testing channel using my Play account, but I want to do so under a different package name.
When I develop iOS apps, there is a mechanism in Xcode by which any app can have multiple targets, and each target can have a separate bundle ID, and other properties, creating a unique app from the same source code. Then I can switch between targets at will to produce either version of the app.
What is the correct way to do this in Android?
The answers I've found online suggest that a wholesale refactoring of all the package names in the actual source code files is necessary -- I don't think this is the right answer in my case. I just want to toggle between two package names the same way you would toggle between build variants.
Thanks,
Frank
Use applicationIdSuffix ".demo" to extend the given name (the namespace does not really matter, the package name only has to be unique). One probably cannot completly override the applicationId; the merge output of AndroidManifest.xml would show what is broken.
Better publish to Firebase App Distribution first (can be linked to Play Store).
There the obstacles are generally lower - and one can also see remote crashes.
Related
I explain my problem.
Current situation
We are delivering an application that must be released for 2 separated country, in details i have 2 myApp.apk (package name "com.my.app") built and signing with the same key but both have some hardcoded javascript configurations that are different (not in the manifest but only in the app code).
Build system
We are building with the phonegap service so i haven't the full control on the manifest created.
Goal
Publish the apk diversificate for country visibility.
eg. italian users can see the app "MyApp" which has an IT sever configuration wrote in the code and swiss users can see them app called with the same name but that contains different configuration.
What we tried
In the play console i tried to add another app project calling it with a different name (with the same package name of the previous one just published) but when i finish the upload google said me that currently an application with the name "com.my.app" already exist
Question
Is exist a way to diversificate the second application based on the delivery country?
Thanks in advance
You cannot have two apps with the same package name targeted on country. This answer gives a good explanation on why.
So you have two options:
Release your app with two different package names, eg com.myapp.it and com.myapp.de
Have your app change configuration based on country using something like Firebase Remote Config
Which answer will be best depends on the use case. For your use case, the second option sounds best.
I have Android Apps A and B waiting to be published on Android Play-store.Is it possible to keep same fingerprint for multiple Apps, with different package names?
This is to allow Just one of the two Apps to be installable in a supporting device. How to do this
I could use the same fingerprint to publish apps in Play-Store. But I was able to do an Install of both the Apps on the same phone.This is not what was intended. Any Solution ?
The application ID is what distinguishes apps on your device and in Google Play. I don't think it is possible to force only one app to be installed at a time if they have different application ID. Android has an "application ID" which is used to uniquely identify your app. It has nothing to do with what keystore is used to sign the APK.
But, the application ID is not necessarily the package name. An excerpt from the docs:
Although your project's package name matches the application ID by default, you can change it. However, if you want to change your package name, be aware that the package name (as defined by your project directory structure) should always match the package attribute in the AndroidManifest.xml file
So you can have two different apps with the same application ID, but different package names. And then only one of them could be installed on a device. I'm not sure if that's what you're going for, though.
And I'm not sure that your reasoning for doing this is great. Maybe you can expand upon what you mean by
This is to allow Just one of the two Apps to be installable in a supporting device.
so that maybe someone can suggest a better alternative for your situation.
I wanted to know if it is possible to submit multiple versions of the same app to the Google Play store. I know that Google Play allows developers to submit multiple APK's to the target certain device configurations, but we would like to release a different name of the app to each of our clients. Things that would be different in each app are the logos, app names, access to different types of information for each customer. I wanted to know if this would violate the Google Play Store's submission guidelines (it is an app built using Adobe Phonegap build, each app package name would be the same), would it be subject to rejection? I know that there are multiple questions on this site similar to this, but they are older questions and I wanted to see if this is something that Google Play is offering. Thank you.
"each app package name would be the same"
AFAIK, that not possible, since package name is used as ID in play store.
The package names must be different. Ideally, you would have unique security keys that signed the APKs as well. It prevents one app from accessing the private data of another app. Other than that, there's no policy or technical block stopping you from posting the same APK with different flavors.
As has been said - the package name is used as the ID in the Play Store.
But the way around this is very simple - just use different package names!
You'll be making the same app with different branding anyway so you'll already have different code bases.
Copy your entire app folder.
Find the config.xml. It looks like this (from the docs): http://docs.phonegap.com/phonegap-build/configuring/#example
Change the id. If you have two apps you'd have:
com.phonegap.appname1
com.phonegap.appname2
Upload each app to a different PhoneGap Build repository. This will create two different apps. Easy.
Is it legal to update an Android app on the Play store with a totally different app under the same package name?
Is it considered against the policies since I am updating the app USING THE SAME PACKAGE NAME with a totally different app?
Is it legal to update an Android app on the Play store with a totally different app under the same package name?
well, there's no such definition "different app".
as long as you are using the same keystore (as #SplatFace Development said) it considers from Google play point of view the same app by definition.
you can change whatever you'd like.
it's legal for sure, and there's no any security problem with that because the user anyway would have to accept again the new app permissions if they changed at all...
and as I mentioned in the comment -
I almost sure google did it with thier own apps when Google Talk replaced with Hangouts.
I don't see why it wouldn't be legal. If they are both your creations, you should be alright. It's basically changing the source code with a normal update, only a lot of changes, and changing the name if you're going to change the name. If you are going to change the name though, that may be more of a problem. I wouldn't be sure. I never did that.
Two apps cannot have the same package name. Android will treat them as the same app, with all the consequences that implies.
Short question
In Mono for Android (MonoDroid) - or Android apps in general - are identical package names with only case variations considered to be equal? E.g. 'Application.Application' = 'Application.Application'. The question refers specifically to equality as considered for the Android market application update mechanism. Not to equality in general.
If NOT then is there another way to change the package name but still have the Android Market consider the application as the same app? We want to insure end-users don't need to install a completely new app, but can use the standard Market update mechanism.
More detailed problem description
Our application was put in the Android Market using a package name containing upper case symbols, e.g. 'Application.Application'. So - in hindsight - we did NOT follow the advised Java package naming conventions. However the original application functioned without any further problems.
We have now extended our Android application with push notifications. During testing a problem surfaced that sending push notifications through the Google C2DM service did not work using the upper case package name. Only after changing the package name to contain no upper case symbols BEFORE the dot (.) did push notifications come through in our test environment. E.g. 'application.Application'. To achieve this we changed the package name in the manifest.xml file and submitted a new request for the differently cased package name via the C2DM sign up form.
We did not foresee this problem. But we would now still like to deploy a new version of our app through the Market but are concerned about being able to use the conventional update mechanism. We don't want to distribute the application as a completely new app.
Can we realise this? And if so, then how?
1. Can we just go with the 'application.Application' package name?
2. Or is there some mechanism to allow a changed package name? We might then further change our package name so it conforms to standards, e.g. 'ext.domain.application'
Note we have NOT deployed our new application. We want to solve this package name issue before deploying server side changes to production (e.g. the push notifications 'provider'), since server-side code also contains the package name for sending the messages.
Further note that the app is build using MonoDroid and uses the C2dm-Sharp library to send and receive push notifications. Perhaps the issue originates there, although it's seems a general problem.
I've done some research, and found two different apps on Google Play, with two package names differ only in case.
check out:
https://play.google.com/store/apps/details?id=Jk.app.app
vs
https://play.google.com/store/apps/details?id=JK.app.app
Conclusion:
Google Play package names are case sensitive - so what you're trying to do is not possible.