com.worklight.common
Class WLSimpleDataSharing
- java.lang.Object
-
- com.worklight.common.WLSimpleDataSharing
-
public class WLSimpleDataSharing extends java.lang.ObjectA simple class allowing for sharing and retrieval of shared data among applications on the same device having the same shared user identifier (sharedUserId) and same application signing key.
-
-
Constructor Summary
Constructors Constructor and Description WLSimpleDataSharing(Context context)
-
Method Summary
Methods Modifier and Type Method and Description voidclearSharedToken(java.lang.String key)Retrieve value that has been previously shared by applications on the same device that have the same sharedUserId and signing key and properly set MobileFirst Platform configuration.java.lang.StringgetSharedToken(java.lang.String key)Retrieve value that has been previously shared by applications on the same device that have the same sharedUserId and signing key and properly set MobileFirst Platform configuration.voidsetSharedToken(java.lang.String key, byte[] value)Share key/value pair with other applications on the same device that have the same sharedUserId and signing key and properly set MobileFirst Platform configuration.voidsetSharedToken(java.lang.String key, java.lang.String value)Share key/value pair with other applications on the same device that have the same sharedUserId and signing key and properly set MobileFirst Platform configuration.
-
-
-
Method Detail
-
setSharedToken
public void setSharedToken(java.lang.String key, byte[] value)Share key/value pair with other applications on the same device that have the same sharedUserId and signing key and properly set MobileFirst Platform configuration.- Parameters:
key- unique identifier for the data sharedvalue- null is allowed, and results in deletion of the previously shared value for the passed key
-
setSharedToken
public void setSharedToken(java.lang.String key, java.lang.String value)Share key/value pair with other applications on the same device that have the same sharedUserId and signing key and properly set MobileFirst Platform configuration.- Parameters:
key- unique identifier for the data sharedvalue- null is allowed, and results in deletion of the previously shared value for the passed key
-
getSharedToken
public java.lang.String getSharedToken(java.lang.String key)
Retrieve value that has been previously shared by applications on the same device that have the same sharedUserId and signing key and properly set MobileFirst Platform configuration.- Parameters:
key- unique identifier for the data shared- Returns:
- String object containing the shared value or null if not found
-
clearSharedToken
public void clearSharedToken(java.lang.String key)
Retrieve value that has been previously shared by applications on the same device that have the same sharedUserId and signing key and properly set MobileFirst Platform configuration.- Parameters:
key- unique identifier for the data shared
-
-