This commit is contained in:
virvar 2016-02-23 23:29:57 +03:00
commit b536b337ad
1 changed files with 7 additions and 1 deletions

View File

@ -17,14 +17,20 @@ public class MainActivity extends ReactActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
// Required for android-16 (???)
System.loadLibrary("gethraw"); System.loadLibrary("gethraw");
System.loadLibrary("geth"); System.loadLibrary("geth");
// Required because of crazy APN settings redirecting localhost
Properties properties = System.getProperties(); Properties properties = System.getProperties();
properties.setProperty("http.nonProxyHosts", "localhost|127.0.0.1"); properties.setProperty("http.nonProxyHosts", "localhost|127.0.0.1");
properties.setProperty("https.nonProxyHosts", "localhost|127.0.0.1"); properties.setProperty("https.nonProxyHosts", "localhost|127.0.0.1");
// Launch!
new Thread(new Runnable() { new Thread(new Runnable() {
public void run() { public void run() {
Geth.run("--ipcdisable --nodiscover --rpc --rpcapi \"db,eth,net,web3\" --fast --datadir=" + getFilesDir().getAbsolutePath()); Geth.run("--bootnodes \"enode://dead745c1dbcde518b48e52aca1e8d5ba666005a2c8804e39826c6080fb11c1e8abe41d1e41896e871f204f790a90fa9781744cccecf492212192a7c56e7673b@rpc0.syng.io:40404\" --shh --ipcdisable --nodiscover --rpc --rpcapi \"db,eth,net,web3\" --fast --datadir=" + getFilesDir().getAbsolutePath());
} }
}).start(); }).start();
} }