保护apk [英] To protect the apk

查看:19
本文介绍了保护apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个应用程序并创建了 apk.现在我想避免该应用程序的盗版意味着如果我在我的设备上安装了 apk 并且我试图在另一台设备上安装相同的 apk 那么它不应该是安装在另一台设备上.有什么办法吗?

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 ?

推荐答案

嗯,你要找的是个性化的 APK,这意味着你必须为每个设备构建一次 APK,并且你需要放置 APK 可以是的逻辑仅安装在一台设备上;为此,您可以在 APK 中提供一个 NUMBER,安装后您可以调用网络服务将该 NUMBER 存储在云数据库中.

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...

使用 Web 服务查询特定号码已存储在云上的数据库,如果是,则设置一个标志,不允许用户再次查看应用程序数据...

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.

这只是逻辑您需要思考为什么每个设备都需要唯一的 APK?

如果您不想使用 Web 服务和云数据库,您可以使用 GetDeviceId() 它返回唯一的设备 ID,例如,GSM 的 IMEI 和 CDMA 手机的 MEID.如果设备 ID 不可用,则返回 null.

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.

因此,在您的 APK 中,您需要检查 IF XYZ == GetDeviceId() Result 然后允许用户访问该应用程序;否则写下您无权查看此内容的消息.

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.

为此,您需要在向您的 USER 询问他们的 DeviceID() 后构建 APK

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

这篇关于保护apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆