Search code examples
androidadmobsharedpreferencesrootinterstitial

Save Interstitial ad with award in shared preferences


Is it secure to save the award of an Interstitial ad in the Shared Preferences, (because users with root permission are able to edit them), if not how should I save the amount of the prize?


Solution

  • Well, ofcourse the sharedpreferences file could be accessed/modified if you're a root user. Your options are:

    1. Store the award-data in the servers. Don't store it locally.
    2. Use encryption in sharedpreferences. But here, you must note that sharedprefs are not build to be secure, they're just there to store some data for your ease.

    Checkout this git repo which provides a sharedprefs wrapper to encrypt the keys and values.