While doing some work to create a second version of an Android application, I got hit with log errors that said my application database was not accessible. In fact, all data was not available to the application. After some digging, I found the following 2 issues relating to this problem.
- Issue #3763 If you decide to change the sharedUserId value, application will not have access to its data.
- Issue #1227 If you add sharedUserId to your application when it was not there before.
So the short answer is, I have to write content providers to get the data from the old version to the new one. I was hoping to just copy the application files but of course, the simple route is blocked.
The lesson to be learned is that the sharedUserId value should ALWAYS be set on an application. That way you have the choice of creating an upgrade, pro, paid, etc version of your application. Otherwise you will have to spend time creating content providers to copy the information over since you won’t be able to share the information.
Posted under Android
This post was written by robert.casto on August 20, 2010







