Reputation: 3277
I want to insert
or delete
the values in another android applications database from my current android application.
I searched a lot. Everybody saying that use "content provider
" its not used with two applications all used with in a application.
Upvotes: 1
Views: 18882
Reputation: 1847
Assuming that you have a database and a content provider in your application.... You can use the database of other application if it is exported. To export your database you just need to set the value of android:exported attribute of Provider tag to true in android.manifest file
<provider
android:exported="true"
android:name="<content provider>"
android:authorities="<content provider authority>" >
</provider>
In the other application's Android.Manifest file provide the permission to access the content provider.
see the links below for more informationContent Providers and Using Content Providers
Upvotes: 2
Reputation: 27549
here i found some examples/tutorial for you, Please have a look , below tuts include everything you can do to create content provider.
Android Fundamentals: Working With Content Providers .
Upvotes: 4