Skip to content

gaganode/gaga_android_sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gaga Miner Android SDK integration Tutorial

  • This document is a simple example of SDK integration.
  • For official stable running application reference please go to Gaga Android.

1. Go to GitHub to download the latest version .jar SDK

https://github.com/gaganode/gaga_android_sdk

2. Add the SDK.jar file to your libs folder and Add as library

3. Add the SDK.jar file to your libs folder and Add as library

<uses-permission android:name="android.permission.INTERNET" >
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

4. In your Activity start the sdk

String token= "{your token}";
SharedPreferences miner_sdk_sp= getSharedPreferences("miner_sdk",MODE_PRIVATE);
long node_id=miner_sdk_sp.getLong("node_id", Math.abs(new Random().nextLong()));
miner_sdk_sp.edit().putLong("node_id",node_id).apply();

//MinerSdk.setProduct(Build.BRAND+":"+Build.MODEL); //optional:for better optimization
MinerSdk.init(node_id,token);
MinerSdk.start();

Releases

No releases published

Packages

No packages published