Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NetworkParameters params = TestNet3Params.get();
- String filePrefix = "forwarding-service";
- String dir = getFilesDir().getPath().toString();
- kit = new WalletAppKit(params, new File(dir), filePrefix) {
- @Override
- protected void onSetupCompleted() {
- // This is called in a background thread after startAndWait is called, as setting up various objects
- // can do disk and network IO that may cause UI jank/stuttering in wallet apps if it were to be done
- // on the main thread.
- if (wallet().getKeychainSize() < 1)
- wallet().importKey(new ECKey());
- }
- };
- // Download the block chain and wait until it's done.
- kit.setAutoSave(true);
- kit.startAsync();
- kit.awaitRunning();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement