diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java index 63166717d4..e4b2c344d8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java @@ -3,6 +3,7 @@ package info.nightscout.androidaps.plugins.Overview; import android.annotation.SuppressLint; import android.app.Activity; import android.app.NotificationManager; +import android.content.ActivityNotFoundException; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; @@ -632,8 +633,12 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, CalibrationDialog calibrationDialog = new CalibrationDialog(); calibrationDialog.show(manager, "CalibrationDialog"); } else if (g5) { - Intent i = new Intent("com.dexcom.cgm.activities.MeterEntryActivity"); - startActivity(i); + try { + Intent i = new Intent("com.dexcom.cgm.activities.MeterEntryActivity"); + startActivity(i); + } catch (ActivityNotFoundException e) { + ToastUtils.showToastInUiThread(getActivity(), MainApp.gs(R.string.g5appnotdetected)); + } } break; case R.id.overview_treatmentbutton: diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 319ebc2413..4a802632d6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -935,5 +935,6 @@ Create announcements from errors Create Nightscout announcement for error dialogs and local alerts (also viewable in Careportal under Treatments) G5 + Please update your G5 app to supported version