mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-07-21 22:20:34 +02:00
[android] set datadir path from system environment
This commit is contained in:
parent
f6199c6c17
commit
16a14c2b76
6 changed files with 50 additions and 7 deletions
|
@ -2,7 +2,9 @@ package org.purplei2p.i2pd;
|
|||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
|
||||
import org.purplei2p.i2pd.R;
|
||||
|
||||
public class DaemonSingleton {
|
||||
|
@ -80,6 +82,7 @@ public class DaemonSingleton {
|
|||
}
|
||||
try {
|
||||
synchronized (DaemonSingleton.this) {
|
||||
I2PD_JNI.setDataDir(Environment.getExternalStorageDirectory().getAbsolutePath() + "/i2pd");
|
||||
daemonStartResult = I2PD_JNI.startDaemon();
|
||||
if("ok".equals(daemonStartResult)){
|
||||
setState(State.startedOkay);
|
||||
|
|
|
@ -18,6 +18,8 @@ public class I2PD_JNI {
|
|||
|
||||
public static native void onNetworkStateChanged(boolean isConnected);
|
||||
|
||||
public static native void setDataDir(String jdataDir);
|
||||
|
||||
public static void loadLibraries() {
|
||||
//System.loadLibrary("c++_shared");
|
||||
System.loadLibrary("i2pd");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue