Search code examples
apache-flexactionscript-3blackberry-playbook

Communication between 2 Flex Playbook Applications


The overall aim of my project is to communicate between two Playbook flex applications. I found this article and tried it out:

http://supportforums.blackberry.com/t5/tkb/articleprintpage/tkb-id/tablet@tkb/article-id/20

Application 1 (Called 'App1')

var folder:File = File.applicationStorageDirectory.resolvePath("shared/misc");
folder.createDirectory();
employeeDB = File.applicationStorageDirectory.resolvePath('shared/misc/employee.db');

Application 2 (Called 'App2')

How do I access employee.db? I have tried the following which didn't work

employeeDB = File.applicationStorageDirectory.resolvePath('App1/shared/misc/employee.db');

and

employeeDB = File.applicationStorageDirectory.resolvePath('shared/misc/employee.db');

No luck, any ideas?

Answer

employeeDB = File.documentsDirectory.resolvePath('employee.db');

On both apps...


Solution

  • The applications are sandboxed. You cannot communicate with them in this way. The application storage directory is unique per application (and each application's storage directory is available only to that application).

    Here is a forum post that explains some details of the sandboxing: http://www.blackberryplaybookforum.com/playbook-developers-area/43-playbook-application-file-system-layout-file-structure.html