I want to publish an Android application that I have developed but have a minor concern.
The application will load with a database file (or sqlite3 file). If updates arise in the future and these updates are only targeting the application's functionality without the database structure, I wish to allow users to keep their saved entries in their sqlite3 files.
So what is the best practice to send updates? Compile the apk files with the new updated code only and without the database files? Or is there any other suggestion?
PS: I am not working with Java and Eclipse, but with python for Android and the Kivy platform which is an amazing new way for developing Android applications.
if you're using local sqlite then you have to embed the database file within the app as failure to do so it means there's no database, in case for updates database have version numbers where as it can not upgrade the database provided the version number is the same as the previous app updates
I had the same issue when I started my app but since kivy has no solution for this I tried to create a directory outside my app directory in android with a simple os.mkdir('../##') and I put all the files there. Hope this helps!
Related
I'm working on offline Ionic + Angular (Android targeted) App, where all data is displayed from json stored in assets folder.
Application is meant to work offline, but when there is update in json data, as of now I'm rebuilding APK to provide updated data in assets.
I want to update assets with updated JSON without providing new APK, is it possible?
Is there any feature of Ionic where user can upload new json file which can be added/updated/replaced in assets to refresh data without rebuilding APK?
I believe json stored in asset is part of APK package, do I need to store json somewhere else like
SQLite Database
Phone Memory / File Storage
or to update DB as well need to rebuild APK?
Please suggest best approach to manage this scenario.
Assets can not be updated without generating new Build
If you are using cordova than you can try Codepush. It's a great solution to push updates to apps
Or you can store data to Database and manage it.
I developed a project on Wear OS, And it worked until two days ago. The room database showed the files, And the folder, And after verifying the program, And whether it ran correctly, I decided to delete the folder and the files in the Wear OS app.
Since I wanted only to have data related to the actual purpose of the app. The problem is after running it again, it no longer generates the folder and files.
Does anyone know how to fix this, please? I have also tried to create another project, But it only generates the database folder, not the file content in the application.
Hi i am looking into an android development , as we all know when we build the project it makes an APK that is the whole program. but is it possible to make a an android project / APK that would be able to use external files to include more info into the project.
like say for example i have a list commands or functions in my list , but i dont want it to be added into my APK build , is it possible to use it externally?
i was curious because something like COC and other games after downloading it , then downloads extra data from the net , more into updates for the whole game.
how is this possible or is it possible to do , and use functions or source codes externally and not include it into the APK , and also the proper usage of it
Any Android App can connect to the Internet and save downloaded data files to use as they need, without requiring to include them inside the APK. Indeed, for many games (and other Apps having large data sets), it's a sensible option.
There are a couple of things to be aware of:
Android restricts where (on the filesystem) you can save files. And no matter where you save the files, the user can delete them at any
time. Your App should be able to cope with this.
The files should only ever be data files - not executable code. Attempting to
execute downloaded files is likely to put your users at risk
(depending on the permissions your App was installed with) and is also likely to get your App marked as malware.
You should read the Android documentation on Data Storage to learn a bit more about it.
I have an android app developed using adobe AIR SDK 16 and Flash CS6. Every time i publish/debug the app directly in the connected device. But every time i publish the app the data(image, text files) saved in the application storage directory including the sqlite file is removed. Hence i have to recreate all the data again to test. Is there a way to install/public an apk without losing the data created by the installed app? I tried with changing the version number. But it did not work. Please help me
thanks
thanks for the replay, I found a way (from adobe forum). When we update an app from google play, the data will not be deleted. In my case the data is deleted because flash will first uninstall the app(this will clear the data) then install the new app again. To solve this, one way is instead of publishing directly use flash to publish the app and copy the apk into the android device and use any file explorer software to install it manually. This will not delete the data
I am looking for information about the upgrade process in android. I mean I want to know if the application is reinstalled? Is the cache cleared? Is the external storage folders deleted (as these are deleted during uninstall)? etc.
AFAIK, no, nothing changes except for the apk. This includes res/ and assets/, but will not include anything stored to the device's /sdcard/data/ directory.
If there is a sql lite database, it should be associated with a version number. If the db has to change in an upgrade, it is the developer's responsibility to implement a database upgrade for existing database, within their new release.
Keep in mind if the developer wants to, they can delete external resources. But natively, no Android will leave folders in /sdcard/data/ or whereever they might be stored.
Also, yes, the cache is cleared. This is actually from uninstalling the older version before reinstalling the new one.
From what I gather here: http://groups.google.com/a/googleproductforums.com/forum/#!category-topic/android-market/technical-help/0y8wNUhZEWo
It only replaces the .apk file.