So I have a problem, we want to be able to sell our Android application on our site AND on the Android market. If we just stick the .apk file on our site and let people download it after they have paid for it, how do we prevent them from just giving htat .apk file to a friend? I have been searching goolge all morning for a solution. I just want someway to be able to protect our application from being installed on more then one device.
So if you get it, install it on your phone, then give it to a friend friend, it would stop him/her and display some error.
First idea: provide an unlock code based on IMEI encryption on your website.
When people buy the app on your website, they will have to enter a code at the app launch. The app will compare the uncrypted number to the phone IMEI.
So if people A with IMEI B share the app to people with IMEI C, the app won’t work.
EDIT: read this great post to get a unique number for an Android device: Is there a unique Android device ID?
You can also try
Settings.Secure#ANDROID_IDreturns the Android ID as an unique 64-bit hex string.but It’s known to be null sometimes, it’s documented as “can change upon factory reset”. Use at your own risk, and it can be easily changed on a rooted phone.
The weakest part will now be the Market, that’s really easy to share and copy it.