hi,
this is my 3rd lib. with this lib you can check if your app was downloaded from the google play store or the amazon store or from NO store and do what ever you want (like close the app or turn on self destruction )
now you can easily catch people that have bought your app, backed-up the apk, uninstalled it and get a refund. so no more working for free
note that it is not a 100% protection but at least it will be a little bit harder for people to use your paid apps for free.
the lib is very simple:
Step 1, we intialize the lib (store_check) in activity_create like this:
then we just check if app was downloaded from the store like this:
you may also do it (if you like) only if "Firsttime = True".
I have not tested it on an amazon app, only on google play app and it worked see attached pictures
Pic1 = installed from my PC
Pic2 = installed from Google Play
If you find any bugs please let me know, and if you like to donate me a small (or big) amount i would be very happy.
PS: Please make some tests before you update all your apps, i dont know if there is a minimum SDK or anything else so you use this lib on your own risk
EDIT:
Version 1.01
Version 1.02 (Bug fixed)
Version 1.03 (after @Erel has explained how to compile a code module it is now working correctly)
New Method: Check any peckagename (app) if it is installed from the Store
COMPLETE CODE MODULE: https://www.b4x.com/android/forum/t...e-play-or-amazon-lib.65377/page-2#post-414562
I also want to thank to @JordiCP and to @DonManfred
this is my 3rd lib. with this lib you can check if your app was downloaded from the google play store or the amazon store or from NO store and do what ever you want (like close the app or turn on self destruction )
now you can easily catch people that have bought your app, backed-up the apk, uninstalled it and get a refund. so no more working for free
note that it is not a 100% protection but at least it will be a little bit harder for people to use your paid apps for free.
the lib is very simple:
Step 1, we intialize the lib (store_check) in activity_create like this:
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Intialize
Dim check As store_check
check.Initialize
'......
then we just check if app was downloaded from the store like this:
B4X:
If check.notfromGoogle Then Log("this app was NOT downloaded from the google play store") Else Log("check ok or unknow")
you may also do it (if you like) only if "Firsttime = True".
I have not tested it on an amazon app, only on google play app and it worked see attached pictures
Pic1 = installed from my PC
Pic2 = installed from Google Play
If you find any bugs please let me know, and if you like to donate me a small (or big) amount i would be very happy.
PS: Please make some tests before you update all your apps, i dont know if there is a minimum SDK or anything else so you use this lib on your own risk
EDIT:
Version 1.02 (Bug fixed)
Version 1.03 (after @Erel has explained how to compile a code module it is now working correctly)
New Method: Check any peckagename (app) if it is installed from the Store
B4X:
If check.notfromGoogle2("com.android.gallery") Then Log("this app was NOT downloaded from the google play store") Else Log("check ok or unknow")
COMPLETE CODE MODULE: https://www.b4x.com/android/forum/t...e-play-or-amazon-lib.65377/page-2#post-414562
I also want to thank to @JordiCP and to @DonManfred
Attachments
Last edited: