Reputation: 7014
I have two different application 1. databaseSetup Application -- database.apk 2. Sales Application -- salesApp.apk
I am having like this because of if the database corrupted, need to reinstall database only. Don't need to install the application that time.
Package for databaseSetup application
/data/data/com.xont.app/databases/
Package for Sales Application - com.xont.controller
I want access the Database from different package.That means sales aapplication package is com.xont.controller
& database package is /data/data/com.xont.app/databases/
.
Is it possible to access this folder different application?
For that question I got link from one of my friend Click
In there i couldn't understand the share a user ID and are signed by the same signing key.
What is the User ID & Sining Key?
Please anybody tell me what is the UserID, SingingKey? & how can I share both?
Please help me this...
Thanks in advance...
Upvotes: 3
Views: 1257
Reputation: 109257
Yes, you can access folder from different application, If both application sign by same signature key and both have a same User ID.
now for user ID and Signature key,
At install time, Android gives each package a distinct Linux user ID. The identity remains constant for the duration of the package's life on that device. On a different device, the same package may have a different UID; what matters is that each package has a distinct UID on a given device.
You can use the sharedUserId attribute in the AndroidManifest.xml's manifest tag of each package to have them assigned the same user ID.
IF possible put your database file in local databse directory, or in sdcard then you can access from any application. But its on the security concern of database.
Upvotes: 3
Reputation: 1366
If you are directly trying to access the given database from it's current location, it might not work, because of the administrative rights on the file. What you can try is to copy the file from the current location to the local databases
folder in the app, and then try working on the same.
Upvotes: 2