Basically on upgrade move the data to the same DB and let say,if you add
new filed in your sqlite, just update the version of the DB that helps in
retaining the old data.


On Wed, Dec 4, 2013 at 3:45 AM, Streets Of Boston
<flyingdutc...@gmail.com>wrote:

> If your updated APK has its own SQLite database and your app uses a
> sub-class of SQLiteOpenHelper, you could increase your database version
> each time your update your app (increase version value in SQLiteOpenHelper
> constructor) and implement that sub-class' onUpgrade method to clear out
> data (e.g. delete files or caches, etc).
>
>
> http://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html
>
> Note that your implementing the onUpgrade is mainly meant to upgrade the
> SQLite database(s) of your app, but you could do other stuff as well, such
> as deleting files, clearing SharedPreferences, etc.
>
>
> On Monday, December 2, 2013 7:03:58 AM UTC-5, Cayce wrote:
>>
>> This is making me crazy. I'm having an app built that is initially
>> downloaded as an empty carrier for different regions of data. The person
>> using the app will then choose the region/data to be purchased, make that
>> in-app purchase, and the region/data loads into the app shell. I have to
>> test each updated APK by going through the process of purchasing a region
>> of data. The problem is that even after deleting the previous install of
>> the previous APK, the newly updated APK shows the previous APK's purchases.
>>
>> The only way I've been able to work around this is to create a whole new
>> GMail account with each updated APK, delete the previous accounts on my
>> testing devices, and start over. Aside from the time consuming process this
>> entails, Google requires telephone (voice or text) verification of each
>> newly created GMail account, and only allows one phone number to be used a
>> certain number of times before it won't allow that number any longer. It's
>> about 5 times, I think. I've run out of phone numbers.
>>
>> The question: How are other developers dealing with this? How can I purge
>> the data from a previously installed APK? The data isn't in the device,
>> because I did a factory reset this morning thinking I would just do that
>> each time, reloaded a new APK, and the previous in-app purchases showed up.
>>
>> Any help would be appreciated.
>>
>> Thanks.
>>
>> Cayce
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Warm Regards,
*Mukesh Kumar*,
Android Consultant/Freelancer,
India,Hyderabad.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to