EDGE
Studio

SDKs
Here, you'll find all the information you need to get started with two popular software development kits: Apple SDK and Fire TV SDK. Apple SDK provides a set of tools and resources for building applications for Apple's iOS, iPadOS, macOS, watchOS, and tvOS operating systems. Fire TV SDK, on the other hand, offers developers the ability to create apps for Amazon Fire TV devices
Getting started with our SDKs is quick and easy. To begin, simply head to our website and download the SDKs for your desired platform. Once you’ve downloaded the SDKs, you’ll have access to all the tools and resources you need to start building amazing applications for Apple TV, Fire TV, and Amazon TV
To start using the Android SDK for Fire TV, follow the steps below:
- Download the SDK folder from our website and extract its contents to a directory on your computer. You should see a folder named “edgestudio”.
- Ensure that the following dependencies are added to your project’s
build.gradle
file:
- implementation ‘org.json:json:20141113’
implementation 'com.fasterxml.jackson.core:jackson-core:2.10.1'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.10.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.10.1'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.25'
implementation "org.java-websocket:Java-WebSocket:1.3.0"
implementation 'com.android.volley:volley:1.1.1'
implementation'com.google.code.gson:gson:2.8.6'
- After syncing the
build.gradle
file, ensure that you are not facing any issues. - Copy the “edgestudio” folder and paste it under the directory
/app/java/com/
. The directory path should look like:/app/java/com/edgestudio/
. It should look like the following screenshot:
Congratulations! You have successfully set up the Android SDK for Fire TV in your project. In the next sections, we will discuss how you can use the SDK to develop Fire TV apps.
To add MyFramework to your project, you can take the following steps:
- Download the watch2earn-applesdk.framework file from the GitHub repository.
- Add the watch2earn-applesdk.framework file to your Xcode project by dragging and dropping it into the project.
- Go to the “General” tab of your project’s settings and find the “Frameworks, Libraries, and Embedded Content” section.
- Click on the “+” button and choose the watch2earn-applesdk.framework file from the list of available frameworks.
- Navigate to the “Build Phases” tab of your project’s settings and add the .framework file to the “Link Binary with Libraries” section.
Now that you’ve downloaded the SDKs, it’s time to initialize them and start using the powerful tools and resources they offer. In this section, we’ll guide you through the detailed steps to initialize the SDK for each platform, including setting up your development environment, importing the necessary libraries, and configuring your project settings. Once you’ve completed these steps, you’ll be ready to start leveraging the full potential of our SDKs to build high-quality applications for Apple TV, Fire TV, and Amazon TV
To initialize the SDK, follow these steps:
- Identify the Home Activity: The Home Activity is the activity that will remain active throughout the app’s lifecycle. Identify this activity in your application.
- Define the Edge SDK Executor: Define the Edge SDK Executor in the Companion object of your Home Activity. This can be done as follows:
- Initialize the SDK: Once you have defined the Edge SDK Executor, initialize it in the Home Activity’s onCreate method as follows:
- After initializing the SDK, you can use the
edgeSdkExecutor
object to perform various operations provided by the SDK
By following these steps, you will have successfully initialized the SDK in your application
Importing Framework
To utilize this Framework in your project, you should begin by importing it at the top of your primary View Controller Swift file.
import watch2earn_applesdk
Initializing Framework
To use the basic functions of the Framework SDK in your app, you need to call them from the main class of your app and initialize them with your app logo link and wallet JSON file link into the W2EManager class. This class is responsible for all operations of the Framework SDK and will establish all the necessary connections with watch2earn servers.
self.w2eManager = W2EManager(logoUrl:logo,jsonUrl:wallets);
Fetching Watch2Earn values using our SDK is a breeze. With just a few lines of code, you can easily access and utilize the powerful Watch2Earn features that our SDK offers. To fetch Watch2Earn values, you’ll first need to initialize the Watch2Earn component of our SDK. Once you’ve done that, you can use the various methods provided by our SDK to access and utilize Watch2Earn values in your application
The watch-to-earn functionality provided by the SDK allows users to earn rewards by watching videos. To fetch the watch-to-earn functionality, follow these steps:
- Start the watch-to-earn server:
HomeActivity.edgeSdkExecutor.startWatchToEarn(walletAddress, 0)
- This method starts the watch-to-earn server with the specified wallet address and base rate. You can retrieve the wallet address from the storage using the
getStringValue()
method of thestorageManager
object and theWALLET_ADDRESS
constant value provided by the SDK:HomeActivity.edgeSdkExecutor.storageManager.getStringValue(com.edgevideo.sdk.Constants.WALLET_ADDRESS);
- This method starts the watch-to-earn server with the specified wallet address and base rate. You can retrieve the wallet address from the storage using the
- Get the watch-to-earn results:
HomeActivity.edgeSdkExecutor.getWatchToEarnSocketHandler().getResults().getBalance();
This method retrieves the current balance of the watch-to-earn functionality. You can use the
getWatchToEarnSocketHandler()
method of theedgeSdkExecutor
object to retrieve the watch-to-earn socket handler, and then use thegetResults()
method of the socket handler to retrieve the watch-to-earn results.
By following these steps, you can fetch the watch-to-earn functionality provided by the SDK and use it to reward users for watching videos in your application.
Call playerViewControl
To display tickers and update stats in your playerview, simply call the appropriate method from the w2eSdk object in the W2EManager and pass the AVPlayerViewController as a parameter to this method. The W2EManager is responsible for all operations related to displaying tickers and updating their stats.
W2EManager.w2eSdk.playerViewControl(avPlayerController:self.avPlayerController);
Call W2E Setting Screen View
You can use this function to obtain a UIViewController for the w2e settings screen, which you can then utilize in any appropriate location in your app.
let vc = W2EManager.w2eSdk.getSettingString()
Fetching staking values using our SDK is just as simple as fetching Watch2Earn values. To get started, you’ll first need to initialize the Staking component of our SDK. Once you’ve done that, you can use the various methods provided by our SDK to access and utilize staking values in your application
The SDK provides staking functionality that allows users to stake tokens in your application. To fetch staking values, follow these steps:
- Start the staking server:
HomeActivity.edgeSdkExecutor.startStaking();
- This method starts the staking server.
- Get the staking results:
HomeActivity.edgeSdkExecutor.getStakingBackEndConnector().getStkResults().getStakingPercentage();
- This method retrieves the current staking percentage. You can use the
getStakingBackEndConnector()
method of theedgeSdkExecutor
object to retrieve the staking back-end connector, and then use thegetStkResults()
method of the connector to retrieve the staking results. You can then use thegetStakingPercentage()
method of the results to retrieve the staking percentage.
- This method retrieves the current staking percentage. You can use the
By following these steps, you can fetch the staking functionality provided by the SDK and use it to allow users to stake tokens in your application.
- Visit [URL] and download the binary file
Wallet activation is a crucial step in the process of using our SDK for building Watch2Earn based applications. When a user first opens your application, they are assigned a temporary wallet address by our SDK. This temporary wallet is used to facilitate transactions and interactions within the application.
However, in order to fully own and control their funds, users need to
connect or forward their temporary wallet to their personal Metamask or Brave wallet. This process is known as wallet activation.
- Visit [URL] and download the Jar file
- Visit [URL] and download the binary file
Boost is a powerful feature provided by our SDK that can significantly increase the earning rate for users in your application. When a user activates the Boost option, their earning rate is multiplied by four times the base rate, giving them a significant increase in earnings.
- Visit [URL] and download the Jar file
- Visit [URL] and download the binary file
The Redeem Button is a key feature provided by our SDK that allows users to easily claim and redeem the EAT coins they’ve earned in your application. With the Redeem Button, users can quickly and easily convert their earned EAT coins into real-world value, and use them to purchase goods or services, or to transfer them to otherusers or wallets
- Visit [URL] and download the Jar file
- Visit [URL] and download the binary file