1

I have one more doubt with RuntimeStore. I am able to exchange strings using RuntimeStore. But i want object also to be exchanged.

Example: 3 independent applications are there A, B, C. A creates an object of C an share it with B using RuntimeStore, and then B will use the same object and invoke the methods or data of C.

Can we do something like this using RuntimeStore. I couldn't find it. If you have any idea please share them with me. Thanks.

3 Answers 3

1

The Runtime Store can be used for inter-application communication. As long as your two applications maintain the same data schema you shouldn't have a problem allowing for upgrades.

There is an example at the link that should help you get it going.

1
  • Hi jprofitt, got the response, but i have some more doubts, i have edited my question and waiting for some more comments. Thnks.
    – Sameer
    Jun 9, 2011 at 6:58
0

Runtime store can be used to exchange data. It would be better if we can know when is the data exchanged as well. You could use GlobalEventListener or Notification Manager for this purpose. Using these, you can express interest to receive certain types of events and register a listener [the same way as action listener on a button]. And when such an event occurs you could read the data from Runtime Store. But callback of Global Event Listener itself can accomodate the data exchange as well.

Hope it helps.!

Here is an example for you to check out. Actually, this is an honest example of IPC that really answers your question. You might also want to consider the security of the data you are supposedly exchanging.

3
  • Hi kiran, got the response, but i have some more doubts, i have edited my question and waiting for some more comments. Thnks.
    – Sameer
    Jun 9, 2011 at 6:58
  • Thanks kiran.. I have one more doubt with RuntimeStore. I am able to exchange strings using RuntimeStore. But i want object also to be exchanged.
    – Sameer
    Jun 13, 2011 at 12:11
  • Example: 3 independent applications are there A, B, C. A creates an object of C an share it with B using RuntimeStore, and then B will use the same object and invoke the methods or data of C. Can we do something like this?
    – Sameer
    Jun 13, 2011 at 12:11
0

I am not sure what is your intention and objective. Let me present you with different scenarios and provide plausible solutions.

  1. There exists a 3rd party application A and you are authoring application B. Now your application is interested in invoking some services of A or some protected /sensitive/personal features. If this is the case, you could use specific and pre defined and well known permissions that are defined here and then ask system to provide you with those permissions. System in turn asks the user that application B is requesting permission for a list of operations. A UI is presented to user to request permissions. If user grants them, your application will in-turn be granted; else your application will be denied permission.
  2. You are the sole author two applications A and B and have complete control over both the applications. Your objective here is to exchange some data securely, even in presence of other rogue applications that can sniff data. In this case, you could use Application Manager's postGlobal event and Global Event Listener to signal when exactly to exchange the data. Now, you can use RuntimeStore to exchange data; in order to put security in this exchange, you could sign the data with your keys and place it in runtime store. Only the other entities that can provide credentials will be granted access to your data on run time store. This is called controlled access to private data

    RuntimeStore.put( MY_DATA_ID, new ControlledAccess( myHashtable, codeSigningKey ) ); // in application A

    Hashtable myHashtable = (Hashtable) RuntimeStore.get( MY_DATA_ID, codeSigningKey ); // in Application B

  3. The notification between applications A and B can also facilitated by Notifications Manager.

So, let us know what exactly is you are trying to accomplish. We can accordingly direct you to code examples.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.