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 sharedUserId (see IBM MobileFirst Platform simple shared data documentation), same application signing key.

    • Constructor Summary

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

      Methods 
      Modifier and Type Method and Description
      void clearSharedToken(java.lang.String key) 
      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(android.content.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 -
        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 -
        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 -
        Returns:
        shared value or null if not found
      • clearSharedToken

        public void clearSharedToken(java.lang.String key)


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