Android Tutorial Protect your Android application with the Licensing library

peacemaker

Expert
Licensed User
Longtime User
Last edited:

luke2012

Well-Known Member
Licensed User
Longtime User
Free version

First of all thanks Erel!

It's possible to protect the same phisical apk published with two different pkg names?

I'm doing a apk with the free and full version using the Package name as identifier.
 

luke2012

Well-Known Member
Licensed User
Longtime User
My target is to publish a "Lite" Version and a "Pro" versione of my app.

I wish to use the same project (phisical files) and publish a package name "my.app.lite" and "my.app.pro" using the same B4A project.
 

luke2012

Well-Known Member
Licensed User
Longtime User
Test case

There is some specific step to reproduce in order to test if the licensing protection is working fine ?

I mean :

Step 1 : Check a
Step 2 : Check b
....
 

ondesic

Active Member
Licensed User
Longtime User
I seem to be having the same problem as before. There doesn't appear to be any local cache being stored. My app will run no problems UNLESS I turn to Airplane Mode. Then it will pop up the message I created "Your Application is not registered", then quits.

From time to time I have users complain of this as well. Most people have a connection at all times and so they don't notice this. However, I'd like to nip this quick. Any suggestions?
 
Last edited:

yttrium

Active Member
Licensed User
Longtime User
Isn't the licensing library service no longer required for >=API16?
https://support.google.com/googleplay/android-developer/answer/186113?hl=en
 

derez

Expert
Licensed User
Longtime User
Protect a purchased file ?

I have not yet published any application in google play and I need an advice.
I'm helping a friend with programming a game with many puzzles. The application will be accessible for free with one set of puzzles, then the next sets (binary files) will have to be purchased through google play.
How do I protect the additional puzzles files from being copied and used by other users ?
Thanks
 

Wembly

Member
Licensed User
Longtime User
Hi - I seem to be having a issue with the new B4A version 3 beta 2 and the use of this library.

Using the following code:

B4X:
Sub Process_Globals
   
    Dim publicKey As String
    publicKey = "MIIBIjANBgkqhki...."
    Dim test_1 As String
...

    If CheckConnection = True Then
   
        lc.Initialize("lc", GetDeviceId, publicKey, "kljdflkf".GetBytes("UTF8"))
        lc.SetVariableAndValue("test_1", "test value")
        lc.CheckAccess
       
        If test_1 <> "test value" Then Activity.finish
    End If

I now get the following error in debug:


Please can anyone advise as why this is happening?

Thanks.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…