Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ReLinker.recursively().loadLibrary(InitActivity.this, "JOpentxs");
- String otbinPath = OTWrapper.it(InitActivity.this).get_scripts_dir().getAbsolutePath();
- String walletDirPath = OTWrapper.it(InitActivity.this).get_wallet_dir().getAbsolutePath();
- OTWrapper.it(InitActivity.this).initOpenTxs(otbinPath, walletDirPath);
- public boolean initOpenTxs(String script_dir, String files_dir) {
- if (!bInitialized_) {
- OTAPI_Wrap.SetAppBinaryFolder(script_dir); // Where the OT scripts are installed.
- OTAPI_Wrap.SetHomeFolder(files_dir); // Where the Mac desktop app would think of as your "OT home"
- try {
- if (false == OTAPI_Wrap.AppInit()) {
- Log.i("init_opentxs", "Failed calling AppInit.");
- return false;
- }
- }
- catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- OTAPI_Wrap.It();
- bInitialized_ = true;
- }
- // ----------------------------------
- if (!bWalletLoaded_ ) {
- setupPasswordCallback();
- setupAddressBookCallback();
- // ----------------------------------
- boolean bLoaded = OTAPI_Wrap.LoadWallet();
- Log.i("init_opentxs", "OTAPI.LoadWallet: " + bLoaded);
- recordList_ = new OTRecordList(new OTNameLookup());
- Log.i("init_opentxs", "Recordlist size: " + recordList_.size());
- bWalletLoaded_ = true;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement