Store redux data that can be accessible with swift and java - javascript

I want to rewrite my React Native application with Java for Android and Swift for iOS. The thing is, I don't want to lose application data so that the user has to set up the application again.
Imagine we're on version 2.0.0 (Written in RN) and version 3.0.0 is written in Java and Swift. I want to store my redux store somewhere so that I can retrieve that on the native side and after the user updates the app.
I found this library to store app data into a .plist file that can be accessed with Swift later on. I don't know if that's the right way for iOS and also I have no clue of what should I do for Android side.
Note that I can't get the config file from the network and I'm using redux-persist to persist the data for my app.
Any help would be appreciated.

I guess you can integrate a minimum react native module within your new native apps, and make it provide a data migration path for your existing customers. Not sure how you will solve this with a decent UX though.
https://reactnative.dev/docs/integration-with-existing-apps

Related

connect react.js to Google Collab

I want to make a simple image classification app such that the training/classification is done in a Python script. I want to create a web app for it (preferably in React.js) where the user can select parameters or the activation function etc.
To link the front-end with backend, I was planning to use the flaskAPI. However, since the training data could be large, I wanted to use GoogleColab for the ML/Python part. Is it possible to run my front-end such that it's linked to Google Colab? I couldn't find any relevant examples.
Here's an example using Flask.
https://colab.research.google.com/drive/1F-b8Vv_jaThi55_z0VLYLw3DDVnPYZMp
Here is a simple, step-by-step demo of how to build a Python-Flask application, host it in Google Colab and then access it from the public internet ( using a public URL) using NGROK tunnels. The demo is available in GitHub Repository. The first five apps have no machine learning component but demonstrate basic input-output abilities. There are two machine learning apps, one with linear regression and one with decision tree that is used for Image Classification. While we do not use React.js we do address the issue of accessing a ML model through a web API. Do note that the ML models have to built separately and should be available for loading into the Colab VM either from Google Drive ( as in this case) or from/through some other mechanism.

Access data from webView in cordova/android

I have following situation and didn't find the answer to my question in my searches. I am sorry if I overlooked something.
I am using cordova for an android app. This app isn't more than an existing web page/web application repackaged as an android app. This web application gets data using existing and working api calls in form of http requests.
All good, but this data is only available online. I need to build a local database in android to have the data available offline as well.
Question: How do I access this data and put it into an Activity?
Thank you in advance
You can use localStorage to do that.
https://cordova.apache.org/docs/en/latest/cordova/storage/storage.html
If you want to save a json than you will have to stringify it first.

Synchronization between mysql and IndexedDB

I like to develop an Desktop App using nw.js (node-webkit) or Electron.
I am looking for a solution to sync between IndexedDB and MySQL Server + PHP(Laravel) on the cloud via Restful API.
PouchDB look good but that is out of option because it only support to sync with CouchDB.
What option do I have?
It's possible with dexie but not as complete as you get with pouchdb. The closest you come to a complete solution with dexie is using the Dexie.Syncable addon (https://github.com/dfahlander/Dexie.js/wiki/Dexie.Syncable.js) (not yet stable) and implement the backend from the following 2 backend sample implementations:
https://github.com/dfahlander/Dexie.js/tree/master/samples/remote-sync/
If you don't want to rely on Dexie.syncable, another solution would be to build your own sync addon based on the stable CRUD hooks that Dexie provides in it's default api:
https://github.com/dfahlander/Dexie.js/wiki/Table.hook(%27creating%27)
https://github.com/dfahlander/Dexie.js/wiki/Table.hook(%27updating%27)
https://github.com/dfahlander/Dexie.js/wiki/Table.hook(%27deleting%27)
Using those hooks, may log all local changes to a dedicated table for syncing with server when it goes online. This is what Dexie.Syncable is based on.

Storing data while processing an app through phonegap

I am using the Phonegap platform for developing an app and this runs on nexus 5 android 4.
The app is having a user interface through which it takes input from the user and processes it using the Javascript. My question is: Can I store/capture this data somewhere so that I can utilize it later. The utility can be sending the captured data to another server and getting a response from it for the specific data.
What is the best architectural way to accomplish this? Any thoughts highly appreciated.
There are many options to do this, IndexedDB, SQLite, localStorage, sessionStorage which are all HTML5 standards.
You might even be able to use XML file storage to do this.
Its your preference on what works best for you.

Dynamically changing mobile server from meteor phonegap application

I have one meteor 1.0 phonegap application and several meteor servers.
According to the documentation, one can specify the server while building a phongeap cordova application https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration
What I want to do is to set some default server and allow the users of the phonegap application to change the server from the application. How can I do it?
#MeteorAtSO I think the loadbalancer will do for you
The solution for this problem was the following:
I created a package which must be loaded before any other package and which tries to read server address from localStorage. If an address is found there the package sets __meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL = "theValueFromLocalStorage"
Which results in that the other packages start to refer to the new server the same way as if it was set initially when building the application
The package can be found here https://github.com/partus/meteor-server-picker

Categories

Resources