Edge Studio
  • Dashboard
  • Channel Wallets
  • Viewer Payments
  • API Keys & W2E Ticker
  • Second Screen
  • Supported Platforms
  • SDKs
    • iOS
    • Andriod
Menu
  • Dashboard
  • Channel Wallets
  • Viewer Payments
  • API Keys & W2E Ticker
  • Second Screen
  • Supported Platforms
  • SDKs
    • iOS
    • Andriod

EDGE Studio

  • Dashboard
  • Channel Wallets
  • Viewer Payments
  • API Keys & W2E Ticker
  • Second Screen
  • Supported Platforms
  • SDKs
    • iOS
    • Andriod
Menu
  • Dashboard
  • Channel Wallets
  • Viewer Payments
  • API Keys & W2E Ticker
  • Second Screen
  • Supported Platforms
  • SDKs
    • iOS
    • Andriod

SDK (Android)

Download Sdk

SDK (Android)

Document

Description

Our SDK seamlessly integrates with streaming video apps, unlocking the potential for increased viewer engagement, personalized content, and additional revenue streams through gamification and Web3 integration. With our Second Screen via QR Code feature, viewers can earn points and use them to access gamified content and pay-per-view premium content. This creates a more engaging and incentivized experience for viewers and offers unique and interactive TV entertainment. Our SDK also provides improved customer retention and loyalty through personalized content and rewards. Additionally, we offer an SDK for Connected TV to further enhance the viewing experience.

Installation

Instructions for how to setup the sdk in you project

Step 1 [Adding maven repository ]

Add it in your root build.gradle at the end of repositories:

                allprojects {
                    repositories {
                        ...
                        maven { url 'https://jitpack.io' }
                    }
                  }
            

Step 2 [Adding dependency ]

Add the dependency

                dependencies {
                  implementation 'com.github.zeeshan-edgevideo:EdgeUISdk:2.0.42'
                }
              

Getting API Key

Step 1: Visit edge studio page

For getting api key visit : https://edgevideo.com/studio/settings/ and then get to Sdk tab

Step 2: Generate API Key

Click "Get API Key" button and enter sdk title and hit register button. After successfull creation of API key you will see that in list below.

Usage

Step 1 [Initialize the SDK]

Use the following code snippet for initializing the sdk

                EdgeSdk edgeSdk = new EdgeSdk(this,"API_KEY");
              

Step 2 [Setting default values]

To make things in actions there are few default values which you must set while setting up sdk

                edgeSdk.getLocalStorageManager().storeBooleanValue(true, com.edgesdk.Utils.Constants.IS_TICKER_ALLOWED_TO_HIDE);
                edgeSdk.getLocalStorageManager().storeBooleanValue(false,com.edgesdk.Utils.Constants.IS_OPT_OUT_W2E_ENABLED);
                edgeSdk.getLocalStorageManager().storeBooleanValue(true,com.edgesdk.Utils.Constants.IS_VIEWER_WALLET_ADDRESS_FORWARDED);
                edgeSdk.getLocalStorageManager().storeStringValue("WALLET_ADDRESS",com.edgesdk.Utils.Constants.WALLET_ADDRESS);
              

Step 3 [Starting sdk operations]

You need to call the start() method using edgeSdk object this will call all necessary methods on backend

                edgeSdk.start();
              

Step 4 [Starting staking]

Usually you need to call when you start watching a video becasue at that time you will be also setting base rate to 600-2400

                edgeSdk.startStaking();
              

Step 5 [Ticker]

Importing and initialize SDK ticker

                Ticker ticker = new Ticker(this,edgeSdk);
                ticker.setBackpressed(false);
                ticker.setPlaying(true);
              

Step 6 [Setting up Ticker over video layout]

We first find the main layout of the activity using the findViewById method. Then, we add the ticker view to this layout using the addView method. This will display the ticker over the video layout, as specified in Step 5

                LinearLayout layout = findViewById(R.id.main_layout);
                layout.addView(ticker);
              

Step 7 [Calling few methods in activity cycle method]

Calling a few methods in the activity lifecycle method onResume(). Specifically, the code ticker.onResume() needs to be called in onResume(). This method is used to resume the ticker animation and ensure that it is running properly when the activity is resumed from a paused or stopped state. It's important to call this method in onResume() to ensure that the ticker animation remains synchronized with the rest of the activity. Similarly, other methods may also need to be called in other activity lifecycle methods to ensure proper functionality of the SDK ticker.

                ticker.onResume();
              

Step 8 [Updating base rate]

we are updating the base rate to start earning EAT. To do this, we need to call the updateBaseRateOnServer method from the W2EarnManager object of the edgeSdk. We pass the new base rate value as a parameter to this method. In this example, we are setting the base rate to 600. This will update the base rate on the server, and we will start earning EAT according to the new rate.

                edgeSdk.getW2EarnManager().updateBaseRateOnServer(600);
              

Result Fetching Methods

Staking value fetching methods

                
    HomeActivity.edgeSdk.getStakingValueFetchingManager().getStkResults().[METHOD]
    getResumingStakingIn()
    getStakingPercentage()
    getEstimatedApyPercentage()
  
              

Watch2earn result fetching methods

                
    HomeActivity.edgeSdk.getW2EarnManager().getResults().[METHOD]
    getEstimateEatsPerHour()
    getBalance()
    getEstimatedEarnedEatsInUSD()
    getEstimateEatsPerHour()
  
              

Market price fetching methods

                
    HomeActivity.edgeSdk.getMarketPriceManager().[METHOD]
    getChange()
    getPrice()
  
              

Wallet Activation and switching Methods

Forwarding temprory wallet address with actual wallet address

                
                  val walletForwardingManager: WalletForwardingManager =
                  edgeSdk.forwardTemporaryWalletToRealWallet(code)
  
              

Wallet switching Methods

switching current wallet address with new wallet address

                
                  val walletSwitchingManager: WalletSwitchingManager = edgeSdk.switchWallet(code)