I have created two apps and I would like to get data from one app to the other.
What is the best way to do this?
-
I could backup to sdcard from app 1 and then get the data from sdcard for app 2
-
(Preferred) Could I open app 2 from app 1 starting it up with Intent with a extra key which gives me back data which I could get from onActivityResult.
How would I go about this?
Is there a better way of transferring data?
The data I want to transfer is data from a sqlite database to another.
You will want to Declare your applications as Content Providers:
http://developer.android.com/guide/topics/providers/content-provider-creating.html
Assign each application the ability to access the internally defined permission for access to said content in each other’s Manifest
Define your own in each Manifest:
Use it in Both:
You can actually have one read from the other as well as write new data to the main Content Provider or even define them both as Content Providers and have them address each other that way.