WearOS: same package name or same applicationId? - android

The docs for publishing WearOS apps consistently state that:
Ensure that both the watch and phone app modules have the same package name.
However I'm wondering if it actually means applicationId from the build.gradle file instead of package name (my understanding of what package name means is in the package statement at the top of source files - maybe that's wrong?)
The reason I'm wondering this is that another part of the docs say that:
Every Android app has a unique application ID that looks like a Java package name, such as com.example.myapp. This ID uniquely identifies your app on the device and in Google Play Store. If you want to upload a new version of your app, the application ID (and the certificate you sign it with) must be the same as the original APK—if you change the application ID, Google Play Store treats the APK as a completely different app. So once you publish your app, you should never change the application ID.
So, it sounds like it's the applicationId that is important when publishing apps, not the package name. Maybe I'm getting my terminology confused, or maybe the terms 'package name' and 'applicationId' are used interchangeably?
Also, I'm futher confused by the fact that you can have a package attribute in the application element of Manifest (eg package="com.example.myapp") - I currently don't have that so I assume it's optional.
I'm a bit confused, if anyone could clarify what exactly is meant by package name when it says Ensure that both the watch and phone app modules have the same package name that would be great. Thanks :)

Related

How to temporarily change the package name of an Android app?

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.

Google Play Console - Multiple APK for different country

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.

Android Api Key

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.

How does ApplicationId in Build.Gradle affect my package

Hello this is just a technical question.Would appreciate an answer
I uploaded an app this afternoon to the play store using the default com.example but I couldn't as I was told "Its Restricted" so I changed it in my build.gradle to com.fanalcrystal.blah.blah.
I wanna know if I should change my package name in each file to reflect my applicationId as it is over 8hrs and my app is not showing on the play store when viewed on mobile phone but shows on the web store
The files inside your project do not need to use the same namespace as you set for applicationId in build.gradle. The applicationId is just what Google uses to identify your app inside the Play Store.
However, AndroidManifest.xml has a tag called manifest and that tag has an attribute called package. Again, this doesn't have to match the other files, but it is used to reference resources inside those files. For example: com.example.R is the package that allows you to reference a view using R.id.view_name.
I imagine Google's reserved some applicationIds, and I bet these are names like com.example, com.google, com.android, etc.
There are a bunch of reasons that could prevent your app from showing up on your device:
The Play Store caches content, and that cache wont expire at the same time. Eight hours is unusual, but it's not uncommon for app pages accessed on different devices to update over a period of time.
More likely you've done something in your manifest that excludes your device from being able to install your app. You can limit devices by API versions, screen sizes, device architecture, and a bunch of other things. Check out the APK page in publisher part of the store to see if there are any devices excluded.
Hope that helps.

App update with different package name into playstore

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

Categories

Resources