Update an app (not in the playstore)

Hi everyone,
I have a basic and quite generic question.

I am working on my first app, just to learn.

To test it and debug, apart from the usual things while I am coding, I have created and APK and installed it on my phone.

But if I update the app and the apk and reinstall it, it will start everything (database and such) from scratch.

I am wondering, which is the correct way to release an update to an app?
In general, with or without playstore?

I am searching and googling but if anyone has some handy tutorial it would be helpful.

Thanks!

For testing, connect your phone to your computer and run either

ionic cordova run android --livereload

or

ionic cordova run ios --livereload

Here are the docs - https://ionicframework.com/docs/cli/commands/cordova-run

For ionic 3 - https://ionicframework.com/docs/v3/cli/cordova/run/

Using livereload will keep refreshing the app on your phone every time you make a save, and you’ll see the changes instantly.

As for the database being restarted from scratch every time, I’m afraid this will happen if the database is coded into your app.

If the database was kept apart from you app, this could be avoided.

Using Ionic storage will store data on your phone as opposed to within the app. The data will remain there as long as you use livereload, but if you delete the app and re install it, it will be gone and start fresh.

If you want to use a database like Firebase which is saved in the cloud, then the data will always be there no matter how many times you delete your app.

But I’d say worry about the database later - get ionic cordova run [platform] --livereload up and running so at least you can test your app in a much more convenient way without building an apk and installing it every time.

Hello,

Add platform in your project, after run ionic serve --devapp. Now install the ionic dev app on your device. Make sure your device and your pc network are the same. when you will run your app in the browser at that time you can test your app in device without any installation.

1 Like