19. Kin Android SDK
1. Create an account
2. Access account
3. Get Account balance
4. Transfer kin to address
5. Get Account Pending balance
6. Export account details
It’s open source on
github.com/kinfoundation/kin-sdk-core-android
21. Kin Android SDK
1. Create an account
2. Access account
3. Get Account balance
4. Transfer kin to address
5. Get Account Pending balance
6. Export account details
It’s open source on
github.com/kinfoundation/kin-sdk-core-android
22. KinClient
ServiceProvider infuraProvider =
new ServiceProvider(“https://ropsten.infura.io/TOKEN”,
ServiceProvider.NETWORK_ID_ROPSTEN));
KinClient kinClient = new KinClient(context, infuraProvider);
// Infura Registration: https://infura.io/register.html
25. 3. Kin Balance
Request<Balance> balanceRequest = account.getBalance();
balanceRequest.run(new ResultCallback<Balance>() {
@Override
public void onResult(Balance result) {
Log.d("example", "The balance is: " + result.value(2));
}
@Override
public void onError(Exception e) {
// Most likely OperationFailedException - check exception message
}
});
26. 4. Transfer Kin
transactionRequest = account.sendTransaction(toAddress, passphrase,
new BigDecimal("100"));
transactionRequest.run(new ResultCallback<TransactionId>() {
@Override
public void onResult(TransactionId result) {
Log.d("example", "The transaction id: " + result.toString());
}
@Override
public void onError(Exception e) {
// could be OperationFailedException, PassphraseException
}
});
27. 5. Pending Balance
Request<Balance> balanceRequest = account.getPendingBalance();
balanceRequest.run(new ResultCallback<Balance>() {
@Override
public void onResult(Balance result) {
Log.d("example", "The pending balance is: " + result.value(2));
}
@Override
public void onError(Exception e) {
// Most likely OperationFailedException - check exception message
}
});
37. Pending Balance
• Challenge: Event log filtering on geth mobile library missing
• Solution: Added... but still didn’t work!
38. Pending Balance
• Challenge: Event log filtering on geth mobile library missing
• Solution: Added... but still didn’t work!
• Challenge: Bug in geth node implementation
• Solution: Build our own parity node implementation cluster
39. Pending Balance
• Challenge: Event log filtering on geth mobile library missing
• Solution: Added... but still didn’t work!
• Challenge: Bug in geth node implementation
• Solution: Build our own parity node implementation cluster
• Challenge: Inconsistent Balance
• Solution: Enable cookies, so that same node is reused
40. Pending Balance
• Challenge: Event log filtering on geth mobile library missing
• Solution: Added... but still didn’t work!
• Challenge: Bug in geth node implementation
• Solution: Build our own parity node implementation cluster
• Challenge: Inconsistent Balance
• Solution: Enable cookies, so that same node is reused
• Challenge: Still inconsistent balance with sticker shop
• Solution: Using a single node, with a backup node ready if needed
41. To be continued...
• Our journey is a bumpy one, but this is just the beginning
• We are taking part in the greater effort of bringing blockchain to
maturity and to mass adoption
• Watch out our progress on our community channels
Medium Contributors Reddit Telegram
• Start playing with our SDK on testnet - see sample app
• Remember that Kin Reward Engine is on its way !