Skip to content

A sample for learning blockchain technology implementation with Android

Notifications You must be signed in to change notification settings

ArchitectAK/BlockChainSample-Android

Repository files navigation

BlockChainSample-Android

A sample for learning blockchain technology implementation with Android

|| |

Service Information

Instruction of the installing API service: https://github.com/blockchain/service-my-wallet-v3#installation

In class Constants type your API key:

   Constants file
   
   const val BASE_URL = "http://192.168.88.100:3000/" //Your server
   const val API_KEY = "5rtyughjbtyughbjnbtyuhbj" //Your API KEY
  

App using java library from Blockchain.

In build.gradle:

    dependencies {
        implementation 'info.blockchain:api:1.1.4'
    }

Example use methods from it library .All methods in main thread. For background thread used Rx:

Create Wallet

    Observable<CreateWalletResponse> createWallet(String email, String password) {
        return Observable.fromCallable(() -> CreateWallet.create(
                    Constants.BASE_URL,
                    password,
                    Constants.API_KEY,
                    null, null,
                    email))
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.newThread());
    }

Exchange Rates

    Observable<Map<String, Currency>> getExchangeRates() {
        return Observable.fromCallable(() -> ExchangeRates.getTicker(Constants.API_KEY))
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.newThread());
    }

##For get access need API key.

Would you like to buy me a cup of coffee?

I'd appreciate even your little contribution to my work, it helps me keep this Open Source updated. If this project helped you or your business and if you feel like donating some bucks, you can Paypal me - ankitdroiddeveloper@gmail.com

Buy Me a Coffee at ko-fi.com

Contact - Let's connect to learn together

License

Copyright 2018 Ankit Kumar

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

A sample for learning blockchain technology implementation with Android

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages