parent
dbd39babb0
commit
1c6846d46f
|
@ -25,7 +25,7 @@ project.xcworkspace
|
|||
# Android/IJ
|
||||
#
|
||||
.idea
|
||||
.gradle
|
||||
.gradle/
|
||||
local.properties
|
||||
|
||||
# node.js
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
92fc60479871e92e37acd25456670791277cd377
|
|
@ -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.
|
||||
|
|
|
@ -16,5 +16,8 @@ allprojects {
|
|||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue