Enable the Simple Data Sharing feature for Android native applications
Update Android native applications to enable the Simple Data Sharing feature.
For more information about how to develop Android native applications, see Develop native applications for Android.
To enable simple data sharing, we modify the Android native application.
- Enable the Simple Data Sharing option by specifying the application family name as the android:sharedUserId element in the manifest tag of the Android manifest file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myApp1" android:versionCode="1" android:versionName="1.0" android:sharedUserId="com.myGroup1">The sharedUserId is equivalent to the wlAppFamily name.Enabling or changing the MobileFirst application family settings require prior Android applications to be uninstalled. Upgrading an application that modified its sharedUserId is not allowed by the Android operating system for security reasons.
- Ensure that applications that are part of the same family are signed by the same signing credentials.
- Uninstall any prior versions of the applications that did not specify a sharedUserId or that used a different sharedUserId.
- Install the application on the device.
- Repeat the steps for all applications to make part of the same application family.
Results
We can now use the native Simple Data Sharing APIs provided to share simple strings among the group of applications in the same family. See Simple Data Sharing Java APIs in the WLSimpleDataSharing class.
Parent topic: Enable the Simple Data Sharing feature