-->

To protect the apk

2020-05-01 09:31发布

问题:

I have developed one application and created the apk.Now I want to avoid the piracy of that application means if I have installed the apk on my device and if i am trying to install same apk on another device then it should not be get installed on another device. Is there any way to do it ?

回答1:

well what you are looking for is personalized APK, means for each device you have to build once APK and in that you need to put logic that the APK can be installed on only one device; So to do that you can give one NUMBER in APK and after installation you can call a webservice to store that NUMBER in cloud database.

After every installation you need to do two things...

Query database using Webservice that perticular number is already store on clooud if yes then set a flag which never allow user to see the application data again...

If now found store that on server.

THis is just logic you need to think WHY YOU NEED UNIQUE APK FOR EVERY DEVICE?

If you want to do without Webservice and cloud DB you can use GetDeviceId() it returns the unique device ID, for example, the IMEI for GSM and the MEID for CDMA phones. Return null if device ID is not available.

So in your APK you need to check IF XYZ == GetDeviceId() Result then allow user to access the APPS; else write message that you are not authorise to view this.

For this you need to build APK after inquiring your USER about their DeviceID()