How To Call The Smart Contract Methods From Android App Using Web3j
I want to call the smart contract methods from an Android app. I deployed the smart contract using truffle framework in my private network. I also created a wrapper class for the d
Solution 1:
You are providing a path file on your pc while the app is running on your phone/emulator.
publicstatic Bip39Wallet createBipWallet(String password)throws Exception {
Stringpath= Environment.getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS).getPath();
Bip39Walletbip39Wallet= WalletUtils.generateBip39Wallet(password, newFile(path));
return bip39Wallet;
}
This way the wallet file is created and stored in the downloads directory, use this path later to load your wallet
Post a Comment for "How To Call The Smart Contract Methods From Android App Using Web3j"