Added geth library
This commit is contained in:
parent
dbd39babb0
commit
ac7af91da0
|
@ -25,7 +25,7 @@ project.xcworkspace
|
||||||
# Android/IJ
|
# Android/IJ
|
||||||
#
|
#
|
||||||
.idea
|
.idea
|
||||||
.gradle
|
.gradle/
|
||||||
local.properties
|
local.properties
|
||||||
|
|
||||||
# node.js
|
# node.js
|
||||||
|
|
|
@ -123,4 +123,5 @@ dependencies {
|
||||||
compile "com.android.support:appcompat-v7:23.0.1"
|
compile "com.android.support:appcompat-v7:23.0.1"
|
||||||
compile "com.facebook.react:react-native:0.20.+"
|
compile "com.facebook.react:react-native:0.20.+"
|
||||||
compile project(':react-native-contacts')
|
compile project(':react-native-contacts')
|
||||||
|
compile(name:'geth', ext:'aar')
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -4,12 +4,28 @@ import com.facebook.react.ReactActivity;
|
||||||
import com.facebook.react.ReactPackage;
|
import com.facebook.react.ReactPackage;
|
||||||
import com.facebook.react.shell.MainReactPackage;
|
import com.facebook.react.shell.MainReactPackage;
|
||||||
import com.rt2zz.reactnativecontacts.ReactNativeContacts;
|
import com.rt2zz.reactnativecontacts.ReactNativeContacts;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import com.github.ethereum.go_ethereum.cmd.Geth;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
public class MainActivity extends ReactActivity {
|
public class MainActivity extends ReactActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
Properties properties = System.getProperties();
|
||||||
|
properties.setProperty("http.nonProxyHosts", "localhost|127.0.0.1");
|
||||||
|
properties.setProperty("https.nonProxyHosts", "localhost|127.0.0.1");
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
Geth.run("--ipcdisable --nodiscover --rpc --rpcapi \"db,eth,net,web3\" --fast --datadir=" + getFilesDir().getAbsolutePath());
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the main component registered from JavaScript.
|
* Returns the name of the main component registered from JavaScript.
|
||||||
* This is used to schedule rendering of the component.
|
* This is used to schedule rendering of the component.
|
||||||
|
|
|
@ -16,5 +16,8 @@ allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
jcenter()
|
jcenter()
|
||||||
|
flatDir {
|
||||||
|
dirs 'libs'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue