Open 6epreu opened 6 years ago
I am using a Samsung Galaxy S7 SM-G930F. Please check the directory that is output in onCreate in DroidLibIndy.java line23. https://github.com/AxelNennker/DroidLibIndy/blob/919cb4f074ef55259700860888c50f30ee7d16f8/app/src/main/java/indy/hyperledger/org/droidlibindy/DroidLibIndy.java#L23
Problem is IS-700 https://jira.hyperledger.org/browse/IS-700 that the directory is currently hardcoded in libindy and the application has to easy way to set it.
I change libindy/src/utils/environment.rs to point to the directory that fits my device. pub fn indy_home_path() -> PathBuf { // TODO: FIXME: Provide better handling for the unknown home path case!!!
let mut path = PathBuf::from("/storage/emulated/0/Android/data/indy.hyperledger.org.droidlibindy.debug/files");
let mut indy_client_dir = ".indy_client";
path.push(indy_client_dir);
trace!("indy homedir >> {:?}",path);
path
}
Maybe DroidLibIndy.java could determine the correct path and then push it into Env for environment.rs to find, which is a hack. As mentioned in IS-700 the wallet storage way would be the 'right' one but we are not there. Or we need a way in Rust to find the same dir as externalFilesDir.
PRs welcome. Sorry, I have no better news for now. Working on it.
I am using a Samsung Galaxy S7 SM-G930F. Please check the directory that is output in onCreate in DroidLibIndy.java line23. https://github.com/AxelNennker/DroidLibIndy/blob/919cb4f074ef55259700860888c50f30ee7d16f8/app/src/main/java/indy/hyperledger/org/droidlibindy/DroidLibIndy.java#L23
Problem is IS-700 https://jira.hyperledger.org/browse/IS-700 that the directory is currently hardcoded in libindy and the application has to easy way to set it.
I change libindy/src/utils/environment.rs to point to the directory that fits my device. pub fn indy_home_path() -> PathBuf { // TODO: FIXME: Provide better handling for the unknown home path case!!!
let mut path = PathBuf::from("/storage/emulated/0/Android/data/indy.hyperledger.org.droidlibindy.debug/files");
let mut indy_client_dir = ".indy_client";
path.push(indy_client_dir);
trace!("indy homedir >> {:?}",path);
path
}
Maybe DroidLibIndy.java could determine the correct path and then push it into Env for environment.rs to find, which is a hack. As mentioned in IS-700 the wallet storage way would be the 'right' one but we are not there. Or we need a way in Rust to find the same dir as externalFilesDir.
PRs welcome. Sorry, I have no better news for now. Working on it.
@6epreu If externalDir on your device is different then you have to change environment.rs and build libindy.so yourself. I am open for proposals how to improve the situations.
@6epreu If externalDir on your device is different then you have to change environment.rs and build libindy.so yourself. I am open for proposals how to improve the situations.
Hello, Axel. If we can communicate directly it will be more efficient. Here is my skype: avr_mega Yes, I want to share with you my suggestions and ask few questions.
I don't have Skype installed and didn't use it for ages. Have you seen https://chat.hyperledger.org/channel/indy-sdk maybe thats a good place to chat.
Hello. Could you write what mobile device with what processor have you used for testing. I have used Huawei p10 lite with processor Kirin 658 that is arm64-v8a and I had error while trying to create wallet
Wallet.createWallet("POOL", "walletOpen", "default", null, null).get();
Error
java.util.concurrent.ExecutionException: org.hyperledger.indy.sdk.IOException: An IO error occurred. at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:330) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1892) at com.ledgerleopard.hyperledger.MainActivity.onCreate(MainActivity.java:99) at android.app.Activity.performCreate(Activity.java:6910) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2757) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2875) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1578) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6623) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832) Caused by: org.hyperledger.indy.sdk.IOException: An IO error occurred. at org.hyperledger.indy.sdk.IndyJava$API.checkCallback(IndyJava.java:90) at org.hyperledger.indy.sdk.wallet.Wallet.access$300(Wallet.java:22) at org.hyperledger.indy.sdk.wallet.Wallet$2.callback(Wallet.java:70) at java.lang.reflect.Method.invoke(Native Method) at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:520) at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:551)