Doubts on In App purchase Android

3

I have two doubts in In App purchase ...

First I wanted to know what it would be like to hide the key64 that speaks in the test application that it has in Android Studio, because it is not recommended to leave a String in the same code.

The second is that in the case, I am making a game, and what I could buy, would be the coins, but since it is offline , I can after the purchase is confirmed, simply save in% the new amount of coins?

    
asked by anonymous 06.01.2016 / 15:43

1 answer

0
  

Regarding key64

You should leave the public key base64EncodedPublicKey directly in the code being generated at runtime or retrieve the encrypted form. This is necessary for security measures to prevent an attacker from malicious intent.

  

After purchase

Yes you can save to shared preferences, but it would not be safe. Since if the device has root enabled the user could see and even change the values of shared preferences . Try saving encrypted data or at least saving to SQLite database     

06.12.2016 / 22:41