Reputation: 418
I have three android apps: app_1, app_2 and app_3. All are signed with the same key and share the same UID. app_1 and app_3 don't have a persistent storage (no database + file system), they both work on app_2 user space. I have two questions here:
if app_2 dies or shutdown by the system, what will happen to its user space? Can app_1 and app_2 still access to it?
I need a way to notify app_2 when app_1 and app_3 are done with the persistence storage, then app_2 can take some measures. I am not sure if I run a service within app_2 with some event listeners will fit my need. Is there a guaranteed way to make app_2 into a sleep mode and wake-up during events? Any other ways?
Upvotes: 0
Views: 601
Reputation: 909
Your persistent storage in /data/data will remain intact even when the app is not running. It will only be wiped when you removed the app. Also don't hardcode your path because in 4.3 each user will have their own data path.
A broadcast listener will serve this purpose. Declare it in your manifest of app 2.
Upvotes: 1