Added geth library

Former-commit-id: ac7af91da0
This commit is contained in:
Adrian Tiberius 2016-02-23 19:12:18 +02:00
parent dbd39babb0
commit 1c6846d46f
5 changed files with 22 additions and 1 deletions

2
.gitignore vendored
View File

@ -25,7 +25,7 @@ project.xcworkspace
# Android/IJ
#
.idea
.gradle
.gradle/
local.properties
# node.js

View File

@ -123,4 +123,5 @@ dependencies {
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:0.20.+"
compile project(':react-native-contacts')
compile(name:'geth', ext:'aar')
}

View File

@ -0,0 +1 @@
92fc60479871e92e37acd25456670791277cd377

View File

@ -4,12 +4,28 @@ import com.facebook.react.ReactActivity;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.rt2zz.reactnativecontacts.ReactNativeContacts;
import android.os.Bundle;
import com.github.ethereum.go_ethereum.cmd.Geth;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
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.
* This is used to schedule rendering of the component.

View File

@ -16,5 +16,8 @@ allprojects {
repositories {
mavenLocal()
jcenter()
flatDir {
dirs 'libs'
}
}
}