I have some ideas about running some anti-piracy measures for my app so I wondered if I could do this to sign the application on install. Running the code on first launch is no good, because someone could still copy out the apk without running it.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There is no way to run code on install on Android unfortunately, only run on first launch.
If you're interested in anti-piracy measures you'll find this post on the Android Developers blog about securing the Android License Verification Library interesting, if you haven't read it already.