I have my PROD app installed on my android phone with the package name "com.mycompany.app". however to develop and test my app I use the package name "com.mycompany.debugapp". in this way I can have the 2 app at the same time installed on my phone, the PROD version and the development version.
This was working great style I decide to implement billing :( from my development app, when I call querySkuDetailsAsync, it's return me an empty list :( I guess it's because I use com.mycompany.debugapp instead of com.mycompany.app. Is their any way to test billing services from my development app com.mycompany.debugapp?
The problem you are facing with billing, is exactly as you thought due to the different package names. Regardless of whether your package names are similar, if they have at least 1 different character, then both the OS and Google treat them as two completely unrelated and different apps.
You should always use a fixed package name regardless the build type or any other requirement. The package name is your app's unique identifier and must be permanently fixed.
To differentiate debug/release builds use instead build variants.
If you need to test billing in debug, first publish a release build as internal test, then you will be able to test your debug builds. Notice it may take a few hours until you are able to start testing once published.
Related
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.
I have published an Ionic app to google play and it's working fine. But, I had to make a change to its package name and now when I try to reupload it, it says the package name should be the same as previous version.
Your APK needs to have the package name com.mypackagename.
You need to use a different version code for your APK because you already have one with version code 'myversioncode'.
I'm happy to take down the whole app and upload the newer version but I don't think google would allow me to do it.
How can I work around this? Should I update the version code as well?
Think of the packagename as kind of a unique id for you app. If you look closely, a playstore-link is always a combination of the url and your packagename, like https://play.google.com/store/apps/details?id=COM.YOUR.PACKAGENAME.
When you create a new app project in the developer console, and upload the first apk, this project is permanently linked to the given package name.
I think the reason for this is androids app update scheme. By comparing the package names it checkts if you have a certain app installed, and if the installed version has a lower versioncode then the one available, it detects that you could update it.
So basically you have two options:
A) keep the old package name and do a regular update
B) change the package name and create a new app project in the developer console. publish your "new" app. Keep in mind that this app starts at zero, so your previous downloads and ratings are gone
You can not update the same app with different package name instead disable the previous app and upload new app with a new package name.
I've published an app to the playstore. On the same time, I worked on an update, but the update has a different package name.
Like:
Release version 1.0 -> com.domain.packageOne
Release version 1.1 -> com.domain.packageTwo
Can I now add packagteTwo without problems to the production phase or will then, the device download both versions? The problem then would be, that the user would have two verions of my app.
Or do I need to change the package name in my project so it matches packageOne? Thanks!
When doing an update for an app, it should have the same package name, and should always be signed with the original signing certificate used when the app was first published.
If you upload your update with a different package name, the play store will treat it as two separate apps, I'm not sure whether or not it will allow the same application name, as viewing in app listings, to be the same, I don't believe it does so you would probably get an error anyway stating that an app with that name already exists.
If the actual application name is also different, then the play store will treat it as two different apps.
If you change your package name to be the same as the original package name, you can update the app as long as you use the same signing certificate as the original app.
Hope this helps.
if you want to make an update to your app it has to have the same package name. Just increase the application version
See this link on how to specify versions on your app
I guess this could be a common problem for new android developer like myself so I thought to ask it even so it is not a big deal.
I would like to have both the current published stable version of an app and the under development version on my device. Yet when I want to install both I get
Re-installation failed due to different application signatures.
You must perform a full uninstall of the application.
I understand it technically yet I was wondering how I could have an easy way around this so I can have both application on my phone. I could change the package name for the time being but I hope there is an even more straight forward way to get it done.
Thanks
UPDATE
Solution as given by "Marc Bernstein" in the following post - thx Algo for posting the link to it
How to change package name of an Android Application
There is a way to change the package name easily in Eclipse. Right click on your project, scroll down to Android Tools, and then click on Rename Application Package.
Just change package name of your published and development version Application. Changing Package name is really very simple and easy, follow that post
https://stackoverflow.com/a/9171773/185022
The "published" version should be signed using a release keystore.
The "development" version should be signed using a debug keystore.
At installation time, Android will complain that the two applications (having the same package name) have different signatures, and won't install the latest one (Re-installation failed due to different application signatures.).
To fix this (normal) behavior, change the package name of your application while developing it (ex: com.example.myapp-dev).
I want to publish a beta version of some app of mine on the android market and face the problem that I cannot upload an app with the same package-name twice - not even with a different certificate. But having 2 package-names for release and beta version makes a lot of trouble ( e.g. having to change references to the different location of R every time )
Is there a best-practice/good workaround for that problem?
Yes call your package
com.you.app.beta
Fix all the bugs in this app. Then when you go live just copy the project refactor your package name (Eclipse CTRL+ALT+R on the item) update your manifest and re-release. The beta package is then not supported by you any more and you can even click unpublish, or release an update that shows an upgrade screen linking to the new package (i.e. new market url)
com.you.app
What's the problem?
since IO 2013 there is now one option to do beta-testing:
https://support.google.com/googleplay/android-developer/answer/3131213?hl=en
We upload but do not publish beta versions of our apps. Once uploaded, the market will assume that any incoming license check is being done from a legitimate installation that was side loaded and will respond "licensed". So our beta testers can test a full implementation, including the licensing code. (Test account responses are also honored for uploaded but unpublished apps.)
When the testing is complete, we upload the release version using the same package (and signing cert), and publish.
I came across this blog which discuss Android Beta Testing and feels like that the better way. So just sharing with you guys. Hopefully it will be helpful for all . http://zubhium.posterous.com/android-app-beta-testing
Pushing app with com.packagename.beta is not a very good idea. It creates unnecessary confusion and secondly you don't want to get unstable version in market to get bad ratings for your brand.
Why can't you just use the same package name for the release version? Doing so would also let your beta users get notified of an "application upgrade" (that is, the release of the final version).
If you do want to use different package names, one way is to make an ant script that you can run that changes all the imports, and the manifest.xml, to use the new name. So you have your code that you develop in, then you can just run your ant script whenever you're ready to upload to the Market; say "ant beta". This would rename all your packages from com.company.app to com.company.app_beta, and you could release it on the Market.
It is good practice not to upload a beta version to the Market. You should only upload production ready applications to the Market, as this is what the users expect.
If you want to beta test your application, it is better to use a private distribution channel.
If you use the same certificate, then an application with the same package name will be considered as an update to a previous one. Users will be able to update easily.