I have a suite of Cordova-based apps that have the need to store data in a spot outside of the app's sandbox so other apps can read it.
I've taken a look at two plugins, cordova-plugin-secure-storage and cordova-plugin-ios-keychain. Neither explicitly mention that the storage being used can be accessed outside of the running app's scope.
I've tried my luck with cordova-plugin-secure-storage and was not able to share between two apps on Android; even though the store had the same name, the keys differed between the apps. That's OK -- I can store the file externally on Android.
My question is, am I wasting my time looking into keychain plugins to cover iOS? If so, any suggestions, or easier implementations?
Related
So I'm currently developing a suite of apps with the intention of being able to sign in on of them and be logged in on all of them. I read I could give them all a common SharedUserID in their respective app manifests and then they'd be able to access each other's data. However, the SharedUserID seems to make no difference; I just get a file not found error when I try to access data saved from another app.
Should I expect internal storage to just be shared between the apps by default or do I need to specifically navigate to some kind of "shared folder" when reading/writing?
Most of the material I've read about shared user IDs has been from people developing specifically for Android, but I'm developing native modules under react native and I'm not sure if that will have an effect or not. Has anyone tried anything like this?
Note: These apps are being developed from scratch, I'm NOT trying to add a sharedUserId to an existing app.
I have several applications built on the same engine. This engine is storing data in SQLite. The database structure is the same for all applications. I need to organize a common storage for all these applications.
For example, there is an application A and B. First user installed the application A and added data, then installed the application B and this is necessary to synchronize databases of those two apps. Using a function of Content Providers will not work because in this case application B will not work without the application A. And also we will not know which application user installs first.
There is an idea to synchronize the database of all applications and each application will remain with its own database, but then I will have a copy of the databases. Means as many apps are installed as many copies of databases I will have.
Perhaps there is some kind of a neat way to realize the idea?
Why don't you try using "sharedUserId" across all your apps. With this you can access the data of the other apps as well.
Assuming you already know all the your others apps, on first load of every application you start searching for a common folder where you create your database. This folder can be in your sdcard. If you find the DB file there then you can open it and use it. Otherwise you create one. Then use the same database across all apps?
I'm not sure what are the implications of opening/writing to the same DB from various apps. Maybe you need to figure out a way for locking mechanism during writes (Maybe create a .lock file when writing to the DB?)
I encountered myself same design problem (multiple apps using same engine contains persistent SQLite database tables, Services, and tons of logic).
after I did my own research, I afraid that the conclusion was that the only way doing that is: doing that in Googles's way:
Google Play Services is a process that google made up exactly to solve this problem for their own scenario - engine that should be always available to all apps (including thier own). that's mean that it's an independent application that exposes it services and content providers to all apps.
Google force Google Play Services installation seamlessly in background via Google Play store app. that's a privilege that no other app can have, because they controlling both apps, and the OS Android itself (not fair!)
so, if you can force your users to download dedicated application only for your engine (like Google do) - that's great!
if not - then you will have to settle until then with a Master/primary app that must be installed, and it's the only one the exposing the data and services to all other.
You can store the database on the external storage and access it from all of your applications (Use getExternalStorageDirectory).
Use the openOrCreateDatabase method of the SQLiteDatabase class to access it and read/write data from it.
Since accessing from multiple processes can cause locks, I suggest you manage that yourself using a file with the name/packagename of the locking application so you can sync the data access between your applications.
good morning,
how can i do a SSO valid between my 3 apps.
i have 3 apps that should be installed on same phone. like google apps or facebook
and if i'm logged on one of them then other apps bypass the auth part.
i'm looking for good practices
thanks for advices.
By default android runs each app on separated sandbox so apps can not access data from other apps. But you can run as many apps as you like under the same sandbox. In that case you can access any data from other apps (database, files, etc.)
This is only one way of sharing data and not the preferred way BTW. Another approached that highly encourage by android team is to create content providers and allow controlled access to other applications in platform. This is exactly the way you are accessing users contact database in android for example.
I don't explain how to do it here. there are plenty of resources on internet and several well explained youtube videos.
I just wanna implement this Storage Access Framework in my app.
Could anyone please help help me to find out tutorials, or sample app ?
I really have no idea about Storage Access Framework, and not able to understand the tutorial. please some one help me.. I am very beginner.
Many mobile users who regularly access their files across multiple devices have found that relying on cloud storage just makes life simpler, but many of us don't keep our files stored in just one place. Now Android 4.4 is rolling out a new way to open files within apps that makes accessing all of these providers both easier and prettier. With KitKat's new storage access framework, apps that prompt users to browse for files will open a sidebar navigation menu that lists recent files, available cloud storage providers, and files stored internally.
This new system is far more attractive than the popup window Android apps currently toss up, and it provides a more intuitive experience. Users won't have to enter what appears to be a separate app to load a file. Now, regardless of whether they're pulling data from Dropbox, Google Drive, or their local gallery, they will be presented with a consistent experience.
More Info
I've never made a game for a mobile so I'm not really sure what the proper convention for level info is. Basically I'm thinking that I include an xml file that I add to local diskspace for the app then load the level details (item positions, etc) from that xml file, this way when I have to update the game, add more levels, I only have the users download a small xml file. Is this method secure or are there other ways of doing this?
The security features on the BlackBerry can be pretty complicated, check out the second half of this article for a good summary of the various security features available:
http://programming4.us/mobile/2694.aspx
Here are some official BlackBerry docs on the topic too:
http://docs.blackberry.com/en/smartphone_users/deliverables/1487/Security_26381_11.jsp
FYI, most of this information concentrates on protecting data from unauthorized users, or from other malicious apps. Personally I wouldn't be too concerned about a sophisticated hacker changing my XML, unless I was giving away prizes for achievements!
Regarding file access:
Every Android App runs in it's own sandboxed environment with it's own system username. Data downloaded or residing in it's directory can not be read from other apps.
Google Developers on Security is worth reading.
In code, you can easily use
this.getFilesDir()
From within an activity subclass.
If a device is rooted or someone uses the adb shell from the sdk to access the app data directory, of course, he will be able to manipulate it, I assume.