Android app not always created on Fabric after changing applicationId - android

I have several Android applications for which I need to change the applicationId in build.gradle (or package in the APK AndroidManifest.xml).
After changing the applicationId in build.gradle, the expected behavior is Fabric seeing my application as a new one, since it has a different package name. However my apps don't show up on the Fabric dashboard most of the time, and the new version of my app and new crashes are not displayed for the old package.
So basically, crashes and other statistics aren't recorded on the old app page, and a new app is not created even if I made it crash.
I have also tried making a new flavor to change the applicationIdSuffix, and even changing my source code package. Both worked only once, I couldn't make both of these methods work again.
Here is a sample of the AndroidManifest.xml in my target APK, where ".fabrictest" is added to the applicationId :
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="2006001"
android:versionName="2.6.1"
android:installLocation="1"
android:compileSdkVersion="28"
android:compileSdkVersionCodename="9"
package="com.example.myapp.fabrictest"
platformBuildVersionCode="2006001"
platformBuildVersionName="2.6.1"> ...
I plan to migrate to Firebase Crashlytics soon, but I have to keep using Fabric for now.
My questions :
Is there a reliable way to have an app show up on Fabric, or a way to manually create one on the dashboard ?
Is there a limit to the number of apps/flavors that can be added in a period of time ?

Chintan from Fabric/Firebase here. There is not limit on adding apps. This probably happens because of the fact that package name is used in multiple places in an android project. Try using Edit<find<find in path or Edit<find<replace in path and rename all of those that show up there. In rare cases, your app might need manual activation, in such case reach out to support(at)fabric(dot)io with your app's package name and its Fabric Org name, and they can activate it for you.

Related

Application ID and Package ID are different and it's crashing when a user is updating it

I have been given a legacy application to update and add a new feature to it but after making the changes and uploading it to the Play Store I was notified that a few users are having crashes when the app launches.
I have had a look at the project and saw that when it was given to me it had a different application ID and package Identifier.
For instance the applicationId in build.gradle is:
applicationId "com.project_name"
But in the AndroindManifest.xml it as follows:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.company.project_name">
What can be done for the next update so that the users migrating to the new version don't face this issue?
The app works perfectly fine when the user uninstalls and reinstalls the app.
The package="some_name" you give in the AndroidManifest and the applicationId in build.gradle has nothing to do with each other. They can be different or the same doesn't matter and it certainly won't crash the application.
Check the crash log to know what the issue is and fix it.
PS: package value is where the Resources are generated(like R files) and applicationId is a universal unique identifier.

Can i publish a new app by using existing app package name

I want to know that can I publish a new android app with existing app package name?
i.e I have a photo editor and its package name is com.myapps.photoeditor. now I want to make new version but i will publish VPN. so the new app will totally different.
VPN will be ok with existing package name com.myapps.photoeditor?
plz guide me
No, you cannot do this. Package name basically I unique ID for an app. When a package name is associated with an app and it is published over google play this is a unique ID for that app. You cannot publish new app with the same package name but you can update the app.
You can't publish two apps with same package name as google consider it as primary key but story doesn't end here. There are two things you can do:
you can update your app, here updates mean you can remove existing feature, you can add new feature, you can modify existing feature but you have to handle it properly.
But you want the new feature in a separate app then you should change clone your existing code and add new feature and change package name before publishing. (Not Recommended)
If you mean by package name as the applicationId in build.gradle, then the answer is NO. Your new VPN app will overwrite your existing Photo editor app.
If you mean by package name as the package name used by your source codes, then the answer is IT DEPENDS. YES you can use same package name in source code provided that you provide different name for applicationId. NO you cannot if you provide the same name for applicationId regardless of what you use as the package name used by your source codes.
Know the difference here: https://developer.android.com/studio/build/application-id
If you want to release a new app with applicationId (from app/build.gradle) same as any apps before, you can't do it.
If you want to update an existing app with complete new ideas or feature or name or type, having access to that app's signing keys and developer account, yes you can do it. Just release with version code greater than before

Multiple Projects with one package name in Android

I have a Android Project with an unique Package name. It is also available in Google Play Store. But now I need a huge change over the App. So what do I do to avoid collision in Play store. Also in my local machine do I need to change the Package name because I am using GCM for push notification as well.
Any solution for this or I have to use the old code and change all things .
If you only want to change the package name then you can achieve it by adding more product flavors in your app.
You will need to make the following modifications in your build.gradle
productFlavors {
appWithOldPackageName{
applicationId = "your.existing.package.name"
}
// This specifies the configuration of GHS android for huddle one devices
appWithNewPackageName{
applicationId = "your.new.package.name"
}
}

publish Android app with new name and images

I already have an app on android store and want to publish another.
The new one should have different name and images but all the back end is same.
Along with version number what are the things that I have to change to avoid any conflict? Do I have to change package names and all such stuff. Can some one please mention the things I have to change for publishing the new app.
The main identifier for Google Play is application package name. So you should change package name of your app. All other (version code, version name, images etc.) is relevant but is not necessary to be changed.
The final package that is used in your built .apk's manifest, and is
the package your app is known as on your device and in the Google Play
store, is the "application id".
The package that is used in your
source code to refer to your R class, and to resolve any relative
activity/service registrations, continues to be called the "package".
You should read about Configure Build Variants
Do I have to change package names and all such stuff.
A product flavor defines a customized version of the application build by the project. A single project can have different flavors which change the generated application.
android {
productFlavors {
devel {
applicationId "Your Id"
}
prod {
applicationId "Your Id 2"
}
}
}

Changing the package name of an upgraded Android application

During the upgrade of my android application, I changed the package name. But Android market doesn't allow to upload the changed package name application as an upgrade. If I upload the application as a new application, will the user have two applications on his/her device? How can I make sure that the user doesn't have to download the application again from scratch without reverting the change of my package name?
two package = two different application in market place.
Once you upload one app, its package should be same. Also, the key should be same.
Android market is only concerned about the package name in your manifest, not the actual packages name in the source.
You could try to give the old package name in the manifest attribute, then for activities give the new package name instead of relative (ie .MainActivity)
Like this:
<manifest package="your.old.package" ...>
...
<application android:name="your.new.package.MainActivity" ...>
Could work..
I plan to serve two versions of my app (paid/free) this way and using same project and code.
If you change the package name, it's treated as a separate app - not just in the market, but apk's in general will only 'replace' the same package name (and only if they're both signed with the same key).
Although it's possible to phase over to a new key by signing an intermediate package with both keys, there's currently no easy way to phase over the package name.
The best that can be done is this:
New apk version is signed with the same key, but has a different package name.
When installed, the new apk arranges to use the shared_prefs with the old package name.
The data is copied across to the new package name.
The new version requests that the old version is removed, and the user sees the uninstall dialog.
Note app data is usually kept here:
/data/data/pac.kage.name/
I haven't tried this, so I can't give anymore details yet. You may also be interested in my request for a seamless way of transitioning the package name.

Categories

Resources