Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6783629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:53:22+00:00 2026-05-26T16:53:22+00:00

So I would like to make a free app with full functionality loaded in.

  • 0

So I would like to make a free app with full functionality loaded in. The pro functionality will be disabled until the app detects a licensed pro key. And of course I would like to have the pro key check it’s licence using LVL. While I know how to do things right until this point, I don’t know how to make the pro key communicate with the app that it should enable the pro functionality.

Here’s the main app code (com.test.mainapp):

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    context = getApplicationContext();

    final PackageManager pacman = getPackageManager();
    final int signatureMatch = pacman.checkSignatures(getPackageName(),
            "com.test.mainapp_key");

    if (signatureMatch == PackageManager.SIGNATURE_MATCH) {
        Toast.makeText(context, "Pro key detected!", Toast.LENGTH_SHORT)
                .show();
    } else {
        Toast.makeText(context, "Free version", Toast.LENGTH_SHORT).show();
    }
}

While this stops others making fake keys for my app, they still can share the key app online to others and it will work. Because we can’t do the LVL check from another application, I would want the licence key app check it’s own licence and if it’s correct, only then the user gets the pro functionality. How can I have the licence key app and the main app communicate to each other like this?

The functionality I’m trying to get here is like Titanium Backup does, for example.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:53:22+00:00Added an answer on May 26, 2026 at 4:53 pm

    You can send intents between the main app and the key app. If you are using LVL in the key app then an example callback would be:

    private class MyLicenseCheckerCallback implements LicenseCheckerCallback {
        public void allow() {
            Log.i("Key", "License Accepted");
            Intent i = new Intent();
            i.setAction("intent.to.call.on.success");
            i.putExtra("licenseresult", 0);
            c.sendBroadcast(i);
            mChecker.onDestroy();
        }
    
        public void dontAllow() {
            Log.e("Key", "License Denied");
            Intent i = new Intent();
            i.setAction("intent.to.call.on.failure");
            i.putExtra("licenseresult", 1);
            c.sendBroadcast(i);
            mChecker.onDestroy();
        }
    
        public void applicationError(ApplicationErrorCode errorCode) {
            Log.i("Key", "LR Error");
            Intent i = new Intent();
            i.setAction("intent.to.call.on.error");
            i.putExtra("licenseresult", 2);
            c.sendBroadcast(i);
            mChecker.onDestroy();
        }
    }
    

    You would set up broadcast receivers in both apps to initiate the license check and handle the result. e.g.

    public class License extends BroadcastReceiver {
    
    @Override
    public void onReceive(Context context, Intent intent) {
    
        if (intent.getAction().equals("intent.called.to.initiate.request")) {
                    // Initiate the license request here (possibly using a service)
            return;
        }
    }
    
    } 
    

    You should limit access to the intents using certificate based permissions to prevent other apps being able to send spoofed “License Success” intents.

    http://developer.android.com/reference/android/content/BroadcastReceiver.html#Permissions

    Short version.

    Define permission in manifest

    < permission android:name="my.package.LicenseCheck" android:protectionLevel="signature"/> 
    

    Use Permission in receiver declaration:

    <receiver android:name="name.of.your.receiver" android:permission="my.package.LicenseCheck"> 
    <intent-filter>
        <action android:name="name.of.intent"/>
    </intent-filter>
    </receiver>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a free application and would like to make some money by embedding
Would like to make anapplication in Java that will not automatically parse parameters used
I would like to make a simple web app that displays 20 or so
Have a quick question on iAd I would like to create a free app
I would like make an extension method for the generic class A which takes
I would like to make a nightly cron job that fetches my stackoverflow page
I would like to make an ajax call to a different server (same domain
I would like to make a child class that has a method of the
I would like to make a list of remarkable robot simulation environments including advantages
I would like to make the update of the web application as automated as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.