How do I update an App Inventor app?

I built an app years ago that I'm still using. A couple of years later I made a "Save as..." to make a branch of that project and started developing an update of the app on that new project.

I finished today (not because it was a long update, just because I'm lazy :slight_smile:).

While using the first version of the app I've populated its DB with some data.

Today I have built a new .apk, I've downloaded it on my phone, installed it and now I have two apps, the old release with its DB populated and the new one with the empty DB. This means from an Android perspective this is not an update of the app, I just installed a new app having the same name of the old one but Android can't see any parenthood relation between them.

Is there a way to update the old app with new one without having to reinsert all the data I have in the old app DB?

The firs app had VersionCode set to "1" and VersionName set to "1.3", the new one has the same VersionCode but VersionName "1.4".

Fun fact... in the app old version the "non-visible components" in the Designer page shows "TinyDB1" while the new one shows "ApplicationDB". However, the "Namespace" property of this non-visible component "ApplicationDB" shown in the Designer is "TinyDB1".

Honestly, I don't know if in these years I have changed something in the "non-visibile component" section... I might have renamed the DB or maybe App Inventor did it automatically because the old one is no longer supported. I only noticed that the old branch and the new one differs in this non-visible component.

Ciao,
Max

Ensure it has exactly the same package name and increase the version number.

On some android systems, you may have to uninstall the current app to install the new one.

Sorry, it's not clear to me.... what do you mean by "package name"?

  • The project name as it appears in the home page when you log in MIT App Inventor?

(This is different between the old version and the new version of the app)

  • The .apk name? This is also different as it's taken from the project name (see above).

  • The "AppName" that's shown in "Project Properties"?

(This is the same for both versions)

None of the above :slight_smile: Your package name can be found in the projectproperties file in your aia project. Herewith for an aia project called WVTabs2.aia.

Use the same login and same project name as previously

Taifun

I read the .aia file of the new version and it reads:

main=appinventor.ai_xxxxxxxxxx.ShoppingList_rel_1_4.Screen1

(I've just obscured my name with "xxxxx")

There is the project name with the version of the app and this is different from the previous one, obviously.

Now what? Can I replace that part with the one taken from the previous release or it's looking for troubles?

For you to update an old app you have to have same name of the project, so new name of a project will result in a new app of course..

Do this.
Download your old project aia and save it on a safe place.
Delete your old project from ai2.appinventor.mit.edu and also from trash..
Now save your last project with Save as wit the old name.
Build and install as now it should work.

Solved, thanks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.