(respLen);;
+ } else {
+ jenv->DeleteLocalRef(dataRecv);
+ detachJVM(jenv, envStat);
+ LOGE("BtExchange response buffer too small: %u < %u", respLen, max_resp_len);
+ return -2;
+ }
+}
+
+/**
+ * @brief ConfirmTransfers
+ * @param transfers - string of "fee (':' address ':' amount)+"
+ *
+ * @return true on accept, false on reject
+ */
+bool ConfirmTransfers(const char *transfers) {
+ JNIEnv *jenv;
+ int envStat = attachJVM(&jenv);
+ if (envStat == JNI_ERR) return -16;
+
+ jmethodID confirmMethod = jenv->GetStaticMethodID(class_SidekickService, "ConfirmTransfers",
+ "(Ljava/lang/String;)Z");
+
+ jstring _transfers = jenv->NewStringUTF(transfers);
+ auto confirmed =
+ jenv->CallStaticBooleanMethod(class_SidekickService, confirmMethod, _transfers);
+ jenv->DeleteLocalRef(_transfers);
+ return confirmed;
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/app/src/main/cpp/monerujo.h b/app/src/main/cpp/monerujo.h
index 0fb3444428..f11df08d8f 100644
--- a/app/src/main/cpp/monerujo.h
+++ b/app/src/main/cpp/monerujo.h
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2017 m2049r
+ * Copyright (c) 2017-2024 m2049r
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +19,8 @@
#include
+#include
+
/*
#include
@@ -28,6 +30,10 @@
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
*/
+void ThrowException(JNIEnv *jenv, const char* type, const char* msg) {
+ jenv->ThrowNew(jenv->FindClass(type), msg);
+}
+
jfieldID getHandleField(JNIEnv *env, jobject obj, const char *fieldName = "handle") {
jclass c = env->GetObjectClass(obj);
return env->GetFieldID(c, fieldName, "J"); // of type long
@@ -35,8 +41,16 @@ jfieldID getHandleField(JNIEnv *env, jobject obj, const char *fieldName = "handl
template
T *getHandle(JNIEnv *env, jobject obj, const char *fieldName = "handle") {
+ return reinterpret_cast(env->GetLongField(obj, getHandleField(env, obj, fieldName)));
+}
+
+template
+void destroyNativeObject(JNIEnv *env, T nativeObjectHandle, jobject obj, const char *fieldName = "handle") {
jlong handle = env->GetLongField(obj, getHandleField(env, obj, fieldName));
- return reinterpret_cast(handle);
+ if (handle != 0) {
+ ThrowException(env, "java/lang/IllegalStateException", "invalid handle (destroy)");
+ }
+ delete reinterpret_cast(nativeObjectHandle);
}
void setHandleFromLong(JNIEnv *env, jobject obj, jlong handle) {
@@ -54,7 +68,7 @@ extern "C"
{
#endif
-extern const char* const MONERO_VERSION; // the actual monero core version
+extern const char *const MONERO_VERSION; // the actual monero core version
// from monero-core crypto/hash-ops.h - avoid #including monero code here
enum {
@@ -62,18 +76,40 @@ enum {
HASH_DATA_AREA = 136
};
-void cn_slow_hash(const void *data, size_t length, char *hash, int variant, int prehashed, uint64_t height);
+void cn_slow_hash(const void *data, size_t length, char *hash, int variant, int prehashed,
+ uint64_t height);
inline void slow_hash(const void *data, const size_t length, char *hash) {
cn_slow_hash(data, length, hash, 0 /*variant*/, 0 /*prehashed*/, 0 /*height*/);
}
inline void slow_hash_broken(const void *data, char *hash, int variant) {
- cn_slow_hash(data, 200 /*sizeof(union hash_state)*/, hash, variant, 1 /*prehashed*/, 0 /*height*/);
+ cn_slow_hash(data, 200 /*sizeof(union hash_state)*/, hash, variant, 1 /*prehashed*/,
+ 0 /*height*/);
}
-
#ifdef __cplusplus
}
#endif
+namespace Monerujo {
+ class SidekickWallet {
+ public:
+ enum Status {
+ Status_Ok,
+ Status_Error,
+ Status_Critical
+ };
+
+ SidekickWallet(uint8_t networkType, std::string a, std::string b);
+
+ ~SidekickWallet();
+
+ std::string call(int commandId, const std::string &request);
+
+ void reset();
+
+ Status status() const;
+
+ };
+}
#endif //XMRWALLET_WALLET_LIB_H
diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 0000000000..b44759f5d7
Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ
diff --git a/app/src/main/java/com/m2049r/xmrwallet/BaseActivity.java b/app/src/main/java/com/m2049r/xmrwallet/BaseActivity.java
index b714ea27f2..1ab1d5bd68 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/BaseActivity.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/BaseActivity.java
@@ -16,7 +16,17 @@
package com.m2049r.xmrwallet;
+import android.Manifest;
+import android.app.AlertDialog;
import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.net.ConnectivityManager;
+import android.net.Network;
+import android.net.NetworkCapabilities;
+import android.net.NetworkInfo;
+import android.net.Uri;
+import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@@ -24,7 +34,8 @@
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.CallSuper;
-import androidx.fragment.app.FragmentActivity;
+import androidx.annotation.NonNull;
+import androidx.core.app.ActivityCompat;
import com.m2049r.xmrwallet.data.BarcodeData;
import com.m2049r.xmrwallet.dialog.ProgressDialog;
@@ -159,4 +170,87 @@ private BarcodeData popBarcodeData() {
barcodeData = null;
return popped;
}
+
+ public boolean isNetworkAvailable() {
+ ConnectivityManager connectivityManager = (ConnectivityManager) getApplication().getSystemService(Context.CONNECTIVITY_SERVICE);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ Network network = connectivityManager.getActiveNetwork();
+ if (network == null) return false;
+ NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(network);
+ return networkCapabilities != null && (networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) || networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) || networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET) || networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_BLUETOOTH));
+ } else {
+ NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
+ return networkInfo != null && networkInfo.isConnected();
+ }
+ }
+
+ static private final int REQUEST_CODE_BLUETOOTH_PERMISSIONS = 32423;
+
+ void btPermissionGranted() {
+ }
+
+ @Override
+ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+ if (requestCode == REQUEST_CODE_BLUETOOTH_PERMISSIONS) {
+ if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED && grantResults[1] == PackageManager.PERMISSION_GRANTED) {
+ btPermissionGranted();
+ } // else onResume() takes care of trying again
+ }
+ }
+
+ private void showBtPermissionsDialog() {
+ AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
+ alertDialogBuilder.setMessage(R.string.bluetooth_permissions);
+ alertDialogBuilder.setPositiveButton(R.string.bluetooth_permissions_ok,
+ (dialog, which) -> requestBtPermissions());
+ alertDialogBuilder.setCancelable(false);
+ AlertDialog alertDialog = alertDialogBuilder.create();
+ alertDialog.show();
+ }
+
+ private void showAppInfoDialog() {
+ AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
+ alertDialogBuilder.setMessage(R.string.bluetooth_permissions);
+ alertDialogBuilder.setPositiveButton(R.string.bluetooth_permissions_settings, (dialog, which) -> {
+ Intent i = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+ i.addCategory(Intent.CATEGORY_DEFAULT);
+ i.setData(Uri.parse("package:" + getPackageName()));
+ startActivity(i);
+ });
+ alertDialogBuilder.setNegativeButton(R.string.bluetooth_permissions_cancel, (dialog, which) -> {
+ finish();
+ });
+ alertDialogBuilder.setCancelable(false);
+ AlertDialog alertDialog = alertDialogBuilder.create();
+ alertDialog.show();
+ }
+
+ private void requestBtPermissions() {
+ ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_SCAN}, REQUEST_CODE_BLUETOOTH_PERMISSIONS);
+ }
+
+ private boolean firstCheck = true;
+
+ void checkBtPermissions() {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
+ if ((ActivityCompat.checkSelfPermission(this, android.Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED) ||
+ (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.BLUETOOTH_SCAN) != PackageManager.PERMISSION_GRANTED)) {
+ if (shouldShowRequestPermissionRationale(android.Manifest.permission.BLUETOOTH_SCAN) || shouldShowRequestPermissionRationale(Manifest.permission.BLUETOOTH_CONNECT)) {
+ showBtPermissionsDialog();
+ } else {
+ if (firstCheck) {
+ requestBtPermissions();
+ } else {
+ showAppInfoDialog();
+ }
+ }
+ } else {
+ btPermissionGranted();
+ }
+ firstCheck = false;
+ } else {
+ btPermissionGranted();
+ }
+ }
}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/BluetoothFragment.java b/app/src/main/java/com/m2049r/xmrwallet/BluetoothFragment.java
new file mode 100644
index 0000000000..d7ad841023
--- /dev/null
+++ b/app/src/main/java/com/m2049r/xmrwallet/BluetoothFragment.java
@@ -0,0 +1,326 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// mostly from BluetoothChatFragment https://github.com/android/connectivity-samples
+
+package com.m2049r.xmrwallet;
+
+import android.app.Activity;
+import android.bluetooth.BluetoothAdapter;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+import com.m2049r.xmrwallet.service.BluetoothService;
+import com.m2049r.xmrwallet.util.Flasher;
+
+import java.security.SecureRandom;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import timber.log.Timber;
+
+public class BluetoothFragment extends Fragment {
+
+ public BluetoothFragment() {
+ super();
+ }
+
+ interface Listener {
+ void onDeviceConnected(String connectedDeviceName);
+
+ void abort(String message);
+
+ void onReceive(int commandId);
+ }
+
+ //TODO enable discover only after wallet is loaded
+ Listener activityCallback;
+
+ // Intent request codes
+ private static final int REQUEST_ENABLE_BT = 3;
+
+ private ImageView btIcon;
+ private ProgressBar pbConnecting;
+ private TextView btCode;
+ private TextView btName;
+
+ private String connectedDeviceName = null;
+
+ private BluetoothAdapter bluetoothAdapter = null;
+
+ private BluetoothService bluetoothService = null;
+
+ public enum Mode {
+ CLIENT, SERVER
+ }
+
+ private Mode mode = Mode.CLIENT;
+
+ public BluetoothFragment(Mode mode) {
+ super();
+ this.mode = mode;
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ // Get local Bluetooth adapter
+ bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
+ // If the adapter is null, then Bluetooth is not supported
+ if (bluetoothAdapter == null) {
+ if (activityCallback != null)
+ activityCallback.abort("Bluetooth is not available"); //TODO strings.xml
+ }
+ }
+
+ public void start() {
+ if (bluetoothAdapter == null) return;
+
+ // If BT is not on, request that it be enabled.
+ // setupComm() will then be called during onActivityResult
+ if (!bluetoothAdapter.isEnabled()) {
+ Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
+ startActivityForResult(enableIntent, REQUEST_ENABLE_BT);
+ } else if (bluetoothService == null) {
+ setupCommunication();
+ }
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ if (bluetoothService != null) {
+ bluetoothService.setUiHandler(null);
+ bluetoothService = null;
+ }
+ // The BluetoothService is stopped in LoginActivity::onDestroy
+ }
+
+ @Override
+ public void onPause() {
+ Timber.d("onPause %s", mode);
+ super.onPause();
+ }
+
+ @Override
+ public void onResume() {
+ Timber.d("onResume %s", mode);
+ super.onResume();
+
+ // Performing this check in onResume() covers the case in which BT was
+ // not enabled during onStart(), so we were paused to enable it...
+ // onResume() will be called when ACTION_REQUEST_ENABLE activity returns.
+ if (bluetoothService != null) {
+ // Only if the state is STATE_NONE, do we know that we haven't started already
+ if (!bluetoothService.isStarted()) {
+ // Start the Bluetooth services
+ bluetoothService.start();
+ }
+ }
+ }
+
+ @Override
+ public void onAttach(@NonNull Context context) {
+ super.onAttach(context);
+ if (context instanceof BluetoothFragment.Listener) {
+ activityCallback = (BluetoothFragment.Listener) context;
+ } else {
+ throw new ClassCastException(context.toString()
+ + " must implement Listener");
+ }
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
+ @Nullable Bundle savedInstanceState) {
+ Timber.d("onCreateView");
+ return inflater.inflate(R.layout.fragment_bluetooth, container, false);
+ }
+
+ @Override
+ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
+ Timber.d("onViewCreated");
+ super.onCreate(savedInstanceState);
+ if (savedInstanceState != null) return;
+ btName = view.findViewById(R.id.btName);
+ btCode = view.findViewById(R.id.btCode);
+ btIcon = view.findViewById(R.id.btIcon);
+ pbConnecting = view.findViewById(R.id.pbConnecting);
+ setConnecting(false);
+ setInfo(null, null);
+ }
+
+ /**
+ * Set up the UI and background operations for comms.
+ */
+ private void setupCommunication() {
+ Timber.d("startCommunication()");
+ if (!isAdded()) {
+ return;
+ }
+
+ if (bluetoothService != null) throw new IllegalStateException("bluetoothService != null");
+
+ // Initialize the BluetoothService to perform bluetooth connections
+ bluetoothService = BluetoothService.GetInstance();
+ bluetoothService.setUiHandler(handler);
+ if (mode == Mode.SERVER)
+ bluetoothService.start();
+ setInfo(bluetoothService.getConnectedName(), bluetoothService.getConnectedCode());
+ showState(bluetoothService.getState());
+ }
+
+ private void showState(int state) {
+ if (!isAdded()) return;
+ Light light;
+ switch (state) {
+ case BluetoothService.State.LISTEN:
+ light = Light.LISTEN;
+ break;
+ case BluetoothService.State.CONNECTING:
+ light = Light.CONNECTING;
+ break;
+ case BluetoothService.State.CONNECTED:
+ light = Light.CONNECTED;
+ break;
+ case BluetoothService.State.NONE:
+ default:
+ light = Light.NONE;
+ }
+ final Flasher flash = new Flasher(requireContext(), light);
+ btIcon.setImageDrawable(flash.getDrawable());
+ btFlash = flash;
+ }
+
+ @Getter
+ @RequiredArgsConstructor
+ public enum Light implements Flasher.Light {
+ LISTEN(R.drawable.ic_bluetooth_24),
+
+ CONNECTING(R.drawable.ic_bluetooth_searching_24),
+
+ CONNECTED(R.drawable.ic_bluetooth_connected_24),
+
+ NONE(R.drawable.ic_bluetooth_disabled_24);
+
+ final private int drawableId;
+ }
+
+ Flasher btFlash;
+
+ private void flashState() {
+ if (btFlash != null)
+ btFlash.flash(getView());
+ }
+
+ /**
+ * The Handler that gets information back from the BluetoothService
+ */
+ private final Handler handler = new Handler(Looper.getMainLooper()) {
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case BluetoothService.MessageType.STATE_CHANGE:
+ showState(msg.arg1);
+ if (msg.arg1 <= BluetoothService.State.LISTEN) {
+ setInfo(null, null);
+ connectedDeviceName = null;
+ activityCallback.onDeviceConnected(null); // i.e. disconnected - ugly :(
+ setConnecting(false);
+ }
+ break;
+ case BluetoothService.MessageType.WRITE:
+ Timber.d("WRITE_MESSAGE: %d bytes", msg.arg1);
+ break;
+ case BluetoothService.MessageType.READ_CMD:
+ Timber.d("READ_COMMAND 0x%x (%d bytes)", msg.arg2, msg.arg1);
+ if (activityCallback != null) {
+ activityCallback.onReceive(msg.arg2);
+ }
+ break;
+ case BluetoothService.MessageType.CODE:
+ Timber.d("CODE: %s", msg.obj);
+ btCode.setText((String) msg.obj);
+ break;
+ case BluetoothService.MessageType.DEVICE_NAME:
+ connectedDeviceName = (String) msg.obj;
+ setInfo(connectedDeviceName, null);
+ activityCallback.onDeviceConnected(connectedDeviceName);
+ setConnecting(false);
+ if (mode == Mode.CLIENT) {
+ final int code = new SecureRandom().nextInt(10000);
+ bluetoothService.write(code);
+ }
+ break;
+ case BluetoothService.MessageType.TOAST:
+ if (isAdded())
+ Toast.makeText(getActivity(), (String) msg.obj, Toast.LENGTH_SHORT).show();
+ break;
+ }
+ flashState();
+ }
+ };
+
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ if (requestCode == REQUEST_ENABLE_BT) {// When the request to enable Bluetooth returns
+ if (resultCode == Activity.RESULT_OK) {
+ // Bluetooth is now enabled, so set up a chat session
+ setupCommunication();
+ } else {
+ // User did not enable Bluetooth or an error occurred
+ Timber.d("BT not enabled");
+ if (activityCallback != null)
+ activityCallback.abort("Bluetooth is not enabled"); //TODO strings.xml
+ }
+ } else {
+ Timber.w("Unhandled request code %d", requestCode);
+ }
+ flashState();
+ }
+
+ private void setConnecting(boolean enable) {
+ pbConnecting.setVisibility(enable ? View.VISIBLE : View.INVISIBLE);
+ }
+
+ public void connectDevice(String address) {
+ setConnecting(true);
+ bluetoothService.connect(bluetoothAdapter.getRemoteDevice(address));
+ }
+
+ private void setInfo(String name, String code) {
+ try {
+ btName.setText(name == null ? getResources().getString(R.string.sidekick_not_connected) : name);
+ btCode.setText(getResources().getString(R.string.sidekick_pin, code != null ? code : "----"));
+ } catch (IllegalStateException ex) { // no context, so no strings
+ // never mind
+ }
+ }
+}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/GenerateFragment.java b/app/src/main/java/com/m2049r/xmrwallet/GenerateFragment.java
index 57df4b1a10..b37020f8eb 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/GenerateFragment.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/GenerateFragment.java
@@ -18,7 +18,6 @@
import android.app.Activity;
import android.content.Context;
-import android.content.DialogInterface;
import android.os.Bundle;
import android.text.Editable;
import android.text.Html;
@@ -67,8 +66,20 @@ public class GenerateFragment extends Fragment {
static final String TYPE_KEY = "key";
static final String TYPE_SEED = "seed";
static final String TYPE_LEDGER = "ledger";
+ static final String TYPE_SIDEKICK = "sidekick";
static final String TYPE_VIEWONLY = "view";
+ static Wallet.Device getDeviceType(String type) {
+ switch (type) {
+ case TYPE_SIDEKICK:
+ return Wallet.Device.Sidekick;
+ case TYPE_LEDGER:
+ return Wallet.Device.Ledger;
+ default:
+ return Wallet.Device.Software;
+ }
+ }
+
private TextInputLayout etWalletName;
private PasswordEntryView etWalletPassword;
private LinearLayout llFingerprintAuth;
@@ -195,6 +206,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
etWalletPassword.getEditText().setImeOptions(EditorInfo.IME_ACTION_UNSPECIFIED);
break;
case TYPE_LEDGER:
+ case TYPE_SIDEKICK:
etWalletPassword.getEditText().setImeOptions(EditorInfo.IME_ACTION_DONE);
etWalletPassword.getEditText().setOnEditorActionListener((v, actionId, event) -> {
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
@@ -308,7 +320,7 @@ void toggleSeedOffset() {
private boolean checkName() {
String name = etWalletName.getEditText().getText().toString();
boolean ok = true;
- if (name.length() == 0) {
+ if (name.isEmpty()) {
etWalletName.setError(getString(R.string.generate_wallet_name));
ok = false;
} else if (name.charAt(0) == '.') {
@@ -450,11 +462,12 @@ private void generateWallet() {
activityCallback.onGenerate(name, crazyPass, seed, offset, height);
break;
case TYPE_LEDGER:
+ case TYPE_SIDEKICK:
bGenerate.setEnabled(false);
if (fingerprintAuthAllowed) {
KeyStoreHelper.saveWalletUserPass(requireActivity(), name, password);
}
- activityCallback.onGenerateLedger(name, crazyPass, height);
+ activityCallback.onGenerateDevice(getDeviceType(type), name, crazyPass, height);
break;
case TYPE_KEY:
case TYPE_VIEWONLY:
@@ -498,6 +511,8 @@ String getType() {
return getString(R.string.generate_wallet_type_seed);
case TYPE_LEDGER:
return getString(R.string.generate_wallet_type_ledger);
+ case TYPE_SIDEKICK:
+ return getString(R.string.generate_wallet_type_sidekick);
case TYPE_VIEWONLY:
return getString(R.string.generate_wallet_type_view);
default:
@@ -515,7 +530,7 @@ public interface Listener {
void onGenerate(String name, String password, String address, String viewKey, String spendKey, long height);
- void onGenerateLedger(String name, String password, long height);
+ void onGenerateDevice(Wallet.Device device, String name, String password, long height);
void setTitle(String title);
@@ -555,6 +570,9 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
case TYPE_LEDGER:
inflater.inflate(R.menu.create_wallet_ledger, menu);
break;
+ case TYPE_SIDEKICK:
+ inflater.inflate(R.menu.create_wallet_sidekick, menu);
+ break;
case TYPE_VIEWONLY:
inflater.inflate(R.menu.create_wallet_view, menu);
break;
@@ -581,13 +599,11 @@ public void convertLedgerSeed() {
.setCancelable(false)
.setPositiveButton(getString(R.string.label_ok), null)
.setNegativeButton(getString(R.string.label_cancel),
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- Helper.hideKeyboardAlways(activity);
- etWalletMnemonic.getEditText().getText().clear();
- dialog.cancel();
- ledgerDialog = null;
- }
+ (dialog, id) -> {
+ Helper.hideKeyboardAlways(activity);
+ etWalletMnemonic.getEditText().getText().clear();
+ dialog.cancel();
+ ledgerDialog = null;
});
ledgerDialog = alertDialogBuilder.create();
diff --git a/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java b/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java
index 1fd57d9d82..36adc779f2 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java
@@ -254,7 +254,7 @@ protected void onPreExecute() {
showProgress();
if ((walletPath != null)
&& (WalletManager.getInstance().queryWalletDevice(walletPath + ".keys", getPassword())
- == Wallet.Device.Device_Ledger)
+ == Wallet.Device.Ledger)
&& (progressCallback != null)) {
progressCallback.showLedgerProgressDialog(LedgerProgressDialog.TYPE_RESTORE);
dialogOpened = true;
@@ -286,10 +286,11 @@ protected Boolean doInBackground(String... params) {
height = wallet.getRestoreHeight();
seed = wallet.getSeed(getSeedOffset());
switch (wallet.getDeviceType()) {
- case Device_Ledger:
+ case Ledger:
viewKey = Ledger.Key();
break;
- case Device_Software:
+ case Software:
+ case Sidekick:
viewKey = wallet.getSecretViewKey();
break;
default:
diff --git a/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java b/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java
index b6a9f5fa91..a167f3e6cb 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java
@@ -55,6 +55,7 @@
import com.m2049r.xmrwallet.model.NetworkType;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
+import com.m2049r.xmrwallet.service.BluetoothService;
import com.m2049r.xmrwallet.service.WalletService;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.KeyStoreHelper;
@@ -76,13 +77,12 @@
import java.util.Map;
import java.util.Set;
-import lombok.Getter;
import timber.log.Timber;
public class LoginActivity extends BaseActivity
implements LoginFragment.Listener, GenerateFragment.Listener,
GenerateReviewFragment.Listener, GenerateReviewFragment.AcceptListener,
- NodeFragment.Listener, SettingsFragment.Listener {
+ NodeFragment.Listener, SettingsFragment.Listener, SidekickConnectFragment.Listener, BluetoothFragment.Listener {
private static final String GENERATE_STACK = "gen";
private static final String NODES_PREFS_NAME = "nodes";
@@ -278,8 +278,15 @@ public void setTitle(String title, String subtitle) {
}
@Override
- public boolean hasLedger() {
- return Ledger.isConnected();
+ public boolean hasDevice(Wallet.Device type) {
+ switch (type) {
+ case Ledger:
+ return Ledger.isConnected();
+ case Sidekick:
+ return BluetoothService.IsConnected();
+ default:
+ return true;
+ }
}
@Override
@@ -311,8 +318,8 @@ protected void onCreate(Bundle savedInstanceState) {
}
});
- loadFavouritesWithNetwork();
-
+ if (isNetworkAvailable())
+ loadFavouritesWithNetwork();
LegacyStorageHelper.migrateWallets(this);
if (savedInstanceState == null) startLoginFragment();
@@ -334,7 +341,7 @@ boolean checkServiceRunning() {
@Override
public boolean onWalletSelected(String walletName, boolean streetmode) {
- if (node == null) {
+ if (isNetworkAvailable() && (node == null)) {
Toast.makeText(this, getString(R.string.prompt_daemon_missing), Toast.LENGTH_SHORT).show();
return false;
}
@@ -682,6 +689,7 @@ protected void onDestroy() {
dismissProgressDialog();
unregisterDetachReceiver();
Ledger.disconnect();
+ BluetoothService.Stop();
super.onDestroy();
}
@@ -695,6 +703,7 @@ protected void onResume() {
new AsyncWaitForService().execute();
}
if (!Ledger.isConnected()) attachLedger();
+ if (BluetoothService.IsConnected()) onLedgerAction(); //TODO sidekick & show sidekick fab
registerTor();
}
@@ -727,14 +736,14 @@ protected void onPostExecute(Void result) {
}
}
- void startWallet(String walletName, String walletPassword,
- boolean fingerprintUsed, boolean streetmode) {
+ void startWallet(String walletName, String walletPassword, boolean fingerprintUsed, StartMode mode) {
Timber.d("startWallet()");
+
Intent intent = new Intent(getApplicationContext(), WalletActivity.class);
intent.putExtra(WalletActivity.REQUEST_ID, walletName);
intent.putExtra(WalletActivity.REQUEST_PW, walletPassword);
intent.putExtra(WalletActivity.REQUEST_FINGERPRINT_USED, fingerprintUsed);
- intent.putExtra(WalletActivity.REQUEST_STREETMODE, streetmode);
+ intent.putExtra(WalletActivity.REQUEST_STREETMODE, mode == StartMode.Street);
if (uri != null) {
intent.putExtra(WalletActivity.REQUEST_URI, uri);
uri = null; // use only once
@@ -783,6 +792,11 @@ void startSettingsFragment() {
Timber.d("SettingsFragment placed");
}
+ void startSidekickConnectFragment() {
+ replaceFragment(new SidekickConnectFragment(), null, null);
+ Timber.d("SidekickConnectFragment placed");
+ }
+
void replaceFragment(Fragment newFragment, String stackName, Bundle extras) {
if (extras != null) {
newFragment.setArguments(extras);
@@ -821,7 +835,7 @@ private class AsyncCreateWallet extends AsyncTask {
protected void onPreExecute() {
super.onPreExecute();
acquireWakeLock();
- if (walletCreator.isLedger()) {
+ if (walletCreator.device() == Wallet.Device.Ledger) {
showLedgerProgressDialog(LedgerProgressDialog.TYPE_RESTORE);
} else {
showProgressDialog(R.string.generate_wallet_creating);
@@ -890,8 +904,7 @@ void walletGenerateError() {
interface WalletCreator {
boolean createWallet(File aFile, String password);
- boolean isLedger();
-
+ Wallet.Device device();
}
boolean checkAndCloseWallet(Wallet aWallet) {
@@ -909,8 +922,8 @@ public void onGenerate(final String name, final String password) {
createWallet(name, password,
new WalletCreator() {
@Override
- public boolean isLedger() {
- return false;
+ public Wallet.Device device() {
+ return Wallet.Device.Software;
}
@Override
@@ -933,8 +946,8 @@ public void onGenerate(final String name, final String password,
createWallet(name, password,
new WalletCreator() {
@Override
- public boolean isLedger() {
- return false;
+ public Wallet.Device device() {
+ return Wallet.Device.Software;
}
@Override
@@ -947,20 +960,19 @@ public boolean createWallet(File aFile, String password) {
}
@Override
- public void onGenerateLedger(final String name, final String password,
- final long restoreHeight) {
+ public void onGenerateDevice(final Wallet.Device device, final String name, final String password, long restoreHeight) {
createWallet(name, password,
new WalletCreator() {
@Override
- public boolean isLedger() {
- return true;
+ public Wallet.Device device() {
+ return device;
}
@Override
public boolean createWallet(File aFile, String password) {
Wallet newWallet = WalletManager.getInstance()
.createWalletFromDevice(aFile, password,
- restoreHeight, "Ledger");
+ restoreHeight, device);
return checkAndCloseWallet(newWallet);
}
});
@@ -973,8 +985,8 @@ public void onGenerate(final String name, final String password,
createWallet(name, password,
new WalletCreator() {
@Override
- public boolean isLedger() {
- return false;
+ public Wallet.Device device() {
+ return Wallet.Device.Software;
}
@Override
@@ -1105,6 +1117,9 @@ public boolean onOptionsItemSelected(MenuItem item) {
} else if (id == R.id.action_create_help_ledger) {
HelpFragment.display(getSupportFragmentManager(), R.string.help_create_ledger);
return true;
+ } else if (id == R.id.action_create_help_sidekick) {
+ HelpFragment.display(getSupportFragmentManager(), R.string.help_create_sidekick);
+ return true;
} else if (id == R.id.action_details_help) {
HelpFragment.display(getSupportFragmentManager(), R.string.help_details);
return true;
@@ -1117,6 +1132,9 @@ public boolean onOptionsItemSelected(MenuItem item) {
} else if (id == R.id.action_help_node) {
HelpFragment.display(getSupportFragmentManager(), R.string.help_node);
return true;
+ } else if (id == R.id.action_help_sidekick) {
+ HelpFragment.display(getSupportFragmentManager(), R.string.help_sidekick);
+ return true;
} else if (id == R.id.action_default_nodes) {
Fragment f = getSupportFragmentManager().findFragmentById(R.id.fragment_container);
if ((WalletManager.getInstance().getNetworkType() == NetworkType.NetworkType_Mainnet) &&
@@ -1124,6 +1142,9 @@ public boolean onOptionsItemSelected(MenuItem item) {
((NodeFragment) f).restoreDefaultNodes();
}
return true;
+ } else if (id == R.id.action_sidekick) {
+ checkBtPermissions();
+ return true;
} else if (id == R.id.action_ledger_seed) {
Fragment f = getSupportFragmentManager().findFragmentById(R.id.fragment_container);
if (f instanceof GenerateFragment) {
@@ -1135,6 +1156,11 @@ public boolean onOptionsItemSelected(MenuItem item) {
}
}
+ @Override
+ void btPermissionGranted() {
+ startSidekickConnectFragment();
+ }
+
// an AsyncTask which tests the node before trying to open the wallet
private class AsyncOpenWallet extends AsyncTask {
final static int OK = 0;
@@ -1172,7 +1198,7 @@ protected void onPostExecute(Boolean result) {
if (result) {
Timber.d("selected wallet is .%s.", node.getName());
// now it's getting real, onValidateFields if wallet exists
- promptAndStart(walletName, streetmode);
+ promptAndStart(walletName, streetmode ? StartMode.Street : StartMode.Normal);
} else {
if (node.getResponseCode() == 0) { // IOException
Toast.makeText(LoginActivity.this, getString(R.string.status_wallet_node_invalid), Toast.LENGTH_LONG).show();
@@ -1184,25 +1210,25 @@ protected void onPostExecute(Boolean result) {
}
- boolean checkDevice(String walletName, String password) {
- String keyPath = new File(Helper.getWalletRoot(LoginActivity.this),
- walletName + ".keys").getAbsolutePath();
+ private boolean checkDevice(String walletName, String password) {
+ String keyPath = new File(Helper.getWalletRoot(this), walletName + ".keys").getAbsolutePath();
// check if we need connected hardware
- Wallet.Device device = WalletManager.getInstance().queryWalletDevice(keyPath, password);
- if (device == Wallet.Device.Device_Ledger) {
- if (!hasLedger()) {
+ final Wallet.Device device = WalletManager.getInstance().queryWalletDevice(keyPath, password);
+ if (!hasDevice(device)) {
+ if (device == Wallet.Device.Ledger) {
toast(R.string.open_wallet_ledger_missing);
- } else {
- return true;
+ } else if (device == Wallet.Device.Sidekick) {
+ toast(R.string.open_wallet_sidekick_missing);
}
- } else {// device could be undefined meaning the password is wrong
- // this gets dealt with later
- return true;
+ return false;
}
- return false;
+ // else // device could be undefined meaning the password is wrong
+ return true;
}
- void promptAndStart(String walletName, final boolean streetmode) {
+ enum StartMode {Normal, Street}
+
+ void promptAndStart(String walletName, final StartMode mode) {
File walletFile = Helper.getWalletFile(this, walletName);
if (WalletManager.getInstance().walletExists(walletFile)) {
Helper.promptPassword(LoginActivity.this, walletName, false,
@@ -1210,7 +1236,7 @@ void promptAndStart(String walletName, final boolean streetmode) {
@Override
public void act(String walletName, String password, boolean fingerprintUsed) {
if (checkDevice(walletName, password))
- startWallet(walletName, password, fingerprintUsed, streetmode);
+ startWallet(walletName, password, fingerprintUsed, mode);
}
@Override
@@ -1378,6 +1404,28 @@ private UsbManager getUsbManager() {
return usbManager;
}
+ @Override
+ public void onDeviceConnected(String connectedDeviceName) {
+ Timber.d("onDeviceConnected: %s", connectedDeviceName);
+ try {
+ SidekickConnectFragment f = (SidekickConnectFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_container);
+ f.allowClick();
+ } catch (ClassCastException ex) {
+ // ignore it
+ }
+ }
+
+ @Override
+ public void abort(String message) {
+ Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
+ onBackPressed();
+ }
+
+ @Override
+ public void onReceive(int command) {
+ Timber.e("this should not be");
+ }
+
//
// Tor (Orbot) stuff
//
diff --git a/app/src/main/java/com/m2049r/xmrwallet/LoginFragment.java b/app/src/main/java/com/m2049r/xmrwallet/LoginFragment.java
index 8e920adb69..abc0e68549 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/LoginFragment.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/LoginFragment.java
@@ -46,6 +46,7 @@
import com.m2049r.xmrwallet.data.NodeInfo;
import com.m2049r.xmrwallet.dialog.HelpFragment;
import com.m2049r.xmrwallet.layout.WalletInfoAdapter;
+import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.KeyStoreHelper;
@@ -61,6 +62,7 @@
import java.util.List;
import java.util.Set;
+import lombok.Getter;
import timber.log.Timber;
public class LoginFragment extends Fragment implements WalletInfoAdapter.OnInteractionListener,
@@ -115,7 +117,9 @@ public interface Listener {
Set getOrPopulateFavourites();
- boolean hasLedger();
+ boolean hasDevice(Wallet.Device type);
+
+ boolean isNetworkAvailable();
void runOnNetCipher(Runnable runnable);
}
@@ -146,7 +150,6 @@ public void onResume() {
activityCallback.setToolbarButton(Toolbar.BUTTON_SETTINGS);
activityCallback.showNet();
showNetwork();
- //activityCallback.runOnNetCipher(this::pingSelectedNode);
}
private OnBackPressedCallback onBackPressedCallback = new OnBackPressedCallback(false) {
@@ -172,6 +175,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
fabSeed = view.findViewById(R.id.fabSeed);
fabImport = view.findViewById(R.id.fabImport);
fabLedger = view.findViewById(R.id.fabLedger);
+ fabSidekick = view.findViewById(R.id.fabSidekick);
fabNewL = view.findViewById(R.id.fabNewL);
fabViewL = view.findViewById(R.id.fabViewL);
@@ -179,6 +183,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
fabSeedL = view.findViewById(R.id.fabSeedL);
fabImportL = view.findViewById(R.id.fabImportL);
fabLedgerL = view.findViewById(R.id.fabLedgerL);
+ fabSidekickL = view.findViewById(R.id.fabSidekickL);
fab_pulse = AnimationUtils.loadAnimation(getContext(), R.anim.fab_pulse);
fab_open_screen = AnimationUtils.loadAnimation(getContext(), R.anim.fab_open_screen);
@@ -194,6 +199,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
fabSeed.setOnClickListener(this);
fabImport.setOnClickListener(this);
fabLedger.setOnClickListener(this);
+ fabSidekick.setOnClickListener(this);
fabScreen.setOnClickListener(this);
RecyclerView recyclerView = view.findViewById(R.id.list);
@@ -202,6 +208,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
recyclerView.setAdapter(adapter);
ViewGroup llNotice = view.findViewById(R.id.llNotice);
+
Notice.showAll(llNotice, ".*_login");
view.findViewById(R.id.llNode).setOnClickListener(v -> startNodePrefs());
@@ -304,17 +311,14 @@ public void onCreateOptionsMenu(@NonNull Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
}
+ @Getter
private boolean fabOpen = false;
- private FloatingActionButton fab, fabNew, fabView, fabKey, fabSeed, fabImport, fabLedger;
+ private FloatingActionButton fab, fabNew, fabView, fabKey, fabSeed, fabImport, fabLedger, fabSidekick;
private RelativeLayout fabScreen;
- private RelativeLayout fabNewL, fabViewL, fabKeyL, fabSeedL, fabImportL, fabLedgerL;
+ private RelativeLayout fabNewL, fabViewL, fabKeyL, fabSeedL, fabImportL, fabLedgerL, fabSidekickL;
private Animation fab_open, fab_close, rotate_forward, rotate_backward, fab_open_screen, fab_close_screen;
private Animation fab_pulse;
- public boolean isFabOpen() {
- return fabOpen;
- }
-
private void setFabOpen(boolean value) {
fabOpen = value;
onBackPressedCallback.setEnabled(value);
@@ -328,6 +332,9 @@ public void animateFAB() {
if (fabLedgerL.getVisibility() == View.VISIBLE) {
fabLedgerL.startAnimation(fab_close);
fabLedger.setClickable(false);
+ } else if (fabSidekickL.getVisibility() == View.VISIBLE) {
+ fabSidekickL.startAnimation(fab_close);
+ fabSidekick.setClickable(false);
} else {
fabNewL.startAnimation(fab_close);
fabNew.setClickable(false);
@@ -345,17 +352,25 @@ public void animateFAB() {
fabScreen.setClickable(true);
fabScreen.startAnimation(fab_open_screen);
fab.startAnimation(rotate_forward);
- if (activityCallback.hasLedger()) {
- fabLedgerL.setVisibility(View.VISIBLE);
+ if ((activityCallback.hasDevice(Wallet.Device.Ledger)
+ || activityCallback.hasDevice(Wallet.Device.Sidekick))) {
fabNewL.setVisibility(View.GONE);
fabViewL.setVisibility(View.GONE);
fabKeyL.setVisibility(View.GONE);
fabSeedL.setVisibility(View.GONE);
fabImportL.setVisibility(View.GONE);
- fabLedgerL.startAnimation(fab_open);
- fabLedger.setClickable(true);
+ if (activityCallback.hasDevice(Wallet.Device.Ledger)) {
+ fabLedgerL.setVisibility(View.VISIBLE);
+ fabLedgerL.startAnimation(fab_open);
+ fabLedger.setClickable(true);
+ } else { // Sidekick
+ fabSidekickL.setVisibility(View.VISIBLE);
+ fabSidekickL.startAnimation(fab_open);
+ fabSidekick.setClickable(true);
+ }
} else {
+ fabSidekickL.setVisibility(View.GONE);
fabLedgerL.setVisibility(View.GONE);
fabNewL.setVisibility(View.VISIBLE);
fabViewL.setVisibility(View.VISIBLE);
@@ -404,6 +419,10 @@ public void onClick(View v) {
Timber.d("FAB_LEDGER");
animateFAB();
activityCallback.onAddWallet(GenerateFragment.TYPE_LEDGER);
+ } else if (id == R.id.fabSidekick) {
+ Timber.d("FAB_SIDEKICK");
+ animateFAB();
+ activityCallback.onAddWallet(GenerateFragment.TYPE_SIDEKICK);
} else if (id == R.id.fabScreen) {
animateFAB();
}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/SidekickConnectFragment.java b/app/src/main/java/com/m2049r/xmrwallet/SidekickConnectFragment.java
new file mode 100644
index 0000000000..1cbbd0fc7e
--- /dev/null
+++ b/app/src/main/java/com/m2049r/xmrwallet/SidekickConnectFragment.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2018 m2049r
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.m2049r.xmrwallet;
+
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothClass;
+import android.bluetooth.BluetoothDevice;
+import android.content.Context;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
+
+import com.m2049r.xmrwallet.data.BluetoothInfo;
+import com.m2049r.xmrwallet.layout.BluetoothInfoAdapter;
+import com.m2049r.xmrwallet.util.Helper;
+import com.m2049r.xmrwallet.widget.Toolbar;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import timber.log.Timber;
+
+public class SidekickConnectFragment extends Fragment
+ implements BluetoothInfoAdapter.OnInteractionListener {
+
+ private BluetoothAdapter bluetoothAdapter;
+
+ private SwipeRefreshLayout pullToRefresh;
+
+ private BluetoothInfoAdapter infoAdapter;
+
+ private Listener activityCallback;
+
+ public interface Listener {
+ void setToolbarButton(int type);
+
+ void setSubtitle(String title);
+ }
+
+ @Override
+ public void onAttach(@NonNull Context context) {
+ super.onAttach(context);
+ if (context instanceof Listener) {
+ this.activityCallback = (Listener) context;
+ } else {
+ throw new ClassCastException(context + " must implement Listener");
+ }
+ }
+
+ @Override
+ public void onPause() {
+ Timber.d("onPause()");
+ if (bluetoothAdapter.isDiscovering()) {
+ bluetoothAdapter.cancelDiscovery();
+ }
+ // the the activity we are connected? why? it can ask the bluetoothservice...
+ super.onPause();
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ Timber.d("onResume()");
+ activityCallback.setSubtitle(getString(R.string.label_bluetooth));
+ activityCallback.setToolbarButton(Toolbar.BUTTON_BACK);
+ final BluetoothFragment btFragment = (BluetoothFragment) getChildFragmentManager().findFragmentById(R.id.bt_fragment);
+ assert btFragment != null;
+ btFragment.start();
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ Timber.d("onCreateView");
+ View view = inflater.inflate(R.layout.fragment_sidekick_connect, container, false);
+
+ RecyclerView recyclerView = view.findViewById(R.id.list);
+ infoAdapter = new BluetoothInfoAdapter(this);
+ recyclerView.setAdapter(infoAdapter);
+
+ pullToRefresh = view.findViewById(R.id.pullToRefresh);
+ pullToRefresh.setOnRefreshListener(() -> {
+ populateList();
+ pullToRefresh.setRefreshing(false);
+ });
+
+ return view;
+ }
+
+ private void populateList() {
+ List items = new ArrayList<>();
+ for (BluetoothDevice device : bluetoothAdapter.getBondedDevices()) {
+ final int deviceCLass = device.getBluetoothClass().getDeviceClass();
+ switch (deviceCLass) {
+ case BluetoothClass.Device.PHONE_SMART:
+ //TODO verify these are correct
+ case BluetoothClass.Device.COMPUTER_HANDHELD_PC_PDA:
+ case BluetoothClass.Device.COMPUTER_PALM_SIZE_PC_PDA:
+ items.add(new BluetoothInfo(device));
+ }
+ }
+ infoAdapter.setItems(items);
+ }
+
+ @Override
+ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
+ Helper.hideKeyboard(getActivity());
+
+ // Get the local Bluetooth adapter
+ bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
+ populateList();
+ }
+
+ @Override
+ public void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setHasOptionsMenu(true);
+ }
+
+ @Override
+ public void onCreateOptionsMenu(@NonNull Menu menu, MenuInflater inflater) {
+ inflater.inflate(R.menu.sidekick_connect_menu, menu);
+ super.onCreateOptionsMenu(menu, inflater);
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+
+ // Make sure we're not doing discovery anymore
+ if (bluetoothAdapter != null) {
+ bluetoothAdapter.cancelDiscovery();
+ }
+ }
+
+ @Override
+ public void onInteraction(final View view, final BluetoothInfo item) {
+ Timber.d("onInteraction %s", item);
+ bluetoothAdapter.cancelDiscovery();
+
+ final BluetoothFragment btFragment = (BluetoothFragment) getChildFragmentManager().findFragmentById(R.id.bt_fragment);
+ assert btFragment != null;
+ btFragment.connectDevice(item.getAddress());
+ }
+
+ public void allowClick() {
+ infoAdapter.allowClick(true);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/m2049r/xmrwallet/SubaddressFragment.java b/app/src/main/java/com/m2049r/xmrwallet/SubaddressFragment.java
index 3a6ce48422..b921280af1 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/SubaddressFragment.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/SubaddressFragment.java
@@ -195,7 +195,7 @@ private class AsyncSubaddress extends AsyncTask {
@Override
protected void onPreExecute() {
super.onPreExecute();
- if ((wallet.getDeviceType() == Wallet.Device.Device_Ledger) && (progressCallback != null)) {
+ if ((wallet.getDeviceType() == Wallet.Device.Ledger) && (progressCallback != null)) {
progressCallback.showLedgerProgressDialog(LedgerProgressDialog.TYPE_SUBADDRESS);
dialogOpened = true;
}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java b/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java
index afa05f6ea1..365090bffb 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 m2049r
+ * Copyright (c) 2017-2024 m2049r
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,6 +45,7 @@
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
import androidx.preference.PreferenceManager;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
@@ -92,6 +93,7 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
public static final String REQUEST_FINGERPRINT_USED = "fingerprint";
public static final String REQUEST_STREETMODE = "streetmode";
public static final String REQUEST_URI = "uri";
+ public static final String REQUEST_SIDEKICK = "sidekick";
private NavigationView accountsView;
private DrawerLayout drawer;
@@ -202,19 +204,9 @@ public String getTxAddress(int major, int minor) {
return getWallet().getSubaddress(major, minor);
}
- private void startWalletService() {
- Bundle extras = getIntent().getExtras();
- if (extras != null) {
- acquireWakeLock();
- String walletId = extras.getString(REQUEST_ID);
- // we can set the streetmode height AFTER opening the wallet
- requestStreetMode = extras.getBoolean(REQUEST_STREETMODE);
- password = extras.getString(REQUEST_PW);
- uri = extras.getString(REQUEST_URI);
- connectWalletService(walletId, password);
- } else {
- finish();
- }
+ private void startWalletService(String walletId) {
+ acquireWakeLock();
+ connectWalletService(walletId, password);
}
private void stopWalletService() {
@@ -330,7 +322,6 @@ public void fail(String walletName) {
});
}
-
public void onWalletChangePassword() {
try {
GenerateReviewFragment detailsFragment = (GenerateReviewFragment) getCurrentFragment();
@@ -356,33 +347,39 @@ protected void onCreate(Bundle savedInstanceState) {
return;
}
+ Bundle extras = getIntent().getExtras();
+ if (extras == null) finish(); // we need extras!
+
+ String walletId = extras.getString(REQUEST_ID);
+ requestStreetMode = extras.getBoolean(REQUEST_STREETMODE);
+ password = extras.getString(REQUEST_PW);
+ uri = extras.getString(REQUEST_URI);
+ boolean sidekick = extras.getBoolean(REQUEST_SIDEKICK);
+
setContentView(R.layout.activity_wallet);
toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayShowTitleEnabled(false);
- toolbar.setOnButtonListener(new Toolbar.OnButtonListener() {
- @Override
- public void onButton(int type) {
- switch (type) {
- case Toolbar.BUTTON_BACK:
- onDisposeRequest();
- getOnBackPressedDispatcher().onBackPressed();
- break;
- case Toolbar.BUTTON_CANCEL:
- onDisposeRequest();
- Helper.hideKeyboard(WalletActivity.this);
- getOnBackPressedDispatcher().onBackPressed();
- break;
- case Toolbar.BUTTON_CLOSE:
- finish();
- break;
- case Toolbar.BUTTON_SETTINGS:
- Toast.makeText(WalletActivity.this, getString(R.string.label_credits), Toast.LENGTH_SHORT).show();
- case Toolbar.BUTTON_NONE:
- default:
- Timber.e("Button " + type + "pressed - how can this be?");
- }
+ toolbar.setOnButtonListener(type -> {
+ switch (type) {
+ case Toolbar.BUTTON_BACK:
+ onDisposeRequest();
+ getOnBackPressedDispatcher().onBackPressed();
+ break;
+ case Toolbar.BUTTON_CANCEL:
+ onDisposeRequest();
+ Helper.hideKeyboard(WalletActivity.this);
+ getOnBackPressedDispatcher().onBackPressed();
+ break;
+ case Toolbar.BUTTON_CLOSE:
+ finish();
+ break;
+ case Toolbar.BUTTON_SETTINGS:
+ Toast.makeText(WalletActivity.this, getString(R.string.label_credits), Toast.LENGTH_SHORT).show();
+ case Toolbar.BUTTON_NONE:
+ default:
+ Timber.e("Button " + type + "pressed - how can this be?");
}
});
@@ -398,11 +395,16 @@ public void onButton(int type) {
showNet();
Fragment walletFragment = new WalletFragment();
- getSupportFragmentManager().beginTransaction()
- .add(R.id.fragment_container, walletFragment, WalletFragment.class.getName()).commit();
- Timber.d("fragment added");
+ final FragmentTransaction tx =
+ getSupportFragmentManager().beginTransaction()
+ .add(R.id.fragment_container, walletFragment, WalletFragment.class.getName());
+ if (sidekick) {
+ tx.add(R.id.fragment_bluetooth, new BluetoothFragment(BluetoothFragment.Mode.CLIENT), BluetoothFragment.class.getName());
+ }
+ tx.commit();
+ Timber.d("fragments added");
- startWalletService();
+ if (!sidekick) startWalletService(walletId);
Timber.d("onCreate() done.");
}
@@ -616,7 +618,7 @@ public void onWalletStored(final boolean success) {
@Override
public void onWalletOpen(final Wallet.Device device) {
- if (device == Wallet.Device.Device_Ledger) {
+ if (device == Wallet.Device.Ledger) {
runOnUiThread(() -> showLedgerProgressDialog(LedgerProgressDialog.TYPE_RESTORE));
}
}
@@ -766,7 +768,7 @@ public void onPrepareSend(final String tag, final TxData txData) {
intent.putExtra(WalletService.REQUEST_CMD_TX_TAG, tag);
startService(intent);
Timber.d("CREATE TX request sent");
- if (getWallet().getDeviceType() == Wallet.Device.Device_Ledger)
+ if (getWallet().getDeviceType() == Wallet.Device.Ledger)
showLedgerProgressDialog(LedgerProgressDialog.TYPE_SEND);
} else {
Timber.e("Service not bound");
@@ -1132,11 +1134,12 @@ private class AsyncAddAccount extends AsyncTask {
protected void onPreExecute() {
super.onPreExecute();
switch (getWallet().getDeviceType()) {
- case Device_Ledger:
+ case Ledger:
showLedgerProgressDialog(LedgerProgressDialog.TYPE_ACCOUNT);
dialogOpened = true;
break;
- case Device_Software:
+ case Software:
+ case Sidekick:
showProgressDialog(R.string.accounts_progress_new);
dialogOpened = true;
break;
diff --git a/app/src/main/java/com/m2049r/xmrwallet/XmrWalletApplication.java b/app/src/main/java/com/m2049r/xmrwallet/XmrWalletApplication.java
index 3943d23b64..287004df88 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/XmrWalletApplication.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/XmrWalletApplication.java
@@ -22,27 +22,20 @@
import android.os.Build;
import androidx.annotation.NonNull;
-import androidx.annotation.OptIn;
-import androidx.fragment.app.FragmentManager;
-import androidx.fragment.app.FragmentStateManagerControl;
+import com.m2049r.xmrwallet.BuildConfig;
import com.m2049r.xmrwallet.model.NetworkType;
import com.m2049r.xmrwallet.util.LocaleHelper;
import com.m2049r.xmrwallet.util.NetCipherHelper;
import com.m2049r.xmrwallet.util.NightmodeHelper;
-import com.m2049r.xmrwallet.util.ServiceHelper;
-
-import java.util.Arrays;
import timber.log.Timber;
public class XmrWalletApplication extends Application {
@Override
- @OptIn(markerClass = FragmentStateManagerControl.class)
public void onCreate() {
super.onCreate();
- FragmentManager.enableNewStateManager(false);
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/data/BluetoothInfo.java b/app/src/main/java/com/m2049r/xmrwallet/data/BluetoothInfo.java
new file mode 100644
index 0000000000..17f5152109
--- /dev/null
+++ b/app/src/main/java/com/m2049r/xmrwallet/data/BluetoothInfo.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018 m2049r
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.m2049r.xmrwallet.data;
+
+import android.bluetooth.BluetoothDevice;
+
+import java.util.Comparator;
+
+import lombok.Data;
+import lombok.Getter;
+
+@Data
+public class BluetoothInfo {
+ @Getter
+ final private String name;
+ @Getter
+ final private String address;
+ @Getter
+ private boolean bonded;
+
+ public BluetoothInfo(BluetoothDevice device) {
+ name = device.getName().trim();
+ address = device.getAddress();
+ bonded = device.getBondState() == BluetoothDevice.BOND_BONDED;
+ }
+
+ static public Comparator NameComparator = (o1, o2) -> o1.name.compareTo(o2.name);
+}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/layout/BluetoothInfoAdapter.java b/app/src/main/java/com/m2049r/xmrwallet/layout/BluetoothInfoAdapter.java
new file mode 100644
index 0000000000..687f5eb743
--- /dev/null
+++ b/app/src/main/java/com/m2049r/xmrwallet/layout/BluetoothInfoAdapter.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2018 m2049r
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.m2049r.xmrwallet.layout;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.DiffUtil;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.m2049r.xmrwallet.R;
+import com.m2049r.xmrwallet.data.BluetoothInfo;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+public class BluetoothInfoAdapter extends RecyclerView.Adapter {
+
+ public interface OnInteractionListener {
+ void onInteraction(View view, BluetoothInfo item);
+ }
+
+ private final List items = new ArrayList<>();
+ private final OnInteractionListener listener;
+
+ public BluetoothInfoAdapter(OnInteractionListener listener) {
+ this.listener = listener;
+ }
+
+ private static class BluetoothInfoDiff extends DiffCallback {
+
+ public BluetoothInfoDiff(List oldList, List newList) {
+ super(oldList, newList);
+ }
+
+ @Override
+ public boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
+ return mOldList.get(oldItemPosition).getAddress().equals(mNewList.get(newItemPosition).getAddress());
+ }
+
+ @Override
+ public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
+ final BluetoothInfo oldItem = mOldList.get(oldItemPosition);
+ final BluetoothInfo newItem = mNewList.get(newItemPosition);
+ return oldItem.equals(newItem);
+ }
+ }
+
+ @Override
+ public @NonNull
+ ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_bluetooth, parent, false);
+ return new ViewHolder(view);
+ }
+
+ @Override
+ public void onBindViewHolder(final @NonNull ViewHolder holder, int position) {
+ holder.bind(position);
+ }
+
+ @Override
+ public int getItemCount() {
+ return items.size();
+ }
+
+ public void add(BluetoothInfo item) {
+ if (item == null) return;
+ List newItems = new ArrayList<>(items);
+ if (!items.contains(item))
+ newItems.add(item);
+ setItems(newItems); // in case the nodeinfo has changed
+ }
+
+ public void setItems(Collection newItemsCollection) {
+ List newItems;
+ if (newItemsCollection != null) {
+ newItems = new ArrayList<>(newItemsCollection);
+ Collections.sort(newItems, BluetoothInfo.NameComparator);
+ } else {
+ newItems = new ArrayList<>();
+ }
+ final BluetoothInfoAdapter.BluetoothInfoDiff diffCallback = new BluetoothInfoAdapter.BluetoothInfoDiff(items, newItems);
+ final DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(diffCallback);
+ items.clear();
+ items.addAll(newItems);
+ diffResult.dispatchUpdatesTo(this);
+ }
+
+ private boolean itemsClickable = true;
+
+ public void allowClick(boolean clickable) {
+ itemsClickable = clickable;
+ notifyDataSetChanged();
+ }
+
+ public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
+ final TextView tvName;
+ final TextView tvAddress;
+ BluetoothInfo item;
+
+ ViewHolder(View itemView) {
+ super(itemView);
+ tvName = itemView.findViewById(R.id.tvName);
+ tvAddress = itemView.findViewById(R.id.tvAddress);
+ itemView.setOnClickListener(this);
+ }
+
+ void bind(int position) {
+ item = items.get(position);
+ tvName.setText(item.getName());
+ tvAddress.setText(item.getAddress());
+ itemView.setClickable(itemsClickable);
+ itemView.setEnabled(itemsClickable);
+ }
+
+ @Override
+ public void onClick(View view) {
+ if (listener != null) {
+ int position = getBindingAdapterPosition(); // gets item position
+ if (position != RecyclerView.NO_POSITION) { // Check if an item was deleted, but the user clicked it before the UI removed it
+ final BluetoothInfo node = items.get(position);
+ allowClick(false);
+ listener.onInteraction(view, node);
+ }
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/layout/TransactionInfoAdapter.java b/app/src/main/java/com/m2049r/xmrwallet/layout/TransactionInfoAdapter.java
index 599ad91a47..91b5894a2e 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/layout/TransactionInfoAdapter.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/layout/TransactionInfoAdapter.java
@@ -86,7 +86,7 @@ public TransactionInfoAdapter(Context context, Listener listener) {
}
public boolean needsTransactionUpdateOnNewBlock() {
- return (infoItems.size() > 0) && !infoItems.get(0).isConfirmed();
+ return (!infoItems.isEmpty()) && !infoItems.get(0).isConfirmed();
}
private static class TransactionInfoDiff extends DiffCallback {
diff --git a/app/src/main/java/com/m2049r/xmrwallet/ledger/Hardware.java b/app/src/main/java/com/m2049r/xmrwallet/ledger/Hardware.java
new file mode 100644
index 0000000000..82a19930dc
--- /dev/null
+++ b/app/src/main/java/com/m2049r/xmrwallet/ledger/Hardware.java
@@ -0,0 +1,4 @@
+package com.m2049r.xmrwallet.ledger;
+
+public interface Hardware {
+}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/ledger/Ledger.java b/app/src/main/java/com/m2049r/xmrwallet/ledger/Ledger.java
index 03582827dd..7cde2f4bbd 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/ledger/Ledger.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/ledger/Ledger.java
@@ -35,12 +35,11 @@
import timber.log.Timber;
-public class Ledger {
+public class Ledger implements Hardware {
static final public boolean ENABLED = true;
// 5:20 is same as wallet2.cpp::restore()
static public final int LOOKAHEAD_ACCOUNTS = 5;
static public final int LOOKAHEAD_SUBADDRESSES = 20;
- static public final String SUBADDRESS_LOOKAHEAD = LOOKAHEAD_ACCOUNTS + ":" + LOOKAHEAD_SUBADDRESSES;
private static final byte PROTOCOL_VERSION = 0x03;
public static final int SW_OK = 0x9000;
diff --git a/app/src/main/java/com/m2049r/xmrwallet/model/Wallet.java b/app/src/main/java/com/m2049r/xmrwallet/model/Wallet.java
index d97456b92a..77d72cfa4a 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/model/Wallet.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/model/Wallet.java
@@ -111,7 +111,11 @@ public String getName() {
@RequiredArgsConstructor
@Getter
public enum Device {
- Device_Undefined(0, 0), Device_Software(50, 200), Device_Ledger(5, 20);
+ Undefined(0, 0),
+ Software(50, 200),
+ Ledger(5, 20),
+ Trezor(5, 20),
+ Sidekick(5, 20);
private final int accountLookahead;
private final int subaddressLookahead;
}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/model/WalletManager.java b/app/src/main/java/com/m2049r/xmrwallet/model/WalletManager.java
index 71f3e124b5..c6b2a126c0 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/model/WalletManager.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/model/WalletManager.java
@@ -18,7 +18,6 @@
import com.m2049r.xmrwallet.XmrWalletApplication;
import com.m2049r.xmrwallet.data.Node;
-import com.m2049r.xmrwallet.ledger.Ledger;
import com.m2049r.xmrwallet.util.RestoreHeight;
import java.io.File;
@@ -161,10 +160,12 @@ private native long createWalletFromKeysJ(String path, String password,
String spendKeyString);
public Wallet createWalletFromDevice(File aFile, String password, long restoreHeight,
- String deviceName) {
+ Wallet.Device device) {
+ final String lookahead = device.getAccountLookahead() + ":" + device.getSubaddressLookahead();
+ Timber.d("Creating from %s with %s lookahead", device, lookahead);
long walletHandle = createWalletFromDeviceJ(aFile.getAbsolutePath(), password,
- getNetworkType().getValue(), deviceName, restoreHeight,
- Ledger.SUBADDRESS_LOOKAHEAD);
+ getNetworkType().getValue(), device.name(), restoreHeight,
+ lookahead);
Wallet wallet = new Wallet(walletHandle);
manageWallet(wallet);
return wallet;
diff --git a/app/src/main/java/com/m2049r/xmrwallet/onboarding/OnBoardingManager.java b/app/src/main/java/com/m2049r/xmrwallet/onboarding/OnBoardingManager.java
index b0c52d0df7..93e9fd64ba 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/onboarding/OnBoardingManager.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/onboarding/OnBoardingManager.java
@@ -19,6 +19,8 @@
import android.content.Context;
import android.content.SharedPreferences;
+import com.m2049r.xmrwallet.util.Helper;
+
import java.util.Date;
import timber.log.Timber;
diff --git a/app/src/main/java/com/m2049r/xmrwallet/service/BluetoothService.java b/app/src/main/java/com/m2049r/xmrwallet/service/BluetoothService.java
new file mode 100644
index 0000000000..aaa1ec06da
--- /dev/null
+++ b/app/src/main/java/com/m2049r/xmrwallet/service/BluetoothService.java
@@ -0,0 +1,662 @@
+/*
+ * Copyright (C) 2021 m2049r@monerujo.io
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// mostly from BluetoothChatService https://github.com/android/connectivity-samples
+
+package com.m2049r.xmrwallet.service;
+
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothServerSocket;
+import android.bluetooth.BluetoothSocket;
+import android.os.Handler;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Locale;
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+
+import lombok.Getter;
+import lombok.Setter;
+import timber.log.Timber;
+
+/**
+ * This class does all the work for setting up and managing Bluetooth
+ * connections with other devices. It has a thread that listens for
+ * incoming connections, a thread for connecting with a device, and a
+ * thread for performing data transmissions when connected.
+ */
+public class BluetoothService {
+ final static private byte[] MAGIC = "SIDEKICK".getBytes(StandardCharsets.US_ASCII);
+
+ public interface MessageType {
+ int STATE_CHANGE = 1;
+ int READ = 2;
+ int WRITE = 3;
+ int DEVICE_NAME = 4;
+ int TOAST = 5;
+ int READ_CMD = 6;
+ int CODE = 42;
+ }
+
+ //TODO refactor this using an enum with resource ids for messages and stuff
+ public interface Toasts {
+ String CONNECT_FAILED = "Unable to connect device";
+ String CONNECTION_LOST = "Device connection was lost";
+ int READ = 2;
+ int WRITE = 3;
+ int DEVICE_NAME = 4;
+ int TOAST = 5;
+ }
+
+ // Constants that indicate the current connection state
+ public interface State {
+ int NONE = 0; // we're doing nothing
+ int LISTEN = 1; // now listening for incoming connections
+ int CONNECTING = 2; // now initiating an outgoing connection
+ int CONNECTED = 3; // now connected to a remote device
+ }
+
+ // Name for the SDP record when creating server socket
+ private static final String SDP_NAME = "Monerujo";
+
+ // Unique UUID for this application
+ private static final UUID SDP_UUID = UUID.fromString("2150154b-58ce-4c58-99e3-ccfdd14bed3b");
+
+ static final BluetoothService Instance = new BluetoothService();
+
+ public static BluetoothService GetInstance() {
+ return Instance;
+ }
+
+ public static boolean IsConnected() {
+ return Instance.isConnected();
+ }
+
+ public static void Stop() {
+ Instance.stop();
+ }
+
+ // Member fields
+ private final BluetoothAdapter bluetoothAdapter;
+ @Setter
+ private Handler uiHandler;
+ @Setter
+ private Handler commHandler;
+ private AcceptThread acceptThread;
+ private ConnectThread connectThread;
+ private ConnectedThread connectedThread;
+ @Getter
+ private int state = State.NONE;
+
+ @Getter
+ private String connectedName;
+ @Getter
+ private String connectedCode;
+
+ public boolean isStarted() {
+ return state != State.NONE;
+ }
+
+ public boolean isConnected() {
+ return state == State.CONNECTED;
+ }
+
+ public BluetoothService() {
+ bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
+ }
+
+ /**
+ * Notify UI of state changes
+ */
+ private synchronized void onStateChanged() {
+ Timber.d("onStateChanged() -> %s", state);
+ if (uiHandler != null)
+ uiHandler.obtainMessage(MessageType.STATE_CHANGE, state, -1).sendToTarget();
+ }
+
+ /**
+ * Notify UI that we've connected
+ */
+ private synchronized void onConnected(String remoteName) {
+ Timber.d("onConnected() -> %s", remoteName);
+ connectedName = remoteName;
+ if (uiHandler != null)
+ uiHandler.obtainMessage(MessageType.DEVICE_NAME, remoteName).sendToTarget();
+ }
+
+ /**
+ * Start the service: Start AcceptThread to begin a session in listening (server) mode.
+ */
+ public synchronized void start() {
+ Timber.d("start");
+ halt = false;
+
+ // Cancel any thread attempting to make a connection
+ if (connectThread != null) {
+ connectThread.cancel();
+ connectThread = null;
+ }
+
+ // Cancel any thread currently running a connection
+ if (connectedThread != null) {
+ connectedThread.cancel();
+ connectedThread = null;
+ }
+
+ // Start the thread to listen on a BluetoothServerSocket (or let it run if already running)
+ if (acceptThread == null) {
+ acceptThread = new AcceptThread();
+ acceptThread.start();
+ }
+
+ onStateChanged();
+ }
+
+ /**
+ * Start the ConnectThread to initiate a connection to a remote device.
+ *
+ * @param device The BluetoothDevice to connect
+ */
+ public synchronized void connect(BluetoothDevice device) {
+ Timber.d("connect to: %s", device);
+
+ // Cancel any thread attempting to make a connection
+ if (state == State.CONNECTING) {
+ if (connectThread != null) {
+ connectThread.cancel();
+ connectThread = null;
+ }
+ }
+
+ // Cancel any thread currently running a connection
+ if (connectedThread != null) {
+ reconnect = true;
+ connectedThread.cancel();
+ connectedThread = null;
+ }
+
+ // Start the thread to connect with the given device
+ connectThread = new ConnectThread(device);
+ connectThread.start();
+
+ onStateChanged();
+ }
+
+ boolean reconnect = false;
+ boolean halt = false;
+
+ /**
+ * Start the ConnectedThread to begin managing a Bluetooth connection
+ *
+ * @param socket The BluetoothSocket on which the connection was made
+ * @param device The BluetoothDevice that has been connected
+ */
+ public synchronized void startConnected(BluetoothSocket socket, BluetoothDevice device) {
+ Timber.d("startConnected");
+
+ // Cancel the thread that completed the connection
+ if (connectThread != null) {
+ connectThread.cancel();
+ connectThread = null;
+ }
+
+ // Cancel any thread currently running a connection
+ if (connectedThread != null) {
+ connectedThread.cancel();
+ connectedThread = null;
+ }
+
+ // Cancel the accept thread because we only want to connect to one device
+ if (acceptThread != null) {
+ acceptThread.cancel();
+ acceptThread = null;
+ }
+
+ // Start the thread to manage the connection and perform transmissions
+ connectedThread = new ConnectedThread(socket);
+ connectedThread.start();
+
+ onConnected(device.getName());
+ onStateChanged();
+ }
+
+ /**
+ * Stop all threads
+ */
+ public synchronized void stop() {
+ Timber.d("stop");
+ halt = true;
+
+ if (connectThread != null) {
+ connectThread.cancel();
+ connectThread = null;
+ }
+
+ if (connectedThread != null) {
+ connectedThread.cancel();
+ connectedThread = null;
+ }
+
+ if (acceptThread != null) {
+ acceptThread.cancel();
+ acceptThread = null;
+ }
+
+ state = State.NONE;
+
+ onStateChanged();
+
+ setUiHandler(null);
+ }
+
+ /**
+ * Write to the ConnectedThread in an unsynchronized manner
+ *
+ * @param out The bytes to write
+ * @see ConnectedThread#write(byte[])
+ */
+ public boolean write(byte[] out) {
+ // Synchronize a copy of the ConnectedThread
+ ConnectedThread connectedThread;
+ synchronized (this) {
+ if (state != State.CONNECTED) return false;
+ connectedThread = this.connectedThread;
+ }
+ // Perform the write itself unsynchronized
+ return connectedThread.write(out);
+ }
+
+ public boolean write(int code) {
+ // Synchronize a copy of the ConnectedThread
+ ConnectedThread connectedThread;
+ synchronized (this) {
+ if (state != State.CONNECTED) return false;
+ connectedThread = this.connectedThread;
+ }
+
+ final byte[] buffer = new byte[2];
+ buffer[0] = (byte) (code >> 8);
+ buffer[1] = (byte) (code & 0xff);
+
+ connectedCode = String.format(Locale.US, "%04d", code);
+ if (uiHandler != null)
+ uiHandler.obtainMessage(MessageType.CODE, connectedCode).sendToTarget();
+
+ return connectedThread.write(buffer);
+ }
+
+ public byte[] exchange(byte[] buffer) {
+ // Synchronize a copy of the ConnectedThread
+ ConnectedThread connectedThread;
+ synchronized (this) {
+ if (state != State.CONNECTED) return null; //TODO maybe exception?
+ connectedThread = this.connectedThread;
+ }
+ CountDownLatch signal = new CountDownLatch(1);
+ connectedThread.setReadSignal(signal);
+ connectedThread.write(buffer);
+ try {
+ signal.await(); //TODO what happens when the reader is canceled?
+ return connectedThread.getReadBuffer();
+ } catch (InterruptedException ex) {
+ Timber.d(ex);
+ return null;
+ }
+ }
+
+ /**
+ * Indicate that the connection attempt failed and notify
+ */
+ private void onConnectFailed() {
+ Timber.d("onConnectFailed()");
+ if (uiHandler != null)
+ uiHandler.obtainMessage(MessageType.TOAST, Toasts.CONNECT_FAILED).sendToTarget();
+
+ state = State.NONE;
+
+ // don't notify as start() notifies immediately afterwards
+ // onStateChanged();
+
+ // Start the service over to restart listening mode
+ if (!halt) start();
+ }
+
+ /**
+ * Indicate that the connection was lost
+ */
+ private void onConnectionLost() {
+ Timber.d("onConnectionLost()");
+ connectedName = null;
+ connectedCode = null;
+ if (reconnect) return;
+
+ state = State.NONE;
+
+ if (halt) return;
+
+ // don't notify as start() notifies immediately afterwards
+ // onStateChanged();
+
+ // Start the service over to restart listening mode
+ start();
+ }
+
+ /**
+ * This thread runs while listening for incoming connections. It behaves
+ * like a server-side client. It runs until a connection is accepted
+ * (or until cancelled).
+ */
+ private class AcceptThread extends Thread {
+ private final BluetoothServerSocket serverSocket;
+
+ public AcceptThread() {
+ // Create a new listening server socket
+ try {
+ serverSocket = bluetoothAdapter.listenUsingRfcommWithServiceRecord(SDP_NAME, SDP_UUID);
+ state = BluetoothService.State.LISTEN;
+ } catch (IOException ex) {
+ Timber.d(ex, "listen() failed");
+ throw new IllegalStateException();
+ }
+ }
+
+ public void run() {
+ Timber.d("BEGIN AcceptThread %s", this);
+
+ BluetoothSocket socket;
+
+ // Listen to the server socket if we're not connected
+ while (state != BluetoothService.State.CONNECTED) {
+ try {
+ // This is a blocking call and will only return on a
+ // successful connection or an exception
+ socket = serverSocket.accept();
+ } catch (IOException ex) {
+ Timber.d(ex, "accept() failed"); // this also happens on socket.close()
+ break;
+ }
+
+ // If a connection was accepted
+ if (socket != null) {
+ synchronized (BluetoothService.this) {
+ switch (state) {
+ case BluetoothService.State.LISTEN:
+ case BluetoothService.State.CONNECTING:
+ // Situation normal. Start the ConnectedThread.
+ startConnected(socket, socket.getRemoteDevice());
+ break;
+ case BluetoothService.State.NONE:
+ case BluetoothService.State.CONNECTED:
+ // Either not ready or already connected. Terminate new socket.
+ try {
+ socket.close();
+ } catch (IOException ex) {
+ Timber.d(ex, "Could not close unwanted socket");
+ }
+ break;
+ }
+ }
+ }
+ }
+ Timber.d("END AcceptThread %s", this);
+ }
+
+ public void cancel() {
+ Timber.d("cancel() %s", this);
+ try {
+ serverSocket.close();
+ } catch (IOException ex) {
+ Timber.d(ex, "close() of server failed");
+ }
+ }
+ }
+
+ /**
+ * This thread runs while attempting to make an outgoing connection
+ * with a device. It runs straight through; the connection either
+ * succeeds or fails.
+ */
+ private class ConnectThread extends Thread {
+ private final BluetoothSocket socket;
+ private final BluetoothDevice device;
+
+ public ConnectThread(BluetoothDevice device) {
+ this.device = device;
+
+ // Create a BluetoothSocket
+ try {
+ socket = device.createRfcommSocketToServiceRecord(SDP_UUID);
+ state = BluetoothService.State.CONNECTING;
+ } catch (IOException ex) {
+ Timber.d(ex, "create() failed");
+ throw new IllegalStateException(); //TODO really die here?
+ }
+ }
+
+ public void run() {
+ Timber.d("BEGIN ConnectThread");
+
+ // Always cancel discovery because it will slow down a connection
+ bluetoothAdapter.cancelDiscovery(); //TODO show & remember discovery state?
+
+ // Make a connection to the BluetoothSocket
+ try {
+ // This is a blocking call and will only return on a
+ // successful connection or an exception
+ socket.connect(); // sometimes this fails - why?
+ } catch (IOException ex) {
+ try {
+ socket.close();
+ } catch (IOException exClose) {
+ Timber.d(exClose, "unable to close() socket during connection failure");
+ }
+ onConnectFailed();
+ return;
+ } finally {
+ // Reset the ConnectThread because we're done
+ synchronized (BluetoothService.this) {
+ connectThread = null;
+ }
+ }
+
+ // Start the ConnectedThread
+ startConnected(socket, device);
+ }
+
+ public void cancel() {
+ try {
+ socket.close();
+ } catch (IOException ex) {
+ Timber.d(ex, "close() of connect socket failed");
+ }
+ }
+ }
+
+ /**
+ * This thread runs during a connection with a remote device.
+ * It handles all incoming and outgoing transmissions.
+ */
+ private class ConnectedThread extends Thread {
+ private final BluetoothSocket socket;
+ private final InputStream in;
+ private final OutputStream out;
+
+ private final ByteArrayOutputStream bytesIn = new ByteArrayOutputStream();
+ private final ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
+
+ private CountDownLatch readSignal = null; // TODO this needs to be a Map with correlationIds
+
+ public void setReadSignal(CountDownLatch signal) { //TODO see above
+ readSignal = signal;
+ readBuffer = null;
+ }
+
+ @Getter
+ private byte[] readBuffer = null;
+
+ public ConnectedThread(BluetoothSocket bluetoothSocket) {
+ Timber.d("ConnectedThread()");
+ socket = bluetoothSocket;
+ InputStream tmpIn = null;
+ OutputStream tmpOut;
+
+ // Get the BluetoothSocket input and output streams
+ try {
+ tmpIn = socket.getInputStream();
+ tmpOut = socket.getOutputStream();
+ } catch (IOException ex) {
+ Timber.d(ex, "temp sockets not created");
+ if (tmpIn != null)
+ try {
+ tmpIn.close();
+ } catch (IOException exIn) {
+ Timber.d(exIn);
+ }
+ throw new IllegalStateException();
+ }
+
+ in = tmpIn;
+ out = tmpOut;
+ state = BluetoothService.State.CONNECTED;
+ }
+
+ public void run() {
+ Timber.d("BEGIN ConnectedThread %s", this);
+ final byte[] buffer = new byte[4096];
+ int bytesRead;
+
+ // Keep listening to the InputStream while connected
+ while (state == BluetoothService.State.CONNECTED) {
+ // Protocol: "SIDEKICK"|1-byte:reserved|2-bytes:length|buffer
+ try {
+ // protocol header
+ bytesRead = in.read(buffer, 0, MAGIC.length + 3);
+ int a = in.available() + bytesRead;
+ if (bytesRead != MAGIC.length + 3)
+ throw new IllegalStateException("message too short");
+ for (int i = 0; i < MAGIC.length; i++) {
+ if (buffer[i] != MAGIC[i]) throw new IllegalStateException("no MAGIC");
+ }
+ final int options = buffer[MAGIC.length]; // 0 regular message, else CODE instead of payload length
+ final int payloadLength = ((0xff & buffer[MAGIC.length + 1]) << 8) + (0xff & buffer[MAGIC.length + 2]);
+ Timber.d("READ options %d, payloadLength=%d, available=%d", options, payloadLength, a);
+ if ((options & 0x01) != 0) { // CODE
+ connectedCode = String.format(Locale.US, "%04d", payloadLength);
+ if (uiHandler != null)
+ uiHandler.obtainMessage(MessageType.CODE, connectedCode).sendToTarget();
+ continue;
+ }
+
+ int remainingBytes = payloadLength;
+ bytesIn.reset();
+ while (remainingBytes > 0) {
+ bytesRead = in.read(buffer, 0, Math.min(remainingBytes, buffer.length));
+ remainingBytes -= bytesRead;
+ bytesIn.write(buffer, 0, bytesRead);
+ }
+
+ readBuffer = bytesIn.toByteArray();
+ if (readSignal != null) { // someone is awaiting this
+ readSignal.countDown();
+ } else if (commHandler != null) { // we are the counterparty
+ final int command = readBuffer[0];
+ commHandler.obtainMessage(command, readBuffer).sendToTarget();
+ if (uiHandler != null) {
+ uiHandler.obtainMessage(MessageType.READ_CMD, readBuffer.length, command).sendToTarget();
+ }
+ } else {
+ throw new IllegalStateException("would drop a message");
+ }
+
+ } catch (IOException ex) {
+ Timber.d(ex, "disconnected");
+ if (readSignal != null) readSignal.countDown(); // readBudder is still null
+ onConnectionLost();
+ reconnect = false;
+ break;
+ }
+ }
+ Timber.d("END ConnectedThread %s", this);
+ }
+
+ /**
+ * Write to the connected OutStream.
+ *
+ * Protocol: "SIDEKICK"|1-byte:reserved|2-bytes:length|buffer
+ *
+ * @param buffer The bytes to write
+ */
+ public boolean write(byte[] buffer) {
+ boolean sendCode = buffer.length == 2; // TODO undo this hack
+ try {
+ final int len = buffer.length;
+ if (len > 65535) {
+ Timber.w("buffer too long %d", len);
+ return false;
+ }
+ bytesOut.reset();
+ bytesOut.write(MAGIC);
+ if (sendCode) {
+ bytesOut.write(0x01); // options bit 0 is CODE
+ } else {
+ bytesOut.write(0);
+ bytesOut.write(len >> 8);
+ bytesOut.write(len & 0xff);
+ }
+ bytesOut.write(buffer);
+ out.write(bytesOut.toByteArray());
+
+ if (uiHandler != null) {
+ uiHandler.obtainMessage(MessageType.WRITE, buffer.length, -1).sendToTarget();
+ }
+ } catch (IOException ex) {
+ Timber.d(ex, "Exception during write");
+ return false;
+ //TODO probably kill the connection if this happens?
+ // but the read operation probably throws it as well, and that takes care of that!
+ }
+ return true;
+ }
+
+ public void cancel() {
+ try {
+ socket.close();
+ } catch (IOException ex) {
+ Timber.d(ex, "close() of connect socket failed");
+ }
+ }
+
+ }
+
+ // for direct communication from JNI
+ // this should block
+ static public byte[] Exchange(byte[] request) {
+ Timber.d("EXCHANGE req = %d bytes", request.length);
+ final byte[] response = Instance.exchange(request);
+ Timber.d("EXCHANGE resp = %d bytes", response.length);
+ return response;
+ }
+
+ static public boolean Write(byte[] request) {
+ return Instance.write(request);
+ }
+}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java b/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java
index 79ac24672d..6e5a46090a 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java
@@ -26,7 +26,7 @@
/**
* Handy class for starting a new thread that has a looper. The looper can then be
* used to create handler classes. Note that start() must still be called.
- * The started Thread has a stck size of STACK_SIZE (=5MB)
+ * The started Thread has a stack size of STACK_SIZE (=5MB)
*/
public class MoneroHandlerThread extends Thread {
// from src/cryptonote_config.h
diff --git a/app/src/main/java/com/m2049r/xmrwallet/service/WalletService.java b/app/src/main/java/com/m2049r/xmrwallet/service/WalletService.java
index 89ce46177b..0607ce63c5 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/service/WalletService.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/service/WalletService.java
@@ -16,6 +16,8 @@
package com.m2049r.xmrwallet.service;
+import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE;
+
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
@@ -581,7 +583,11 @@ private void startNotfication() {
.setCategory(NotificationCompat.CATEGORY_SERVICE)
.setContentIntent(pendingIntent)
.build();
- startForeground(NOTIFICATION_ID, notification);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
+ startForeground(NOTIFICATION_ID, notification, FOREGROUND_SERVICE_TYPE_SPECIAL_USE);
+ } else {
+ startForeground(NOTIFICATION_ID, notification);
+ }
}
@RequiresApi(Build.VERSION_CODES.O)
diff --git a/app/src/main/java/com/m2049r/xmrwallet/util/Flasher.java b/app/src/main/java/com/m2049r/xmrwallet/util/Flasher.java
new file mode 100644
index 0000000000..a6da1680cb
--- /dev/null
+++ b/app/src/main/java/com/m2049r/xmrwallet/util/Flasher.java
@@ -0,0 +1,65 @@
+package com.m2049r.xmrwallet.util;
+
+import android.animation.ValueAnimator;
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.view.View;
+
+import androidx.core.content.res.ResourcesCompat;
+
+import lombok.Getter;
+
+public class Flasher {
+ public interface Light {
+ int getDrawableId();
+ }
+
+ final private static int ON_TIME = 80; //ms
+ final private static int DURATION = 100 + ON_TIME; //ms
+ final private static int OFF_TIME = 600; //ms
+ @Getter
+ final private Drawable drawable;
+ private long t;
+ private ValueAnimator animator;
+
+ private final int colorOff, colorOn;
+ private int colorCurrent;
+
+ public Flasher(Context ctx, Light light) {
+ colorOff = ThemeHelper.getThemedColor(ctx, android.R.attr.colorControlNormal);
+ colorOn = ThemeHelper.getThemedColor(ctx, android.R.attr.colorControlActivated);
+ drawable = getDrawable(ctx, light.getDrawableId());
+ drawable.setTint(colorOff);
+ }
+
+ public void flash(View view) {
+ if (view == null) return;
+ if (animator != null) animator.cancel();
+
+ final long now = System.currentTimeMillis();
+ t = now;
+
+ animator = ValueAnimator.ofArgb(colorOff, colorOn); // always blink nomatter what
+ animator.addUpdateListener(valueAnimator -> {
+ colorCurrent = (Integer) valueAnimator.getAnimatedValue();
+ drawable.setTint(colorCurrent);
+ });
+ animator.setDuration(ON_TIME);
+ animator.start();
+ view.postDelayed(() -> {
+ if (t == now) { // only turn it off if we turned it on last
+ animator = ValueAnimator.ofArgb(colorCurrent, colorOff);
+ animator.addUpdateListener(valueAnimator -> {
+ colorCurrent = (Integer) valueAnimator.getAnimatedValue();
+ drawable.setTint(colorCurrent);
+ });
+ animator.setDuration(Math.abs((long) (1. * OFF_TIME * ((colorCurrent - colorOff) / (colorOn - colorOff)))));
+ animator.start();
+ }
+ }, DURATION);
+ }
+
+ private Drawable getDrawable(Context ctx, int drawableId) {
+ return ResourcesCompat.getDrawable(ctx.getResources(), drawableId, null);
+ }
+}
diff --git a/app/src/main/java/com/m2049r/xmrwallet/util/NetCipherHelper.java b/app/src/main/java/com/m2049r/xmrwallet/util/NetCipherHelper.java
index 8dc481f289..b5d765ea52 100644
--- a/app/src/main/java/com/m2049r/xmrwallet/util/NetCipherHelper.java
+++ b/app/src/main/java/com/m2049r/xmrwallet/util/NetCipherHelper.java
@@ -23,6 +23,8 @@
import android.content.Intent;
import android.content.IntentFilter;
+import androidx.core.content.ContextCompat;
+
import com.burgstaller.okhttp.AuthenticationCacheInterceptor;
import com.burgstaller.okhttp.CachingAuthenticatorDecorator;
import com.burgstaller.okhttp.digest.CachingAuthenticator;
@@ -144,7 +146,7 @@ public static void register(OnStatusChangedListener listener) {
.addStatusCallback(me);
// deal with org.torproject.android.intent.action.STATUS = STARTS_DISABLED
- me.context.registerReceiver(orbotStatusReceiver, new IntentFilter(OrbotHelper.ACTION_STATUS));
+ ContextCompat.registerReceiver(me.context, orbotStatusReceiver, new IntentFilter(OrbotHelper.ACTION_STATUS), ContextCompat.RECEIVER_NOT_EXPORTED);
me.startTor();
}
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000000..3143685ea6
--- /dev/null
+++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_bluetooth_24.xml b/app/src/main/res/drawable/ic_bluetooth_24.xml
new file mode 100644
index 0000000000..1e9621bf92
--- /dev/null
+++ b/app/src/main/res/drawable/ic_bluetooth_24.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_bluetooth_connected_24.xml b/app/src/main/res/drawable/ic_bluetooth_connected_24.xml
new file mode 100644
index 0000000000..95db32a8ca
--- /dev/null
+++ b/app/src/main/res/drawable/ic_bluetooth_connected_24.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_bluetooth_disabled_24.xml b/app/src/main/res/drawable/ic_bluetooth_disabled_24.xml
new file mode 100644
index 0000000000..111179bc13
--- /dev/null
+++ b/app/src/main/res/drawable/ic_bluetooth_disabled_24.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_bluetooth_searching_24.xml b/app/src/main/res/drawable/ic_bluetooth_searching_24.xml
new file mode 100644
index 0000000000..5f9dd59f41
--- /dev/null
+++ b/app/src/main/res/drawable/ic_bluetooth_searching_24.xml
@@ -0,0 +1,11 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
index 85c122df95..ca3826a46c 100644
--- a/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,29 +1,74 @@
-
+
-
-
-
-
-
-
-
-
-
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml
deleted file mode 100644
index 2c2fd4b450..0000000000
--- a/app/src/main/res/drawable/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
diff --git a/app/src/main/res/drawable/ic_sidekick_restore.xml b/app/src/main/res/drawable/ic_sidekick_restore.xml
new file mode 100644
index 0000000000..c6ba54432f
--- /dev/null
+++ b/app/src/main/res/drawable/ic_sidekick_restore.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/layout/activity_sidekick.xml b/app/src/main/res/layout/activity_sidekick.xml
new file mode 100644
index 0000000000..3f0b8c6a15
--- /dev/null
+++ b/app/src/main/res/layout/activity_sidekick.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_wallet.xml b/app/src/main/res/layout/activity_wallet.xml
index 583b039a79..75672049dc 100644
--- a/app/src/main/res/layout/activity_wallet.xml
+++ b/app/src/main/res/layout/activity_wallet.xml
@@ -20,6 +20,11 @@
android:background="@drawable/backgound_toolbar_mainnet"
android:minHeight="?android:attr/actionBarSize" />
+
+
+
diff --git a/app/src/main/res/layout/fragment_bluetooth.xml b/app/src/main/res/layout/fragment_bluetooth.xml
new file mode 100644
index 0000000000..a1e06b1692
--- /dev/null
+++ b/app/src/main/res/layout/fragment_bluetooth.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_login.xml b/app/src/main/res/layout/fragment_login.xml
index 7f582df3c6..aee4949007 100644
--- a/app/src/main/res/layout/fragment_login.xml
+++ b/app/src/main/res/layout/fragment_login.xml
@@ -19,94 +19,101 @@
android:layout_height="wrap_content"
android:orientation="vertical" />
-
+ android:orientation="vertical">
-
-
-
-
-
+ android:layout_marginStart="8dp"
+ android:gravity="start|center"
+ android:padding="8dp"
+ android:text="@string/label_daemon" />
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="8dp">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_sidekick_connect.xml b/app/src/main/res/layout/fragment_sidekick_connect.xml
new file mode 100644
index 0000000000..451f37dbb2
--- /dev/null
+++ b/app/src/main/res/layout/fragment_sidekick_connect.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_bluetooth.xml b/app/src/main/res/layout/item_bluetooth.xml
new file mode 100644
index 0000000000..c3333547c8
--- /dev/null
+++ b/app/src/main/res/layout/item_bluetooth.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_fabmenu.xml b/app/src/main/res/layout/layout_fabmenu.xml
index 02778f85ed..88f846123d 100644
--- a/app/src/main/res/layout/layout_fabmenu.xml
+++ b/app/src/main/res/layout/layout_fabmenu.xml
@@ -29,8 +29,8 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
- android:text="@string/fab_create_new"
- android:contentDescription="@string/fab_create_new" />
+ android:contentDescription="@string/fab_create_new"
+ android:text="@string/fab_create_new" />
+ android:contentDescription="@string/fab_restore_viewonly"
+ android:text="@string/fab_restore_viewonly" />
+ android:contentDescription="@string/fab_restore_key"
+ android:text="@string/fab_restore_key" />
+ android:contentDescription="@string/fab_restore_seed"
+ android:text="@string/fab_restore_seed" />
+ android:contentDescription="@string/menu_restore"
+ android:text="@string/menu_restore" />
+
+
+
+
+
+
+
+
+ app:tint="?attr/toolbarTextColor" />
diff --git a/app/src/main/res/menu/create_wallet_ledger.xml b/app/src/main/res/menu/create_wallet_ledger.xml
index 8bd54cb6e0..9fe4aded79 100644
--- a/app/src/main/res/menu/create_wallet_ledger.xml
+++ b/app/src/main/res/menu/create_wallet_ledger.xml
@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
-
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/list_menu.xml b/app/src/main/res/menu/list_menu.xml
index f660304a90..da7d5a0d7c 100644
--- a/app/src/main/res/menu/list_menu.xml
+++ b/app/src/main/res/menu/list_menu.xml
@@ -8,4 +8,10 @@
android:orderInCategory="100"
android:title="@string/menu_help"
app:showAsAction="ifRoom" />
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/sidekick_connect_menu.xml b/app/src/main/res/menu/sidekick_connect_menu.xml
new file mode 100644
index 0000000000..6baa7ff710
--- /dev/null
+++ b/app/src/main/res/menu/sidekick_connect_menu.xml
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index 37b6c08a1c..0000000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 0000000000..506c08980a
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 415f6a0695..0000000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 0000000000..10137dee62
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index df048726fa..0000000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 0000000000..f4a94931c7
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index 4099968915..0000000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 0000000000..e2b071f689
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 4fd96202d1..0000000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 0000000000..605274b1af
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index a5214605ff..0000000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000000..dda81aee5c
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 460dbd4f61..0000000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 0000000000..650e3b79b5
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index d7ddf89ccb..0000000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000000..a2564f7e62
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index d1cf872dbd..0000000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 0000000000..eb7ef4836d
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index 79b8131e4f..0000000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000000..78b6bf7919
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/values-cat/help.xml b/app/src/main/res/values-cat/help.xml
index a72ebbdd66..51298dddd4 100644
--- a/app/src/main/res/values-cat/help.xml
+++ b/app/src/main/res/values-cat/help.xml
@@ -251,4 +251,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-cat/strings.xml b/app/src/main/res/values-cat/strings.xml
index 88c331549c..804d592db2 100644
--- a/app/src/main/res/values-cat/strings.xml
+++ b/app/src/main/res/values-cat/strings.xml
@@ -447,4 +447,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-de/help.xml b/app/src/main/res/values-de/help.xml
index 058272bc0b..c680b56c19 100644
--- a/app/src/main/res/values-de/help.xml
+++ b/app/src/main/res/values-de/help.xml
@@ -311,4 +311,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 3868613cde..78a6fb0af4 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -448,4 +448,17 @@
ANWENDEN
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-el/help.xml b/app/src/main/res/values-el/help.xml
index 9683ba5920..c1a7434ca6 100644
--- a/app/src/main/res/values-el/help.xml
+++ b/app/src/main/res/values-el/help.xml
@@ -293,4 +293,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index 522ba7c723..855b3477fe 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -449,4 +449,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-eo/help.xml b/app/src/main/res/values-eo/help.xml
index 601cd27ef0..1785c885d0 100644
--- a/app/src/main/res/values-eo/help.xml
+++ b/app/src/main/res/values-eo/help.xml
@@ -337,4 +337,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml
index f6d669f316..bd4b49a1ab 100644
--- a/app/src/main/res/values-eo/strings.xml
+++ b/app/src/main/res/values-eo/strings.xml
@@ -447,4 +447,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-es/help.xml b/app/src/main/res/values-es/help.xml
index c398da6a8a..4fd451f196 100644
--- a/app/src/main/res/values-es/help.xml
+++ b/app/src/main/res/values-es/help.xml
@@ -138,15 +138,6 @@
Tasa de cambio
Debajo verás la cotización actual ofrecida por el exchange, junto con los montos mínimos y máximos. Por favor ten presente que en este paso esta cotización no está garantizada aún, va a confirarse en la siguiente pantalla, cuando tu transacción esté lista para aprobarse.
]]>
-
- Orden de cambio
- En esta pantalla estás viendo la orden coordinada con el exchange. Esta es válida por un tiempo limitado, quizás notes una cuenta regresiva en el botón de \"Enviar\". Esta cotización puede ser diferente a la indicada en los pasos anteriores, pero mientras autorices el envío antes de que se acabe el tiempo, quedará fija.
- Número de orden
- Como Monerujo solamente maneja el lado de XMR de la transacción, vas a necesitar este número de orden para rastrear el proceso de tu intercambio o recibir soporte en el sitio del exchange.
- El tiempo se acabó
- En caso de que la cuenta atrás llegue a cero, necesitarás conseguir una nueva cotización del exchange. Para eso debes volver a la pantalla anterior, y luego avanzar nuevamente a esta.
- ]]>
Crear Monedero con Ledger
@@ -220,4 +211,37 @@
Nodo de Tor
Este nodo tiene una dirección .onion. Para usarlo, debes activar el modo Tor presionando el ícono junto al nodo en la pantalla principal.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index bf6bbe0169..8f8de438f4 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -444,4 +444,17 @@
APLICAR
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-et/help.xml b/app/src/main/res/values-et/help.xml
index cf7e47a02a..dcd16fbb20 100644
--- a/app/src/main/res/values-et/help.xml
+++ b/app/src/main/res/values-et/help.xml
@@ -313,4 +313,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml
index f0468de113..9100252f8c 100644
--- a/app/src/main/res/values-et/strings.xml
+++ b/app/src/main/res/values-et/strings.xml
@@ -447,4 +447,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-fa/help.xml b/app/src/main/res/values-fa/help.xml
index e557243ee9..d6ea0761f7 100644
--- a/app/src/main/res/values-fa/help.xml
+++ b/app/src/main/res/values-fa/help.xml
@@ -422,4 +422,37 @@
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml
index 2b34fa2fe5..96a5e71969 100644
--- a/app/src/main/res/values-fa/strings.xml
+++ b/app/src/main/res/values-fa/strings.xml
@@ -687,4 +687,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-fr/help.xml b/app/src/main/res/values-fr/help.xml
index 58aa78add1..c7b17caf3f 100644
--- a/app/src/main/res/values-fr/help.xml
+++ b/app/src/main/res/values-fr/help.xml
@@ -331,4 +331,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 860edf1f09..905b6c86a0 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -460,4 +460,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-he/help.xml b/app/src/main/res/values-he/help.xml
index 3bb802ec8e..e6800a4894 100644
--- a/app/src/main/res/values-he/help.xml
+++ b/app/src/main/res/values-he/help.xml
@@ -310,4 +310,37 @@
זהו חוליית אוניון. כדי להשתמש בה, עליך להפעיל את מצב טור על-ידי לחיצה
ב-סמל ליד החלק העליון של דף רשימת הארנקים.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml
index c05e502066..5bf905d979 100644
--- a/app/src/main/res/values-he/strings.xml
+++ b/app/src/main/res/values-he/strings.xml
@@ -447,4 +447,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-hu/help.xml b/app/src/main/res/values-hu/help.xml
index af34a4510d..d3541c8bef 100644
--- a/app/src/main/res/values-hu/help.xml
+++ b/app/src/main/res/values-hu/help.xml
@@ -315,4 +315,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 29d01b2d6b..9fb4ac1db0 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -451,4 +451,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-it/help.xml b/app/src/main/res/values-it/help.xml
index 84e772f498..a32e3d4b3d 100644
--- a/app/src/main/res/values-it/help.xml
+++ b/app/src/main/res/values-it/help.xml
@@ -316,4 +316,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 9d915f3c6a..f4b88c5f4c 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -452,4 +452,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-ja/help.xml b/app/src/main/res/values-ja/help.xml
index cbc0d117a9..c58ba6d82a 100644
--- a/app/src/main/res/values-ja/help.xml
+++ b/app/src/main/res/values-ja/help.xml
@@ -444,4 +444,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index 196a1caf70..c305f3552c 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -452,4 +452,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-nb/help.xml b/app/src/main/res/values-nb/help.xml
index 70cdab6d9d..7644f54153 100644
--- a/app/src/main/res/values-nb/help.xml
+++ b/app/src/main/res/values-nb/help.xml
@@ -313,4 +313,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml
index 431d1d24ad..80453eac7e 100644
--- a/app/src/main/res/values-nb/strings.xml
+++ b/app/src/main/res/values-nb/strings.xml
@@ -449,4 +449,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-nl/help.xml b/app/src/main/res/values-nl/help.xml
index 60ff8f6b3c..a150953cde 100644
--- a/app/src/main/res/values-nl/help.xml
+++ b/app/src/main/res/values-nl/help.xml
@@ -251,4 +251,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index 222f455788..59f0449c67 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -449,4 +449,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-pt-rBR/help.xml b/app/src/main/res/values-pt-rBR/help.xml
index f1ecf142e6..a4d386adbe 100755
--- a/app/src/main/res/values-pt-rBR/help.xml
+++ b/app/src/main/res/values-pt-rBR/help.xml
@@ -312,4 +312,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 8218cb911c..189354e134 100755
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -442,4 +442,17 @@ aqui.
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-pt/help.xml b/app/src/main/res/values-pt/help.xml
index 8d2ada4564..86fbd010d5 100644
--- a/app/src/main/res/values-pt/help.xml
+++ b/app/src/main/res/values-pt/help.xml
@@ -312,4 +312,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index e6ccbc0abc..31e58f0528 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -453,4 +453,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-ro/help.xml b/app/src/main/res/values-ro/help.xml
index 5509965f34..e2d42d9ce9 100644
--- a/app/src/main/res/values-ro/help.xml
+++ b/app/src/main/res/values-ro/help.xml
@@ -319,4 +319,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml
index 9aa4201ef5..a98b2f6165 100644
--- a/app/src/main/res/values-ro/strings.xml
+++ b/app/src/main/res/values-ro/strings.xml
@@ -449,4 +449,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-ru/help.xml b/app/src/main/res/values-ru/help.xml
index 28fb0b0ce6..664b9daff0 100644
--- a/app/src/main/res/values-ru/help.xml
+++ b/app/src/main/res/values-ru/help.xml
@@ -316,4 +316,37 @@
Это .onion узел. Для того, чтобы использовать его, вы должны включить Tor, нажав
значок в верхней части страницы списка кошельков.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 3b3967c076..af38c4bfc9 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -453,4 +453,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-sk/help.xml b/app/src/main/res/values-sk/help.xml
index 93c4672556..7d4910a7e8 100644
--- a/app/src/main/res/values-sk/help.xml
+++ b/app/src/main/res/values-sk/help.xml
@@ -280,4 +280,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index 9b38847499..bac5fd2663 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -450,4 +450,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-sr/help.xml b/app/src/main/res/values-sr/help.xml
index d8b92bbc5e..8625bb9a43 100644
--- a/app/src/main/res/values-sr/help.xml
+++ b/app/src/main/res/values-sr/help.xml
@@ -311,4 +311,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml
index 36daf710d5..e09c8291f4 100644
--- a/app/src/main/res/values-sr/strings.xml
+++ b/app/src/main/res/values-sr/strings.xml
@@ -448,4 +448,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-sv/help.xml b/app/src/main/res/values-sv/help.xml
index e3f80d884a..851c64621d 100644
--- a/app/src/main/res/values-sv/help.xml
+++ b/app/src/main/res/values-sv/help.xml
@@ -300,4 +300,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index a0ab29dce1..7fdb0e7bc4 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -441,4 +441,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-ta/help.xml b/app/src/main/res/values-ta/help.xml
index a81a79bddd..03ea448a23 100644
--- a/app/src/main/res/values-ta/help.xml
+++ b/app/src/main/res/values-ta/help.xml
@@ -319,4 +319,37 @@
இது ஒரு .onion கணுவாகும். இதை பயன்படுத்த நீங்கள் பணப்பை பட்டியல் பக்கத்தின் மேல் உள்ள
சின்னத்தை தட்டி TOR பயன்முறையை செயல்படுத்தவும்.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml
index e75e0ae6de..6a0abb25ec 100644
--- a/app/src/main/res/values-ta/strings.xml
+++ b/app/src/main/res/values-ta/strings.xml
@@ -447,4 +447,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-uk/help.xml b/app/src/main/res/values-uk/help.xml
index c968fea975..5216f57599 100644
--- a/app/src/main/res/values-uk/help.xml
+++ b/app/src/main/res/values-uk/help.xml
@@ -311,4 +311,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index 38c0e34b0d..64c482dd6b 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -453,4 +453,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-zh-rCN/help.xml b/app/src/main/res/values-zh-rCN/help.xml
index 2d508d2721..12d6493d5c 100644
--- a/app/src/main/res/values-zh-rCN/help.xml
+++ b/app/src/main/res/values-zh-rCN/help.xml
@@ -251,4 +251,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index ac4e912757..3fdae218cc 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -374,4 +374,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values-zh-rTW/help.xml b/app/src/main/res/values-zh-rTW/help.xml
index 6613b5e363..a145690525 100644
--- a/app/src/main/res/values-zh-rTW/help.xml
+++ b/app/src/main/res/values-zh-rTW/help.xml
@@ -252,4 +252,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index df112e3a98..37a6fa68b4 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -448,4 +448,17 @@
APPLY
Lock Wallet in Background
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values/help.xml b/app/src/main/res/values/help.xml
index d5e4a397d4..b25c7c3dd5 100644
--- a/app/src/main/res/values/help.xml
+++ b/app/src/main/res/values/help.xml
@@ -179,22 +179,10 @@
Converting XMR
Amounts
-
Enter on the \"Amount\" field the amount of cryptocurrency you want to send. By default, it will show you the equivalent amount of XMR to be sent from your wallet. You can pick a different currency from the dropdown if you want to fix your amount on it. Monerujo uses a fixed rate, so at the end of the process you should get the exact amount you specify here.
+ Enter on the \"Amount\" field the amount of cryptocurrency you want to send. By default, it will show you the equivalent amount of XMR to be sent from your wallet. You can pick a different currency from the dropdown if you want to fix your amount on it. Monerujo uses a fixed rate, so at the end of the process you should get the exact amount you specify here.
Exchange rate
Below you will see the current rate provided by the exchange, along with their lower and upper limits. Please note that this rate is not guaranteed at this point, it will be set the moment your transaction is ready to be approved on the next screen.
]]>
-
- Exchange Order
-
On this screen you will see the actual exchange order. This order is valid for
- a limited time - you may notice a countdown on the \"Spend\" button. This exchange rate may
- be different to the one shown on previous screens, but as long as you accept before the time runs out, it\'ll be fixed.
- Order Number
-
Since Monerujo only handles the XMR side of your transaction, your order number can be used to track or get support for your order on the exchange\'s website.
- Countdown is over
- Once the countdown reaches zero, you need to get a new quote from the exchange by going back to the
- previous screen, and then coming back to this screen.
- ]]>
The Wallet
@@ -300,4 +288,37 @@
This is an .onion node. In order to use it, you must enable Tor mode by touching the
icon near the top of the Wallet List page.
]]>
+
+ Using your sidekick wallet
+ Check that both phones are connected via Bluetooth and both apps are opened.
+
+ On sidekick:
+ Open your wallet of choice.
+
+ On monerujo:
+ Connect to sidekick.
+
+ Open the wallet matching the one you have opened on the sidekick phone.
+
+ Use it as you\'d normally use any wallet. Let it scan to see incoming transactions, share addresses, or send moneros. If the app needs to do something that involves your keys, it\'ll ask for permission from sidekick.
+
+ On sidekick:
+ If monerujo requested permission, you should see a dialog that shows the transaction details like amount and fees. You\'ll also see two options, to ACCEPT or DENY it. Choose wisely.
+
+ On monerujo:
+ The transaction should be signed and ready to be sent. Press to make it so.
+
+ ]]>
+
+ Create Wallet - Sidekick
+ You want to recover your wallet from your awesome Sidekick device.
+ Et netus et malesuada fames. Mattis enim ut tellus elementum sagittis vitae. Eget duis at
+ tellus at. Id aliquet risus feugiat in. Donec et odio pellentesque diam. Dictum fusce ut
+ placerat orci nulla. Amet nisl suscipit adipiscing bibendum est ultricies integer quis.
+ Enter the block number of the first transaction used for this address in the
+ field \"Restore Height\". You can also use a date in the format YYYY-MM-DD. If you are not sure,
+ enter an approximate date/blockheight before you first used this wallet address.
+ ]]>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 49b006cbe4..c31a5d728f 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -27,7 +27,7 @@
Credits
OK
Cancel
- Close Note
+ Close
Detailed information
Successfully sent
@@ -197,6 +197,7 @@
Seed
View
Ledger
+ Sidekick
Public Address
View Key
@@ -501,4 +502,32 @@
APPLY
Lock Wallet in Background
+
+ Sidekick Wallet
+ monerujo Sidekick Service
+
+ Bluetooth not connected
+ Paired Devices
+ Other Devices
+ Scan
+ None paired
+ None found
+ Select Device
+ Bluetooth
+ Connect Sidekick
+ Select Sidekick device
+ Scanning for devices
+
+ Bluetooth permissions are required to connect your Sidekick Wallet!
+ OK
+ App Settings
+ Cancel
+
+ PIN: %1$s
+ [not connected]
+ Confirm Transaction
+ Network is on - this is a security risk. It is recommended
+ to turn on flight mode and restart the app with only Bluetooth enabled!
+ Please connect Sidekick device
+ Restore from Sidekick
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 4501c4dd07..1a5256fa0c 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -265,6 +265,9 @@
- 24sp
+