diff --git a/app/src/main/java/ch/dissem/apps/abit/MainActivity.java b/app/src/main/java/ch/dissem/apps/abit/MainActivity.java index 5970b60..d52afe5 100644 --- a/app/src/main/java/ch/dissem/apps/abit/MainActivity.java +++ b/app/src/main/java/ch/dissem/apps/abit/MainActivity.java @@ -387,8 +387,8 @@ public class MainActivity extends AppCompatActivity @Override protected void onResume() { updateUnread(); - if (Preferences.isFullNodeActive(this)){ - checkAndStartNode(); + if (Preferences.isFullNodeActive(this) && Preferences.isConnectionAllowed(MainActivity.this)) { + startService(new Intent(this, BitmessageService.class)); } updateNodeSwitch(); Singleton.getMessageListener(this).resetNotification(); diff --git a/app/src/main/java/ch/dissem/apps/abit/dialog/FullNodeDialogActivity.java b/app/src/main/java/ch/dissem/apps/abit/dialog/FullNodeDialogActivity.java index 015dbfd..bb0cf57 100644 --- a/app/src/main/java/ch/dissem/apps/abit/dialog/FullNodeDialogActivity.java +++ b/app/src/main/java/ch/dissem/apps/abit/dialog/FullNodeDialogActivity.java @@ -35,7 +35,7 @@ public class FullNodeDialogActivity extends Activity { findViewById(R.id.ok).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - Preferences.setWifiOnly(FullNodeDialogActivity.this, true); + Preferences.setWifiOnly(FullNodeDialogActivity.this, false); finish(); } }); diff --git a/app/src/main/java/ch/dissem/apps/abit/util/Drawables.java b/app/src/main/java/ch/dissem/apps/abit/util/Drawables.java index dfda9c8..721cc87 100644 --- a/app/src/main/java/ch/dissem/apps/abit/util/Drawables.java +++ b/app/src/main/java/ch/dissem/apps/abit/util/Drawables.java @@ -45,6 +45,7 @@ import static android.graphics.Color.BLACK; import static android.graphics.Color.WHITE; import static android.util.Base64.NO_WRAP; import static android.util.Base64.URL_SAFE; +import static ch.dissem.apps.abit.util.Constants.BITMESSAGE_URL_SCHEMA; /** * Some helper methods to work with drawables. @@ -73,7 +74,8 @@ public class Drawables { } public static Bitmap qrCode(BitmessageAddress address) { - StringBuilder link = new StringBuilder("bitmessage:"); + StringBuilder link = new StringBuilder(); + link.append(BITMESSAGE_URL_SCHEMA); link.append(address.getAddress()); if (address.getAlias() != null) { link.append("?label=").append(address.getAlias());