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.
Related
I am developing an app using android studio that delivers information in text files stored in the assets folder. The app works, but if I change the text in the files, I have to uninstall and then reinstall the app to make the changes permanent. However, if I make changes to the app code, the changes take place when the app is updated. I want the assets folder to update in the same way. Is there some way to avoid reinstalling the program to update both code and assets, especially when updating apps to the playstore?
Thanks.
First I have been searching for a solution for acouple of days now. It is very strange as the answer to my problem maybe very simple.
I am trying to make the simplest code to create sqlite database. there is plenty of examples in the web. the code does not generate any error and the application appears on the device. but when I try to locate the database in the specified location as in the title it does not seem to be created.
my specific questions
1-does the device has to be rooted to create a database file.
2-do I need special manualy entered permissions in the manifest file to create the database file.
3-Is there any prior settings that I have to do in android studio or a plug-in that I have to add.
4-Do I have to create the sub folders manualy because some devices dont even have the second data subdirectory of the main data directory in the main internal storage. Any way I created the folders and subfolders but no database appeared after running the application. I use a file explorer in the target device to inspect the existance of the database file.
many thanks for any attempts to help me as I seem to be stuck for few days now.
I found the files in the internal device memory using a root explorer.
The strange thing I have not seen any tutorial which alerts me to the hidden memory and root explorer. time wasted but along the way I learned many new things.
thanks all
In the app I was helping developing, the users seen that each time they use apps like CM Security to clean 'junk', the files inside the folder associated with the app were instead considered as 'junk' and are deleted.
The app itself would create the folder in the C side of the code instead of using Java.
Firstly, when the app is first launched, custom C code will check if the app folder (e.g. 'Game') exists. If it doesn't, it makes it (regardless of OS. The app is cross-platform, sorry I forgot to say it.) It puts it in the external SD card ('sdcard/'). When it's seen, it can now run the app.
I get about the getFilesDir, but since the directory is made using C code and not through the java activity, it doesn't count as its app directory.
Is there a way to link the folder to the Android code so that it would be recognized as the app folder?
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!
How can I instruct Eclipse to copy a file from my Android solution to an emulator, as part of Run/Debug? I have a small database, stored in Assets, that needs to accompany the application. Thus far I have simply copied the file myself using DDMS but would prefer to have it automatically included. The project properties allow me to specify some aspects of the build, e.g. the build order and which libraries should be included, but I don't see anything about simply copying a file.
Is the file in your "res/assets" folder not available using the AssetManager class during testing versus during testing or when installed via a signed apk?
I use a large file that I store in "res/raw" in one of my games, I am able to access this file during testing with eclipse without a problem just using the normal calls to context.getResources().openRawResource()
Deploying databases with your application it a reoccurring topic over in the android-developers Google group here is a post with a few thoughts on the matter.
Good luck.