The official Phenix documentation shows the latest released version of the Phenix Android SDK.
The Phenix SDK is provided as a standard Android library module in form of an .aar file. Please check official Android documentation for integration.
- Add to your
~/.gradle/gradle.properties
github.user=<Github user name>
github.token=<Github personal token with read:packages permission>
Token can be created in: https://github.com/settings/tokens See official page for details: https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line
- Add repository to your
app/build.gradle
orproject/build.gradle/allProjects
repositories {
mavenCentral()
maven {
credentials {
username project.findProperty("github.user") as String
password project.findProperty("github.token") as String
}
url "https://maven.pkg.github.com/PhenixRTS/AndroidSDK"
}
}
- Add to your project
app/build.gradle
dependencies {
// For the latest version please check https://github.com/PhenixRTS/AndroidSDK/packages/23358
implementation "com.phenixrts.android:phenix-sdk-android:2024.2.0"
}
Note: Unfortunately "com.phenixrts.sdk:phenix-sdk:2019.+" won’t work due to Android Studio restrictions for 3p libraries.
You may add our library as git submodule to your project.
- Add Phenix SDK as git submodule to you Android project root:
- Install git-lfs
- clone library to your project as submodule:
git submodule add <git@github ...> [path to Android project]```
- Add module name (same as directory), to your settings.gradle (ex ':phenix-sdk')
- Don't forget to add it as dependency to your app/build.gradle:
dependencies {
implementation project(':phenix-sdk')
...
}
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.phenixrts.android:phenix-sdk-android:*.
- Check Phenix SDK version
- Check that your account has access to Phenix private repository (https://github.com/PhenixRTS/AndroidSDK)
- Check that token has
read:packages
permission - Check that you are using the correct token
Verify that phenix-sdk.aar
has a reasonably large size (> 80MB), otherwise check your git-lfs
installation.
Try #> git lfs install
and then cloning the AndroidSDK repository again.
Android Studio issue: https://issuetracker.google.com/issues/76403146 Solution:
- Upgrade : gradle-wrapper.properties - gradle-4.6-all.zip or later
- Upgrade gradle plugin in project build.gradle - 'com.android.tools.build:gradle:3.2.+' or later
Or Disable instant run - Android Studio -> Settings -> Search Instant run -> Disable
Android Studio issue: https://issuetracker.google.com/issues/77939622
Solution: If directory for module was created (e.g. /phenix-sdk
), just add direcory name to settings.gradle file.
include ':app', ':phenix-sdk'
Additional modules are available to extend the functionality provided by the PhenixSDK. Available modules:
- The
phenix-sdk-nielsen-android
module aids in integrating a Phenix stream with the Nielsen App SDK for viewership tracking.
To add a module to your project, follow the instructions above to add the Phenix SDK, then add the dependency for the Nielsen integration module:
dependencies {
implementation "com.phenixrts.android:<modulename>:2024.2.0"
....
}
The main Phenix SDK and the modules are always released together and have the same version number. Mixing different versions between the main SDK and modules is discouraged.