I'm about to build an app in which there's an image giving information about weekly events that needs to be updated every week. I cannot update the app every week on the apple store and compel the user to update so often the app, so i was thinking to update automatically the app. I saw an app doing this: it update the content every time the user wanted to look at the need-to-be-updated content AND if he was connected to the internet. If he was online the content displayed would be the last one downloaded. How they could do this this? The only thing i could saw on the app is that when it was downloading the updated content it displayed the the typical wheel (http://spie.org/images/global/SearchWheel_Frame1.gif).
I'm using a sqllite database to store data. In fact, i have to update some strings of data inside the database...
Related
For our app we need the app the work offline 100% with the most recent data.
Normally the app uses a symfony api platform API to fetch data paginated server side.
But when someone is using the app in a area without Internet he still need to be able to access all data to make a new job and que it for when he is online.
So our tough is to make a json that has all the data and send it to the phone when the phone has connection.
When the phone is using the app live, it will use pagination from server and fetch data.
And when offline it will use the local downloaded data file.
Problem is the data is large, so storing it is the problem.
We are now using redux persist and we see so many people have problems with crashes and mobile ram.
We also thought of using sqlite or just async to store a json file, or download a sqlite file from the app.
How do you guys feel about this
You can use react-native-local-mongodb. This can help you store a json database on your phone.
Other option is to have react-native-sqlite-storage in case your database has to be relational and requires table.
You will have to sync this local copy with the server once this user is online. This too can be done if you have the timestamp saved of the last sync. So after that, you ll just have to sync the data created after that timestamp.
However, I had also implemented react redux persist and it didnt crash. I suppose, the reason for crash must me something else.
I am in the process of creating an app that will log certain amounts of data for teachers. While the data will be kept somehow within the app, is there a way to integrate the use of google forms or sheets with the data?
For example, if I use my app to record data (say that a student was coming to class tardy), is there a way to have that data go to a google sheet/form and always see live data as it's being used through my app?
Thanks!
Mike
You can build a form in your app that posts data to a standalone google-app script. The app-script can then append the data to any google sheet you specify. I'd also like to recommend Google data studio for displaying real-time data, as it will save a lot of time on not coding the data display ui.
My issue:
I want my application to have an initial data set, including images, for the first run.
But after that if the user connects to the internet, they can download newer images.
From what i can google, the way to do that is to use image caching.
How do i do initial caching of the images for the first run on the application? (if the application runs offline the first time)
You can put initial files inside your project and Titanium will include them during build process. To update them in the future you have to use Titanium.Filesystem.File object.
I've been working on this problem for a while now. Here's what happens:
My app is launched. It already has existing data in the core data store. It then connects to Dropbox using TICoreDataSync.
Then I connect a second device, which also has existing data. I connect it up to Dropbox the same way.
What then happens is that when I sync, it syncs data between the two harmoniously. Any changes i make on one device are sent to the other after a sync on both devices. The problem is, I want the existing data in the database to be uploaded to Dropbox and included in the sync, so both devices have all data.
How can I do this?
This is actually not how TICoreDataSync was intended to work. It will not merge those two store files for you, but will rather pull down the store file uploaded by the first device to the second device and then keep those store files in sync. From your description it sounds like you are skipping the whole store upload and download steps during sync manager registration.
It would be useful for many people to know how to completely remove an application from your device when testing.
I have downloaded my app many times now, and likewise have deleted it many times. The problem is when deleting the app, it does not remove things like the persistent object related to my app, or the images downloaded through the app. So, when I download the next build, I have no idea if something broke that is related to building the persistent object or fetching the images since those elements already exist from the last build.
I don't know if this is a cache thing. I don't know if this is expected and I have to use some utility to wipe this data after deleting the app. I can't really find much info through basic web searches.
Any information would be appreciated.
Blackberry Bold 9000. 4.6 OS. tested with both SD card and no SD card.
Objects stored in the PersistentStore are automatically deleted on uninstall if their interfaces were defined in your project. If they are from the standard BlackBerry API then they will stick around until they're deleted. E.G if you save a String in the PersistentStore it will stay in the PersistentStore but if you save a class you created it will be deleted on an uninstall. So if you want to have those objects be deleted automatically just create a wrapper class and save that.
Images stored on the filesystem will not be deleted until you or some application deletes them. However, it should be easy for you to write an app that clears everything out.
Another solution you could implement is making your app somewhat self-aware of its data.
Create a simple String value that you persist (or optionally, persist it in a Hashtable so you can store many properties this way) that includes "Version".
At startup of the GUI app, compare the stored "Version" against the application's current version. If the stored version doesn't exist, or if it exists and matches, take no action.
If it exists and does not match, automatically clean up old persisted data; or alternatively prompt the user to see if they want that data to be deleted (which one is better will depend on your implementation)
You can also use CodeModuleListener to listen for an uninstall event -- when that happens, you can clean up at that time as well or instead.
(As an aside and a bit of shameless self promotion, I am actually currently working on a shareable library for Blackberry that makes managing persistence much easier, as well as desktop data backup/restore. I'm doing this as part of the BBSSH project, but I'll be splitting it off into a separate library of core components and publishing it under a dual GPL/optional commercial license. It will contain hooks for data cleanup and data versioning. )