I have an android app where I embed in assets folder a CSV file about 1MB. This file contains 20.000 records of data and it's for read-only. Until now whenever I need to add/remove some records I publish a new apk with the updated CSV. This happens about once per week and usually, the app has no other changes.
I'm thinking of another way to update the CSV file in the user's device.
One option is the app to download the file from some CDN.
Is it possible through play-store to upload there just the file and somehow to be pushed to the user's devices? I'm not sure if Android App Bundle can be used in my scenario.
You can host the csv file on server. If you find its too hassle to build and manage you custom server, you can use Firebase Storage. And even better and efficient solution would be to parse the file, insert it into in Firebase Realtime Database and when updated, user will only get the update portion
Related
My flutter app provides some content (mostly text and graphics, like blog posts, or news) to its users. These contents need to be updated daily. So there will be new texts, images, maybe even videos. Now, the app would be used even when offline, so all the updated contents should be stored somewhere to be accessed later.
Right now, I'm using a SQLite DB to store texts
The images are stored in the Assets folder of the app.
The nature of the program is such that the users won't want to give the app any SD-Card access permission.
So my question is, how can I update the content without updating the whole app or using any SDcard permissions?
Is it possible to write code that downloads the new content and saves them directly in the Assets folder of the app? Can the app then use the files? without them being referenced in "pubspec.YAML" file?
Can I store all the data (even images and videos which are added daily) in my SQLite DB which is located in phone memory?
What is the standard practice for apps that have this kind of content?
You have to use the storage somehow.
In Android, you don't have to ask for storage permission if you want to save data in internal directory for your app which is storage/emulated/0/Android/data/data/your_package_name/ folder. You can try that.
However it has got a downside, if your app is deleted then all the data will also be deleted.
I have developed (Offline) Android app in which i have to save some employee's data into Local SQLITE database, when i send the apk into another andoird phone the data in the database dose not appear due to local storage of both the devices is different.
My goal is to send the data with the apk file to who ever i send the apk. How can i achieve the goal ?
The problem is i do not have the idea of how to do it, or never have done this kind of project before.
Please guide me.
If Your database is read only - You can use raw folder of project for Your SQLite database file, than, after .apk was installed, copy it, for example to external storage. But if You need changes in database and synchronized data on all devices - You should use only one server-side database.
i have developed a android app for farmers. it is a informative app for indian farmer.The users will be sending me the images and video files to me through my app. here i used (integrated) dropbox to receive those files directly to my dropbox space. whatever the image or video taken by the user, it will be stored on a folder in my mobile storage. Here what i want is, i want the folder in my mobile storage to be in sync with the folder in my dropbox.
How can i do this?
there is a app in market called Foldersync which exactly fulfil my requirement. how they are doing it? How can i keep a folder in my mobile storage and a folder in my dropbox to be in Sync?
Note :
i have gone through drop-box api and created a simple app to send files directly to my dropbox space and i know how to download a entire folder from dropbox.
But here my question is unique from that... pls don't answer the above points which i already know..
Please help!
Thank You
You can use the Dropbox API to keep a local client in sync with Dropbox. There are two main pieces to this:
1) Metadata:
Assuming you're using the Core API, the best way to get information about all of the file and folders in an account (or optionally under a specific path) is to use /delta:
https://www.dropbox.com/developers/core/docs#delta
With this, you can get information about everything your app can see, and then easily stay up to date with changes. There are some useful blog posts on using /delta here:
https://blogs.dropbox.com/developers/2013/12/efficiently-enumerating-dropbox-with-delta/
https://blogs.dropbox.com/developers/2013/12/filtering-dropbox-delta-results-by-path/
2) File content:
Using the metadata retrieved from #1, you can download any files you need access to locally using /files (GET):
https://www.dropbox.com/developers/core/docs#files-GET
You can upload locally changed files using /files_put:
https://www.dropbox.com/developers/core/docs#files_put
Or, for larger files, use chunked uploading:
https://www.dropbox.com/developers/core/docs#chunked-upload
https://www.dropbox.com/developers/core/docs#commit-chunked-upload
The main work here will involve programming the logic in your app to correctly receive changes from the server as well as upload local changes, in order to keep everything in sync.
Also, be aware that on mobile devices, bandwidth can be limited and/or expensive, so be careful to not accidentally automatically download a lot of data the user doesn't want or need.
How to make folder and files that consists of database in .TXT and .XML appear after installation?
I know it was silly question, but I am creating an offline application using SQLite Database. If user submits the data from apps (e.g: insert to do list, create purchase order), the data will be saved and then TXT file is generated.
This .txt has role as database. The apps will get new data from .txt they recieve via email / cable data and upload .txt users generate to email. This feature is really important, so how to make those files appear in file directory? They have to be seen in order to do so.
Beside that, when I installed my apps I cant find my package folder installed. Though I did install my application from file explorer. I know that I can do it with USB Driver, but my PC couldnt update USBDriver to the phone since it said that my current one was newer. So I had to install it using package installer in my files.
I am very new in learning Android, so I hope you wouldn't mind to tell me what I need to do in my code.. Thanks.
my related previous question: Cant generate folders contains Offline Database after Android APK installation
Consider an app with a set of data files (could be music or pictures or locations or indeed anything at all) embedded in the apk.
I now want to provide to the user additional data files , either to replace or add to the original data files - the user should be able to select which files to download and not have to reinstall the whole app.
So the question is it possible to do this non-programmatically - like by providing extra apk files for the app but which only contain single data files?
This is a good use case. A simple idea could be, ask the user to check for updates, you download a XML file which defines your updates. Parse this XML file and show what the user needs to download. Then you download and save it to desired locations. Always version the XML file so that you know if updates are avialble or not!