AESObfuscator for Android Licensing -
i'm using aesobfuscator in servermanagedpolicy android licensing. until now, i've created deviceid this:
string deviceid = secure.getstring( getcontentresolver(), secure.android_id );
in examples on internet done this, stated isn't safe, no other way described. have read android_id can changed or can null, want have way unique id. licensing failed more once has bought app , i'm quite sure has this, otherwise can problem google, doubt.
so how can this? create random hash , add deviceid (and of course store somewhere..?)
what mean 'safe'? it's matter of obfuscating preferences make harder edit on rooted device. android_id can change if reset device (delete data), or if edits on rooted device. first case not problem, in second, won't able decrypt(de-obfuscate) stored preferences, treat error. if null, should think of sort of fallback value.
the point here not have unique id, use device-specific data obfuscate preferences, cannot copy them device. use hash of imei, wifi adapter mac address or else device specific, have handle case of particular property not being available (e.g., wifi-only tablets don't have imei, etc.)
use error reporting library such acra or bugsense track actual errors , understand real cause behind licensing failing. it's google infrastructure's fault, should try handle (cache licensing status, etc.)
Comments
Post a Comment