| So to sum up this PoC. Results If a user wishes to implement this on their Android or iOS device then they need to do the following: Android In their config.xml file, they need to add the following to the 'widget' at the beginning:
xmlns:android="http://schemas.android.com/apk/res/android"
|
and then after `platform name="android"`
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest"> |
<manifest android:sharedUserId="PACKAGE_NAME" /> |
</edit-config>
|
while obviously replacing PACKAGE_NAME with their domain/package name. They then need to use the package (1) linked below to access the content provider to use the shared files. This should be configured appropriately. iOS Currently, it does not look like there is a mapping for the app group property in cordova. This means that the user will need to build the application first and then manually add the app group in XCode as shown in (2). Once this is done, they will then need to create (or use an existing) Cordova plugin to access data saved in this shared app name space. An example of a plugin which can be used to do this can be seen in (3). Resources (1) https://github.com/phearme/cordova-ContentProviderPlugin (2) https://www.atomicbird.com/blog/sharing-with-app-extensions (3) https://github.com/protonet/cordova-plugin-nsuserdefaults-for-app-groups |