I need to store some data in my Blackberry application so I'm using files, I'm storing these files in the internal memory of the device, but if I uninstalled the application I need these files to be removed too.
Is there a way to store the files in the same path of the application package , or any other way to delete them if the application was uninstalled?
This is the path which I'm using:
try {
fileconn = (FileConnection) Connector.open("file:///store/home/user/data.txt");
}
What kind of data are you storing? If you can store the data in the app's PersistentStore instead, it will automatically be deleted when the app is uninstalled.
Related
I'm working on winform app using local sqlitedb. I'm able to embedded db to application file when deploy. But I got two problem:
I can find the local.db(DEPLOY type) file but when try to read it using DB Browser, it returned blank db without any data inside. The app itself still working perfectly fine with all data in the .db file. So where can I find the .db file which acture have data inside?
The second problem is. I'm syncing local sqlite database with a remote Google Cloud DB. Everything works on debug but in deployment the sync function can not keep tracking changes in .db file and return 0 changes. I assume it's because in application file, the .db file is blank without any data inside so the sync function can not track and sync 2 databases. I'm using DotMim(0.9.7) to sync.
I added my app on heroku and it makes changes to the file inside it and everytime i make a change in github all the datas are lost is there any way i can get access to the file inside heroku
Heroku has an “ephemeral” hard drive, this means that you can write files to disk, but those files will not persist after the application is restarted with the dynos. The best solution to this problem is to use cloud storage and dump all the new data on it with your worker script.
I am developing a client-only ReactJS application (only for local usage) where I need to save and load images by filepaths (URL and local file system).
The paths are stored in the local storage and images from URLs can be used. Anyway, local images cannot since ReactJS is using the project directory and I cannot escape it.
Is there the possibility to open files with absolute path from the local file system or can I/do I have to upload it in the project directory?
Are you running this through a browser? If so Javascript on browsers does not yet have the ability to access local file systems. I haven't tried this but you could run Node locally and use ExpressJs for client-server communication.
As stated here:
you'll need two pieces:
A browser piece, which does the UI with the user.
A Node piece, which runs on the user's machine (and thus can access the file system) and which the browser piece uses to do the actual file operations.
Probably the easiest way for the pieces to interact would be HTTP, which you can trivially support using ExpressJS.
So for instance, if the user wants to delete a file:
User clicks something to say "delete this file"
Browser JavaScript sends the command to the Node process over HTTP via ajax
Node process does the deletion and reports success/failure
Browser JavaScript displays the result
I can put my data in directory of Documents folder of App, but it has been rejected from Apple for reason of not follow the iOS Data Storage Guidelines.
Trying to figure out how to create a directory under Library/Cache in iOS on the file system using PhoneGap.
I want to create a directory for my PhoneGap application, so I can store images and JSON data user synced from server.
When I use window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, onError);, it save my file to Documents folder under my App, so I got Apple rejected. The reason is the system backup all data under Documents folder to iCould after iOS6, so Apple does not allow big data like images or JSON file which could sync from your server again to keep in this folder.
So I use LocalFileSystem.TEMPORARY instead. It does not save the data to Library/Cache, but it save data to temp folder of App, which does not been auto backup to iCloud and not auto deleted either. Finally, my application has been passed Apple review.
I want to emded SQLite database (*.db file) to the AIR app, like images, mp3 etc.
This is to ensure that it was impossible to copy my database for other users.
No, you can't. And even if you could package it, the data wouldn't really be protected: since an .air package is in essence nothing more than an enhanced .zip archive, anyone could just extract the database from the .air file.
What you have to do is encrypt your database and protect it with a password so that only authorized users can access the database.
There's ample documentation on how to do this. Here's a tutorial from Adobe to get you started: http://www.adobe.com/devnet/air/flex/quickstart/articles/encrypted_database.html
I think this is not possible. If you embed it to the air file andinstall the AIR app the db will be copied to the installation folder.
You could create the database in the user storage location
var file:File = File.applicationStorageDirectory.resolvePath("name.db");
Users could still navigate in explorer to the file. It will be stored under /users/username/appdata/appname/Local Store
AppData is a hidden folder.