dynamic-key

Use other apps as a key to unlock features in the primary app on Android.

APACHE-2.0 License

Stars
4
Committers
1

Dynamic Key

A library to use other apps as a key to unlock features in the primary app on Android 4.0 (API 14) and above.

It uses AndroidX so, first migrate your project to AndroidX. It is dependent on Java 8 due to the dependency on Dynamic Utils. Since v1.1.1, it is targeting Java 17 to provide maximum compatibility. Since v1.2.0, the minimum SDK is Android 4.4 (API 19) to comply with the latest policies.


Contents


Installation

It can be installed by adding the following dependency to your build.gradle file:

dependencies {
    // For AndroidX enabled projects.
    implementation 'com.pranavpandey.android:dynamic-key:1.2.0'
}

Usage

It provides an activity and a receiver to implement a dynamic key that can unlock features in other (client) apps. It has utility methods to validate a key at runtime within the supported apps, so they must be signed with the same signatures to validate an installed key on the device.

For a complete reference, please read the documentation.

Broadcast

Broadcast the key event on successful validation to notify key apps so that they can do the required work. In most cases, it should hide the icon from the app launcher.

// Broadcast the activate intent from the client app.
DynamicKeyUtils.broadcast(context, KEY_PACKAGE, Key.Intent.ACTION_ACTIVATE);

Sponsor

Please become a sponsor to get a detailed guide and priority support.

Dependency

It depends on the dynamic-utils and dynamic-preferences to perform various internal operations. So, their functions can also be used to perform other useful operations.


Author

Pranav Pandey


License

Copyright 2022-2024 Pranav Pandey

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.