Questions on In App Purchase Android

Asked

Viewed 66 times

3

I have two questions on In App Purchase...

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

The second is that in this case, I’m playing a game, and what I could buy would be the coins, but as it is offline, can after confirmed purchase, simply save on Shared Preferences the new amount of coins?

1 answer

0

In relation to key64

You must leave the public key base64EncodedPublicKey directly into the code being generated at runtime or retrieves it in encrypted form. This is required by security measures to prevent a malicious attacker from discovering.

After purchase

Yes you can save in Shared preferences, but it would not be safe. Since if the device has the root released the user could see and even change the values of Shared preferences. Try to save the data encrypted or at least save to a database in the Sqlite

Browser other questions tagged

You are not signed in. Login or sign up in order to post.