B4A Library Licensing library

This library allows you to use the market services to protect your application.
See the tutorial for more information: http://www.b4x.com/forum/basic4andr...ur-android-application-licensing-library.html
The documentation is available here: Basic4android - Licensing

Installation instructions:
- Unzip the attached file and copy Licensing.jar and Licensing.xml to the internal libraries folder (default): C:\Program Files\Anywhere Software\Basic4android\Libraries

V1.21 - Adds protection from NullPointerException error reported.
V1.20 - Fixes an issue related to Android 5.
 

Attachments

  • Licensing.zip
    34.3 KB · Views: 973
Last edited:

peacemaker

Expert
Licensed User
Longtime User
Ready !?!
Suuper !
 

straybullet

Member
Licensed User
Longtime User
I'm really having issues, maybe its me but I followed the tutorial, I get licensed passed, when it should be. It is set in my console to NOT_LICENSED, but it still allows every account I tried to run my app.

My code is too big to paste here, but I will gladly export it to a zip if Erel can look at it
 

eps

Expert
Licensed User
Longtime User
I'm really having issues, maybe its me but I followed the tutorial, I get licensed passed, when it should be. It is set in my console to NOT_LICENSED, but it still allows every account I tried to run my app.

My code is too big to paste here, but I will gladly export it to a zip if Erel can look at it

Not really the right area to post a Q about this, but... Have you read through the documentation, in the link in the top post?

Have you put the 3 called subs in your code? Plus associated code, from within the example? I just copied these in and they get called... it seems to work for me.

Sub lc_Allow

Sub lc_DontAllow

Sub lc_Error (ErrorCode As String)
 

straybullet

Member
Licensed User
Longtime User
Yes I have all the subs, I thought this was about the licensing library which others have posted issues with as well.

Anyways I have followed what I thought was the tutorial to do this and the directions, but I could have missed something, just seems odd that the applications are reported as LICENSED when the console I set to NOT_LICENSED.
 

eps

Expert
Licensed User
Longtime User
Okay... Just checking as you didn't post any code.

There are 2 scenarios.

1) test, you test the licensing part to ensure that it works. The App hasn't been purchased from the Market, otherwise it's 2) and should pass licensing as expected... If you are testing tyou have to realise that it will store a local key and if you indicated licensed then it will temporarily allow use of the App, otherwise if a licensed user didn't have an interner connectionit would halt their use of the App.. I think you have this scenario. You should read the other thread and set and save the test console response to unlicensed, save this and wait some time, poss up to 1hr. But in the meantime clear the App cache on the phone and then restart the phone. Now try your App... It should disallow use.

2) App has been purchased or downloaded from the Market, in this case the App is licensed to be used. So the test console response will not apply.

The two are quite separate..
 

JonPM

Well-Known Member
Licensed User
Longtime User
Just wondering, if you use this library is there any way to tell if there are unauthorized attempts to access your apps? I mean are there any notifications of unauthorized users trying to use your (pirated) app?
 

metrick

Active Member
Licensed User
Longtime User
I have updated my app with license library, the app keeped closing application right after launched if wifi / internet accesed disable. when internet acces is on the app launched and close right after, only after several attemps the app will work. Anybody have the same issues?
 

metrick

Active Member
Licensed User
Longtime User
Erel:
I did show a message "Closing App" at DontAllow event.
This raise question; if user purchased my App can they use the App without internet access? I can't see to launch the App at all without internet accessed.
I still would like the App to work for user without data plan.
What is the best way to handle user without data plan?
Does the Lib has the building functions to check for licensing when user is back on wifi/internet?
 
Last edited:

Falco32

Member
Licensed User
Longtime User
Binding to licensing service.

i have problems with google licensechecker on some devices
most it works but on some devices i become this error message
after start the license check

-->
Binding to licensing service.
Could not bind to service.


have you any solution for this ?
 

Informatix

Expert
Licensed User
Longtime User
I have a problem with this library. As I check the license in all activities (since the first screen of my app can be any activity), I put the code in a code module to avoid repeating it. But I have an exception occuring because the "allow" sub is not found (even when I set the EventName to an empty string). I don't have any use of this event and I cannot place its handler in a code module, so how can I get rid of it?
 
Last edited:
Top