How do I have several working versions of the same app with the same applicationId or package?

Hello

I'm still very new here and I don't know what is the best way to work. Also, although I have searched for information on the subject, I have not found the solution.

While I am working on development (without having published it) and I make important changes to the app I make a copy of the project and continue working on the new copy, because that way I can go back in case of a problem. This generates the problem that when installing the app on a device it does not recognize it as the same.

How do you work to avoid having this problem? Do you always make changes on the same project? If you come across an error, how do you go back?

Because I have tried to modify the "applicationId" or the "package" and I have not been able to neither with Android Studio nor with APK Editor Studio. Is there a safe way for newbies? Because I can't find the gradle folder in my project or the directories that indicate for example in "https://puravidaapps.com/packagename.php"

Thanks a lot

1 Like

I you have created at least some of the working features in your app then you can try taking a checkpoint.

Projects > Checkpoint

Yes, I tried, but when I install it on the device, it recognizes me as a different app

1 Like

Try to version your app
image in Screen1 Properties
Change the VersionCode to 2 and VersionName to anything you want.

1 Like

When I am working on an app I regularly download an aia. I then continue working on my original app. I’ve never had any problems.

For each aia I download I use the following naming “convention” so they can be easily viewed in chronological order:

[App name]YYMMDD(optional version).

For example, MyApp210403. If I work on it tomorrow the downloaded aia will be named MyApp210404.

This way they are ordered chronologically.

If I save an app twice in one day the first one will be MyApp210403v1 and the second MyApp210403v2 etc.

1 Like

Always work with the original, first version of the application. Leave the copies in case the original fails. A changed project name causes it to install as a different application.

1 Like

I. This is and always has been my approach:
When I want to create a new app with the name "appName", I start with the first version, which means that it is named appName1_1. Then the 2nd version follows appName1_2 etc. (The first number is for the PlayStore version, the second is the development number.)

As a result, I am not forced to delete the previous version each time in AI2, but do it later for all together except for the last version (Play Store), e.g. appName1_v5. All versions up to the final version (App / Play Store version) are saved on the PC and in the cloud. The final version is then given the originally intended name "appName". After this version is published in the Play Store I remove it from AI2, because I already have this version in AI2 (the latest version → Play Store).

If updates need to be made for the Play Store later, I do the following:
Let's say I'm at release 47. The first version of the new release is given the name appName47_1, then appName47_2, etc. The final version of this update is then again given the name appName.

I've made more than 600 releases in the Play Store this way so far (all AIAs generated this way may be about 3000 - 4,000).

Note: If we could change / set the → packageName in AI2 (as is possible with Kodular) it would of course make things easier.

Possible question: Why do I split a release into versions?
Answer: For example, when a certain milestone has been reached or an essential part of the app has been completed and I first want to test whether the app (APK) works properly. This is followed by a new version with further optional features. I always want to know which version I can revert to that worked flawlessly. But there are other reasons that have emerged after my seven years of experience with App Inventor.

II. PackageName and updating an app:
To be able to update an app in the Play Store, three requirements must be met:

  1. The same packageName is used as for the first release.
  2. The keystore must be identical
  3. The app version number must be higher than the current app version

Changing the packageName afterwards is not that easy. I've done it several times. You have to proceed very carefully, otherwise the app will be unusable afterwards and a crash will occur.

1 Like

Thank you very much everyone for your answers.

They are different points of view or different solutions, but it is clear that you all agree not to modify the name once you have reached the final version.

I will do so from now on, and I also avoid the problem of changing the name!

Hello again

Sorry that it was gone for a few months, but I had to stop this project.

The fact is that I can't get it to overwrite one apk over another. It detects them as different apps. I have not modified the signature of appinventor, so I understand that it should always be the same even if I make two versions and it should overwrite me (it does not, however).

I have tried signing it with APK editor studio but it gives me a permissions issue which I guess I will have to fix in another query.

I: Using Apktool 2.4.1

I: Copying C:\Users\Nacho\AppData\Local\Temp\apk-editor-studio\apk{aed8baf1-dd26-4b8a-b792-ef8c58bee290} classes.dex file...

I: Copying C:\Users\Nacho\AppData\Local\Temp\apk-editor-studio\apk{aed8baf1-dd26-4b8a-b792-ef8c58bee290} classes2.dex file...

I: Building resources...

W: C:\Users\Nacho\AppData\Local\Temp\apk-editor-studio\apk{aed8baf1-dd26-4b8a-b792-ef8c58bee290}\AndroidManifest.xml:19: error: No resource identifier found for attribute 'preserveLegacyExternalStorage' in package 'android'

W:

brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Nacho\AppData\Local\Temp\brut_util_Jar_2730919941304965847.tmp, p, --forced-package-id, 127, --min-sdk-version, 11, --target-sdk-version, 30, --version-code, 1, --version-name, 1.1.1, --no-version-vectors, -F, C:\Users\Nacho\AppData\Local\Temp\APKTOOL4319906876153923055.tmp, -e, C:\Users\Nacho\AppData\Local\Temp\APKTOOL6933924947146516189.tmp, -0, arsc, -I, C:\Users\Nacho\AppData\Local\apk-editor-studio\frameworks\1.apk, -S, C:\Users\Nacho\AppData\Local\Temp\apk-editor-studio\apk{aed8baf1-dd26-4b8a-b792-ef8c58bee290}\res, -M, C:\Users\Nacho\AppData\Local\Temp\apk-editor-studio\apk{aed8baf1-dd26-4b8a-b792-ef8c58bee290}\AndroidManifest.xml]

If I sign two apk files with the same signature, will it recognize it as the same and overwrite it?

I'm afraid to modify the signature directly on appinventor because I don't know if it affects all the projects or only the one I modify. How could I do it?

Thank you

Yes AGree