mirror of
https://github.com/status-im/syng-client.git
synced 2025-02-23 16:38:06 +00:00
Moved console log contents to application class.
Implemented rpc server change functionality.
This commit is contained in:
parent
4078750d44
commit
439551d2c6
@ -18,15 +18,18 @@ import android.preference.Preference;
|
|||||||
import android.preference.PreferenceActivity;
|
import android.preference.PreferenceActivity;
|
||||||
import android.preference.PreferenceFragment;
|
import android.preference.PreferenceFragment;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.apache.cordova.ConfigXmlParser;
|
import org.apache.cordova.ConfigXmlParser;
|
||||||
import org.apache.cordova.CordovaPreferences;
|
import org.apache.cordova.CordovaPreferences;
|
||||||
import org.apache.cordova.CordovaWebView;
|
import org.apache.cordova.CordovaWebView;
|
||||||
import org.apache.cordova.CordovaWebViewImpl;
|
import org.apache.cordova.CordovaWebViewImpl;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.syng.R;
|
import io.syng.R;
|
||||||
|
import io.syng.app.SyngApplication;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link PreferenceActivity} that presents a set of application settings. On
|
* A {@link PreferenceActivity} that presents a set of application settings. On
|
||||||
@ -143,7 +146,16 @@ public class SettingsActivity extends PreferenceActivity {
|
|||||||
jsonRPC.setEnabled(!stringValue.equals(getString(R.string.pref_running_mode_full_value)));
|
jsonRPC.setEnabled(!stringValue.equals(getString(R.string.pref_running_mode_full_value)));
|
||||||
|
|
||||||
} else if (key.equals(getString(R.string.pref_json_rpc_server_key))) {
|
} else if (key.equals(getString(R.string.pref_json_rpc_server_key))) {
|
||||||
preference.setSummary("Current server address is " + stringValue);
|
try {
|
||||||
|
URL url = new URL(stringValue);
|
||||||
|
preference.setSummary("Current server address is " + stringValue);
|
||||||
|
SyngApplication.sEthereumConnector.changeJsonRpc(stringValue);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Toast.makeText(SettingsActivity.this,
|
||||||
|
"Invalid url address...",
|
||||||
|
Toast.LENGTH_SHORT).show();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
preference.setSummary(stringValue);
|
preference.setSummary(stringValue);
|
||||||
}
|
}
|
||||||
|
@ -8,15 +8,37 @@
|
|||||||
|
|
||||||
package io.syng.app;
|
package io.syng.app;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
import android.support.multidex.MultiDexApplication;
|
import android.support.multidex.MultiDexApplication;
|
||||||
|
|
||||||
import com.squareup.leakcanary.RefWatcher;
|
import com.squareup.leakcanary.RefWatcher;
|
||||||
|
|
||||||
import org.ethereum.android.service.ConnectorHandler;
|
import org.ethereum.android.service.ConnectorHandler;
|
||||||
|
import org.ethereum.android.service.EthereumClientMessage;
|
||||||
import org.ethereum.android.service.EthereumConnector;
|
import org.ethereum.android.service.EthereumConnector;
|
||||||
|
import org.ethereum.android.service.events.BlockEventData;
|
||||||
|
import org.ethereum.android.service.events.EventData;
|
||||||
|
import org.ethereum.android.service.events.EventFlag;
|
||||||
|
import org.ethereum.android.service.events.MessageEventData;
|
||||||
|
import org.ethereum.android.service.events.PeerDisconnectEventData;
|
||||||
|
import org.ethereum.android.service.events.PendingTransactionsEventData;
|
||||||
|
import org.ethereum.android.service.events.TraceEventData;
|
||||||
|
import org.ethereum.android.service.events.VMTraceCreatedEventData;
|
||||||
|
import org.ethereum.net.p2p.HelloMessage;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.EnumSet;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import io.syng.R;
|
||||||
|
import io.syng.entity.LogEntry;
|
||||||
import io.syng.service.EthereumService;
|
import io.syng.service.EthereumService;
|
||||||
import io.syng.util.PrefsUtil;
|
import io.syng.util.PrefsUtil;
|
||||||
import io.syng.util.ProfileManager;
|
import io.syng.util.ProfileManager;
|
||||||
@ -28,6 +50,15 @@ public class SyngApplication extends MultiDexApplication implements ConnectorHan
|
|||||||
|
|
||||||
private RefWatcher refWatcher;
|
private RefWatcher refWatcher;
|
||||||
|
|
||||||
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
private DateFormat mDateFormatter = new SimpleDateFormat("HH:mm:ss:SSS");
|
||||||
|
|
||||||
|
public static String mConsoleLog = "";
|
||||||
|
|
||||||
|
private boolean isRpcConnection = true;
|
||||||
|
|
||||||
|
private String mHandlerIdentifier = UUID.randomUUID().toString();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
@ -41,12 +72,12 @@ public class SyngApplication extends MultiDexApplication implements ConnectorHan
|
|||||||
sEthereumConnector.registerHandler(this);
|
sEthereumConnector.registerHandler(this);
|
||||||
sEthereumConnector.bindService();
|
sEthereumConnector.bindService();
|
||||||
}
|
}
|
||||||
sEthereumConnector.init(ProfileManager.getCurrentProfile().getPrivateKeys());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTerminate() {
|
public void onTerminate() {
|
||||||
super.onTerminate();
|
super.onTerminate();
|
||||||
|
System.out.println("Terminating application");
|
||||||
sEthereumConnector.removeHandler(this);
|
sEthereumConnector.removeHandler(this);
|
||||||
sEthereumConnector.unbindService();
|
sEthereumConnector.unbindService();
|
||||||
sEthereumConnector = null;
|
sEthereumConnector = null;
|
||||||
@ -60,22 +91,93 @@ public class SyngApplication extends MultiDexApplication implements ConnectorHan
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConnectorConnected() {
|
public void onConnectorConnected() {
|
||||||
|
System.out.println("Connector connected");
|
||||||
|
SyngApplication.sEthereumConnector.addListener(mHandlerIdentifier, EnumSet.allOf(EventFlag.class));
|
||||||
sEthereumConnector.init(ProfileManager.getCurrentProfile().getPrivateKeys());
|
sEthereumConnector.init(ProfileManager.getCurrentProfile().getPrivateKeys());
|
||||||
sEthereumConnector.startJsonRpc();
|
sEthereumConnector.startJsonRpc();
|
||||||
|
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
String rpcServer = sharedPref.getString(getString(R.string.pref_json_rpc_server_key), "http://rpc0.syng.io:8545/");
|
||||||
|
sEthereumConnector.changeJsonRpc(rpcServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConnectorDisconnected() {
|
public void onConnectorDisconnected() {
|
||||||
|
System.out.println("Connector Disconnected");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getID() {
|
public String getID() {
|
||||||
return "1";
|
return mHandlerIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void addLogEntry(LogEntry logEntry) {
|
||||||
|
Date date = new Date(logEntry.getTimeStamp());
|
||||||
|
mConsoleLog += mDateFormatter.format(date) + " -> " + logEntry.getMessage() + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("ConstantConditions")
|
||||||
@Override
|
@Override
|
||||||
public boolean handleMessage(Message message) {
|
public boolean handleMessage(Message message) {
|
||||||
return false;
|
|
||||||
|
boolean isClaimed = true;
|
||||||
|
switch (message.what) {
|
||||||
|
case EthereumClientMessage.MSG_EVENT:
|
||||||
|
Bundle data = message.getData();
|
||||||
|
data.setClassLoader(EventFlag.class.getClassLoader());
|
||||||
|
EventFlag event = (EventFlag) data.getSerializable("event");
|
||||||
|
EventData eventData;
|
||||||
|
MessageEventData messageEventData;
|
||||||
|
switch (event) {
|
||||||
|
case EVENT_BLOCK:
|
||||||
|
BlockEventData blockEventData = data.getParcelable("data");
|
||||||
|
addLogEntry(new LogEntry(blockEventData.registeredTime, "Added block with " + blockEventData.receipts.size() + " transaction receipts."));
|
||||||
|
break;
|
||||||
|
case EVENT_HANDSHAKE_PEER:
|
||||||
|
messageEventData = data.getParcelable("data");
|
||||||
|
addLogEntry(new LogEntry(messageEventData.registeredTime, "Peer " + new HelloMessage(messageEventData.message).getPeerId() + " said hello"));
|
||||||
|
break;
|
||||||
|
case EVENT_NO_CONNECTIONS:
|
||||||
|
eventData = data.getParcelable("data");
|
||||||
|
//Disable no connections logging while we use rpc
|
||||||
|
if (!isRpcConnection) {
|
||||||
|
addLogEntry(new LogEntry(eventData.registeredTime, "No connections"));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case EVENT_PEER_DISCONNECT:
|
||||||
|
PeerDisconnectEventData peerDisconnectEventData = data.getParcelable("data");
|
||||||
|
addLogEntry(new LogEntry(peerDisconnectEventData.registeredTime, "Peer " + peerDisconnectEventData.host + ":" + peerDisconnectEventData.port + " disconnected."));
|
||||||
|
break;
|
||||||
|
case EVENT_PENDING_TRANSACTIONS_RECEIVED:
|
||||||
|
PendingTransactionsEventData pendingTransactionsEventData = data.getParcelable("data");
|
||||||
|
addLogEntry(new LogEntry(pendingTransactionsEventData.registeredTime, "Received " + pendingTransactionsEventData.transactions.size() + " pending transactions"));
|
||||||
|
break;
|
||||||
|
case EVENT_RECEIVE_MESSAGE:
|
||||||
|
messageEventData = data.getParcelable("data");
|
||||||
|
addLogEntry(new LogEntry(messageEventData.registeredTime, "Received message: " + messageEventData.messageClass.getName()));
|
||||||
|
break;
|
||||||
|
case EVENT_SEND_MESSAGE:
|
||||||
|
messageEventData = data.getParcelable("data");
|
||||||
|
addLogEntry(new LogEntry(messageEventData.registeredTime, "Sent message: " + messageEventData.messageClass.getName()));
|
||||||
|
break;
|
||||||
|
case EVENT_SYNC_DONE:
|
||||||
|
eventData = data.getParcelable("data");
|
||||||
|
addLogEntry(new LogEntry(eventData.registeredTime, "Sync done"));
|
||||||
|
break;
|
||||||
|
case EVENT_VM_TRACE_CREATED:
|
||||||
|
VMTraceCreatedEventData vmTraceCreatedEventData = data.getParcelable("data");
|
||||||
|
addLogEntry(new LogEntry(vmTraceCreatedEventData.registeredTime,
|
||||||
|
"CM trace created: " + vmTraceCreatedEventData.transactionHash + " - " + vmTraceCreatedEventData.trace));
|
||||||
|
break;
|
||||||
|
case EVENT_TRACE:
|
||||||
|
TraceEventData traceEventData = data.getParcelable("data");
|
||||||
|
System.out.println("We got a trace message: " + traceEventData.message);
|
||||||
|
addLogEntry(new LogEntry(traceEventData.registeredTime, traceEventData.message));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
isClaimed = false;
|
||||||
|
}
|
||||||
|
return isClaimed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,29 +28,18 @@ import com.bumptech.glide.Glide;
|
|||||||
import com.squareup.leakcanary.RefWatcher;
|
import com.squareup.leakcanary.RefWatcher;
|
||||||
|
|
||||||
import org.ethereum.android.service.ConnectorHandler;
|
import org.ethereum.android.service.ConnectorHandler;
|
||||||
import org.ethereum.android.service.EthereumClientMessage;
|
|
||||||
import org.ethereum.android.service.events.BlockEventData;
|
|
||||||
import org.ethereum.android.service.events.EventData;
|
|
||||||
import org.ethereum.android.service.events.EventFlag;
|
import org.ethereum.android.service.events.EventFlag;
|
||||||
import org.ethereum.android.service.events.MessageEventData;
|
|
||||||
import org.ethereum.android.service.events.PeerDisconnectEventData;
|
|
||||||
import org.ethereum.android.service.events.PendingTransactionsEventData;
|
|
||||||
import org.ethereum.android.service.events.TraceEventData;
|
|
||||||
import org.ethereum.android.service.events.VMTraceCreatedEventData;
|
|
||||||
import org.ethereum.net.p2p.HelloMessage;
|
|
||||||
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import io.syng.R;
|
import io.syng.R;
|
||||||
import io.syng.app.SyngApplication;
|
import io.syng.app.SyngApplication;
|
||||||
import io.syng.entity.LogEntry;
|
|
||||||
|
|
||||||
|
|
||||||
public class ConsoleFragment extends Fragment implements ConnectorHandler, OnClickListener {
|
public class ConsoleFragment extends Fragment implements OnClickListener {
|
||||||
|
|
||||||
private static final String ACTION_RECEIVE = "dapp://syng.io/dapps/wallet/#/tab/receive";
|
private static final String ACTION_RECEIVE = "dapp://syng.io/dapps/wallet/#/tab/receive";
|
||||||
private static final String ACTION_SEND = "dapp://syng.io/dapps/wallet/#/tab/send/";
|
private static final String ACTION_SEND = "dapp://syng.io/dapps/wallet/#/tab/send/";
|
||||||
@ -58,28 +47,19 @@ public class ConsoleFragment extends Fragment implements ConnectorHandler, OnCli
|
|||||||
private final static int CONSOLE_LENGTH = 10000;
|
private final static int CONSOLE_LENGTH = 10000;
|
||||||
private final static int CONSOLE_REFRESH_MILLS = 1000 * 5; //5 sec
|
private final static int CONSOLE_REFRESH_MILLS = 1000 * 5; //5 sec
|
||||||
|
|
||||||
private String mConsoleLog = "Slaving to <rpc0.syng.io>";
|
|
||||||
|
|
||||||
private boolean isRpcConnection = true;
|
|
||||||
|
|
||||||
private TextView mConsoleText;
|
private TextView mConsoleText;
|
||||||
|
|
||||||
private Handler mHandler = new Handler();
|
private Handler mHandler = new Handler();
|
||||||
|
|
||||||
private String mHandlerIdentifier = UUID.randomUUID().toString();
|
|
||||||
|
|
||||||
@SuppressLint("SimpleDateFormat")
|
|
||||||
private DateFormat mDateFormatter = new SimpleDateFormat("HH:mm:ss:SSS");
|
|
||||||
|
|
||||||
private Runnable mRunnable = new Runnable() {
|
private Runnable mRunnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
int length = mConsoleLog.length();
|
int length = SyngApplication.mConsoleLog.length();
|
||||||
if (length > CONSOLE_LENGTH) {
|
if (length > CONSOLE_LENGTH) {
|
||||||
mConsoleLog = mConsoleLog.substring(CONSOLE_LENGTH * ((length / CONSOLE_LENGTH) - 1) + length % CONSOLE_LENGTH);
|
SyngApplication.mConsoleLog = SyngApplication.mConsoleLog.substring(CONSOLE_LENGTH * ((length / CONSOLE_LENGTH) - 1) + length % CONSOLE_LENGTH);
|
||||||
}
|
}
|
||||||
mConsoleText.setText(mConsoleLog);
|
mConsoleText.setText(SyngApplication.mConsoleLog);
|
||||||
|
|
||||||
mHandler.postDelayed(mRunnable, CONSOLE_REFRESH_MILLS);
|
mHandler.postDelayed(mRunnable, CONSOLE_REFRESH_MILLS);
|
||||||
}
|
}
|
||||||
@ -92,7 +72,7 @@ public class ConsoleFragment extends Fragment implements ConnectorHandler, OnCli
|
|||||||
View view = inflater.inflate(R.layout.fragment_console, container, false);
|
View view = inflater.inflate(R.layout.fragment_console, container, false);
|
||||||
|
|
||||||
mConsoleText = (TextView) view.findViewById(R.id.tv_console_log);
|
mConsoleText = (TextView) view.findViewById(R.id.tv_console_log);
|
||||||
mConsoleText.setText(mConsoleLog);
|
mConsoleText.setText(SyngApplication.mConsoleLog);
|
||||||
mConsoleText.setMovementMethod(new ScrollingMovementMethod());
|
mConsoleText.setMovementMethod(new ScrollingMovementMethod());
|
||||||
|
|
||||||
ImageView background = (ImageView) view.findViewById(R.id.iv_background);
|
ImageView background = (ImageView) view.findViewById(R.id.iv_background);
|
||||||
@ -113,102 +93,12 @@ public class ConsoleFragment extends Fragment implements ConnectorHandler, OnCli
|
|||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
mHandler.removeCallbacksAndMessages(null);
|
mHandler.removeCallbacksAndMessages(null);
|
||||||
SyngApplication.sEthereumConnector.removeHandler(this);
|
|
||||||
SyngApplication.sEthereumConnector.removeListener(mHandlerIdentifier);
|
|
||||||
SyngApplication.sEthereumConnector.unbindService();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
mHandler.post(mRunnable);
|
mHandler.post(mRunnable);
|
||||||
SyngApplication.sEthereumConnector.registerHandler(this);
|
|
||||||
SyngApplication.sEthereumConnector.bindService();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("ConstantConditions")
|
|
||||||
@Override
|
|
||||||
public boolean handleMessage(Message message) {
|
|
||||||
|
|
||||||
boolean isClaimed = true;
|
|
||||||
switch (message.what) {
|
|
||||||
case EthereumClientMessage.MSG_EVENT:
|
|
||||||
Bundle data = message.getData();
|
|
||||||
data.setClassLoader(EventFlag.class.getClassLoader());
|
|
||||||
EventFlag event = (EventFlag) data.getSerializable("event");
|
|
||||||
EventData eventData;
|
|
||||||
MessageEventData messageEventData;
|
|
||||||
switch (event) {
|
|
||||||
case EVENT_BLOCK:
|
|
||||||
BlockEventData blockEventData = data.getParcelable("data");
|
|
||||||
addLogEntry(new LogEntry(blockEventData.registeredTime, "Added block with " + blockEventData.receipts.size() + " transaction receipts."));
|
|
||||||
break;
|
|
||||||
case EVENT_HANDSHAKE_PEER:
|
|
||||||
messageEventData = data.getParcelable("data");
|
|
||||||
addLogEntry(new LogEntry(messageEventData.registeredTime, "Peer " + new HelloMessage(messageEventData.message).getPeerId() + " said hello"));
|
|
||||||
break;
|
|
||||||
case EVENT_NO_CONNECTIONS:
|
|
||||||
eventData = data.getParcelable("data");
|
|
||||||
//Disable no connections logging while we use rpc
|
|
||||||
if (!isRpcConnection) {
|
|
||||||
addLogEntry(new LogEntry(eventData.registeredTime, "No connections"));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case EVENT_PEER_DISCONNECT:
|
|
||||||
PeerDisconnectEventData peerDisconnectEventData = data.getParcelable("data");
|
|
||||||
addLogEntry(new LogEntry(peerDisconnectEventData.registeredTime, "Peer " + peerDisconnectEventData.host + ":" + peerDisconnectEventData.port + " disconnected."));
|
|
||||||
break;
|
|
||||||
case EVENT_PENDING_TRANSACTIONS_RECEIVED:
|
|
||||||
PendingTransactionsEventData pendingTransactionsEventData = data.getParcelable("data");
|
|
||||||
addLogEntry(new LogEntry(pendingTransactionsEventData.registeredTime, "Received " + pendingTransactionsEventData.transactions.size() + " pending transactions"));
|
|
||||||
break;
|
|
||||||
case EVENT_RECEIVE_MESSAGE:
|
|
||||||
messageEventData = data.getParcelable("data");
|
|
||||||
addLogEntry(new LogEntry(messageEventData.registeredTime, "Received message: " + messageEventData.messageClass.getName()));
|
|
||||||
break;
|
|
||||||
case EVENT_SEND_MESSAGE:
|
|
||||||
messageEventData = data.getParcelable("data");
|
|
||||||
addLogEntry(new LogEntry(messageEventData.registeredTime, "Sent message: " + messageEventData.messageClass.getName()));
|
|
||||||
break;
|
|
||||||
case EVENT_SYNC_DONE:
|
|
||||||
eventData = data.getParcelable("data");
|
|
||||||
addLogEntry(new LogEntry(eventData.registeredTime, "Sync done"));
|
|
||||||
break;
|
|
||||||
case EVENT_VM_TRACE_CREATED:
|
|
||||||
VMTraceCreatedEventData vmTraceCreatedEventData = data.getParcelable("data");
|
|
||||||
addLogEntry(new LogEntry(vmTraceCreatedEventData.registeredTime,
|
|
||||||
"CM trace created: " + vmTraceCreatedEventData.transactionHash + " - " + vmTraceCreatedEventData.trace));
|
|
||||||
break;
|
|
||||||
case EVENT_TRACE:
|
|
||||||
TraceEventData traceEventData = data.getParcelable("data");
|
|
||||||
addLogEntry(new LogEntry(traceEventData.registeredTime, traceEventData.message));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
isClaimed = false;
|
|
||||||
}
|
|
||||||
return isClaimed;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addLogEntry(LogEntry logEntry) {
|
|
||||||
Date date = new Date(logEntry.getTimeStamp());
|
|
||||||
mConsoleLog += mDateFormatter.format(date) + " -> " + logEntry.getMessage() + "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getID() {
|
|
||||||
return mHandlerIdentifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onConnectorConnected() {
|
|
||||||
SyngApplication.sEthereumConnector.addListener(mHandlerIdentifier, EnumSet.allOf(EventFlag.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onConnectorDisconnected() {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
<string name="pref_json_rpc_server_default" translate="false">rpc0.syng.io:8545</string>
|
<string name="pref_json_rpc_server_default" translate="false">http://rpc0.syng.io:8545</string>
|
||||||
<string name="pref_json_rpc_server_key" translate="false">pref_json_rpc_server_key</string>
|
<string name="pref_json_rpc_server_key" translate="false">pref_json_rpc_server_key</string>
|
||||||
<string name="pref_json_rpc_server_title" translate="false">JSON-RPC server address</string>
|
<string name="pref_json_rpc_server_title" translate="false">JSON-RPC server address</string>
|
||||||
<string name="pref_running_mode_key" translate="false">running_mode</string>
|
<string name="pref_running_mode_key" translate="false">running_mode</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user