简体   繁体   中英

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...

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM