Skip to content

PhenixRTS/AndroidSDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Phenix Android SDK

Latest release version

The official Phenix documentation shows the latest released version of the Phenix Android SDK.

Integration

The Phenix SDK is provided as a standard Android library module in form of an .aar file. Please check official Android documentation for integration.

As Gradle dependency (recommended)

  1. 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

  1. Add repository to your app/build.gradle or project/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"
   }
}
  1. 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.

As GIT submodule

You may add our library as git submodule to your project.

  1. Add Phenix SDK as git submodule to you Android project root:
    1. Install git-lfs
    2. clone library to your project as submodule:
    git submodule add <git@github ...> [path to Android project]```
  2. Add module name (same as directory), to your settings.gradle (ex ':phenix-sdk')
  3. Don't forget to add it as dependency to your app/build.gradle:
dependencies {
    implementation project(':phenix-sdk')
    ...
}

Known issues

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.phenixrts.android:phenix-sdk-android:*.

  1. Check Phenix SDK version
  2. Check that your account has access to Phenix private repository (https://github.com/PhenixRTS/AndroidSDK)
  3. Check that token has read:packages permission
  4. Check that you are using the correct token

Package com.phenixrts.* doesn't exist

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.

Build crash: java.io.IOException: Failed to find byte code for …

Android Studio issue: https://issuetracker.google.com/issues/76403146 Solution:

  1. Upgrade : gradle-wrapper.properties - gradle-4.6-all.zip or later
  2. 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

IDE error: .GroovyFileImpl because: different providers: SingleRootFileViewProvider

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'

Modules

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.