GVillani82
GVillani82

Reputation: 17429

Clean sqlite database, from another android application

I developed an Android application that works on sqlite internal db. Now I want create a new android application that clean the database of my first application. What can I do?

Upvotes: 0

Views: 232

Answers (2)

Durairaj Packirisamy
Durairaj Packirisamy

Reputation: 4725

Let the second application send a intent broadcast, after receiving the broadcast, let the first application can clear the data. But any application cannot clear another application's data, even if it is possible, it is not elegant.

Upvotes: 1

Barak
Barak

Reputation: 16393

I believe you can do it if you modify the manifest of both apps to make them share the same data directory.

Add the android:sharedUserId property to the manifest of each app.

android:sharedUserId="your.shared.id" 

If they are the same and you sign them with the same key & alias, each of the appa can use/access the others private directories.

Upvotes: 0

Related Questions