mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-05 23:17:01 +02:00
android without qt initial commit
This commit is contained in:
parent
40a4c3ccbd
commit
69c954760a
17 changed files with 567 additions and 3 deletions
20
android/src/org/purplei2p/i2pd/I2PD.java
Executable file
20
android/src/org/purplei2p/i2pd/I2PD.java
Executable file
|
@ -0,0 +1,20 @@
|
|||
package org.purplei2p.i2pd;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.widget.TextView;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class I2PD extends Activity {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
TextView tv = new TextView(this);
|
||||
tv.setText( "libi2pd.so was compiled with ABI " + getABICompiledWith());
|
||||
setContentView(tv);
|
||||
}
|
||||
|
||||
public String getABICompiledWith() {
|
||||
return I2PD_JNI.getABICompiledWith();
|
||||
}
|
||||
}
|
16
android/src/org/purplei2p/i2pd/I2PD_JNI.java
Normal file
16
android/src/org/purplei2p/i2pd/I2PD_JNI.java
Normal file
|
@ -0,0 +1,16 @@
|
|||
package org.purplei2p.i2pd;
|
||||
|
||||
public class I2PD_JNI {
|
||||
public static native String getABICompiledWith();
|
||||
/**
|
||||
* returns 1 if daemon init failed
|
||||
* returns 0 if daemon initialized and started okay
|
||||
*/
|
||||
public static native int startDaemon();
|
||||
//should only be called after startDaemon() success
|
||||
public static native void stopDaemon();
|
||||
|
||||
static {
|
||||
System.loadLibrary("i2pd");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue