Add the LineageSDK to your app
Overview
The LineageOS platform SDK is a powerful resource that allows app developers to do more with LineageOS devices.
It is available on all the devices running LineageOS 15.1 (or later). It’s also possible to use the SDK with devices running an unofficial LineageOS build, but we can’t assure the same quality level of an official build.
Adding to your Android Studio project
You can download the LineageSDK jar library from our prebuilts repo.
Once you have downloaded the jar file, insert in the module-level build.gradle
of your app this dependency:
And put the lineage-sdk.jar
file in your app’s module libs
folder (usually app/libs
) and refresh the gradle dependencies.
Compiling the library from source
In order to compile this library from source, you need to set up a LineageOS build environment.
Once your build environment is ready, run the following commands to generate the .jar library:
The jar library will be available at the following path:
out/target/common/obj/JAVA_LIBRARIES/org.lineageos.platform.sdk.aar_intermediates/classes.jar
Compatibility
The library has been tested on both java and kotlin projects.
Get assistance
If you have any questions or get stuck on any of the steps, feel free to ask on our subreddit or in #LineageOS on Libera.Chat.
You can also find more information in the LineageSDK javadoc.