Android

Setup

Clone the GitHub Repo

git clone https://github.com/SariskaIO/Sariska-Media-Unity-Demo.git

Generate the API Key

An API key is required for you to run the demo. Please generate the key using the instruction on the given link

Setup Android Plugin

Generate Github PAT

Sariska's Media Artifacts Android are stored in GitHub Packages, in order for you to download these packages, a Personal Access Token(PAT) is required by Github.

The packages are public, so you can generate and use a PAT from your own GitHub account. The instructions on how to generate a PAT can be found in this publically available youtube video Link. In order to run this demo, you only need read_packages access for your token.

To Generate a Personal Access Token:

Go to your profile on GitHub -> Developer Settings -> Personal Access Tokens -> Tokens(Classic) -> Generate new Tokens Then while creating a token, click on the following checkbox.

Go to SariskaMediaUnityDemo

Open the root folder of the repo in your terminal. Then follow the instructions to build the Android Plugin.

Navigate to the Android Plugin Project

// Navigate to the Android Plugin Project
cd SariskaMediaUnityDemo

Open local.properties

Add the following two lines to the local.properties file.

GITHUB_USERNAME={your-github-username}
GITHUB_TOKEN={your-github-token}

Run the Build Script

bash runscript.sh

The build Script will automatically build the Android Plugin for you, and paste it into the unity project.

Setup Unity Project

API Key

Replace the API key Generated from console.sariska.io into the demo code: Move to your demo code and replace the API key in the file Sariska-Media-Unity-Demo/Assets/Scripts/TokenAPIHelp.cs

Add GitHub Credentials to the Unity Project

Navigate to the Android folder inside the Unity project and replace Github Username and Password in mainTemplate.gradle

cd ../Assets/Plugins/Android

Build and Run

Switch to Android

You will need to sign the application, go to Player Settings and sign the application using Keystore.

Last updated