com.worklight.common

Class WLSimpleDataSharing

  • java.lang.Object
    • com.worklight.common.WLSimpleDataSharing


  • 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 Summary

      Constructors 
      Constructor and Description
      WLSimpleDataSharing(Context context) 
    • Method Summary

      Methods 
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WLSimpleDataSharing

        public WLSimpleDataSharing(Context context)
    • 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 shared
        value - 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 shared
        value - 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


© Copyright IBM Corp. 2006, 2015. All Rights Reserved.