anjlab/android-inapp-billing-v3 — pull request #17 by razvanws (2014-07-02 00:26:46+00:00)
Title: Fixed the SharedPerferences

There's a bug in the way SharedPreferences are used so that purchases made in one activity don't show up in the second activity.

To reproduce it follow these steps:
1) Create a new app with 2 activities (Activity1, Activity2) where both activities are using the BillingProcessor.
2) Run the first activity (Activity1) where you instantiate BillingProcessor. After the first run, you'll have com.example.app.Activity1.xml preference file created.
3) Now run the second activity (Activity2), instantiate BillingProcessor and make the purchase. In this case, the cache from Activity1 won't get updated with the product id.
4) Run the first activity again (Activity1) and try to find the purchased product. You won't be able to find it.

The fix which seems to work fine for me so far is to use only one SharedPreference file across the app. That is the default one: getPackageName() + "_preferences".