public class WLSimpleDataSharing
extends java.lang.Object
A 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 and Description |
---|
WLSimpleDataSharing(Context context) |
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
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.
|
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.
|
public void setSharedToken(java.lang.String key, byte[] value)
key
- unique identifier for the data sharedvalue
- null is allowed, and results in deletion of the previously shared value for the passed keypublic void setSharedToken(java.lang.String key, java.lang.String value)
key
- unique identifier for the data sharedvalue
- null is allowed, and results in deletion of the previously shared value for the passed keypublic java.lang.String getSharedToken(java.lang.String key)
key
- unique identifier for the data sharedpublic void clearSharedToken(java.lang.String key)
key
- unique identifier for the data shared