more update
This commit is contained in:
parent
cd337ecdc8
commit
2cb3c15d61
9 changed files with 125 additions and 29 deletions
|
@ -83,6 +83,8 @@
|
||||||
<action android:name="it.ct.glicemia.ACTION_GLUCOSE_MEASURED" />
|
<action android:name="it.ct.glicemia.ACTION_GLUCOSE_MEASURED" />
|
||||||
<!-- Receiver from DexcomG5 -->
|
<!-- Receiver from DexcomG5 -->
|
||||||
<action android:name="com.dexcom.cgm.DATA" />
|
<action android:name="com.dexcom.cgm.DATA" />
|
||||||
|
<!-- Receiver from Poctech -->
|
||||||
|
<action android:name="com.china.poctech.data" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
<!-- Receiver keepalive, scheduled every 30 min -->
|
<!-- Receiver keepalive, scheduled every 30 min -->
|
||||||
|
@ -170,7 +172,7 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".setupwizard.SetupWizardActivity"
|
android:name=".setupwizard.SetupWizardActivity"
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||||
android:theme="@style/AppTheme.SetupWizard"
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
android:label="@string/title_activity_setup_wizard" />
|
android:label="@string/title_activity_setup_wizard" />
|
||||||
|
|
||||||
<activity android:name=".SingleFragmentActivity"
|
<activity android:name=".SingleFragmentActivity"
|
||||||
|
|
|
@ -139,8 +139,10 @@ public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
AndroidPermission.notifyForStoragePermission(this);
|
AndroidPermission.notifyForStoragePermission(this);
|
||||||
AndroidPermission.notifyForBatteryOptimizationPermission(this);
|
AndroidPermission.notifyForBatteryOptimizationPermission(this);
|
||||||
AndroidPermission.notifyForLocationPermissions(this);
|
if (BuildConfig.APS || BuildConfig.PUMPCONTROL) {
|
||||||
AndroidPermission.notifyForSMSPermissions(this);
|
AndroidPermission.notifyForLocationPermissions(this);
|
||||||
|
AndroidPermission.notifyForSMSPermissions(this);
|
||||||
|
}
|
||||||
|
|
||||||
MainApp.bus().post(new EventFeatureRunning(EventFeatureRunning.Feature.MAIN));
|
MainApp.bus().post(new EventFeatureRunning(EventFeatureRunning.Feature.MAIN));
|
||||||
}
|
}
|
||||||
|
@ -200,13 +202,14 @@ public class MainActivity extends AppCompatActivity {
|
||||||
menu.clear();
|
menu.clear();
|
||||||
for (PluginBase p : MainApp.getPluginsList()) {
|
for (PluginBase p : MainApp.getPluginsList()) {
|
||||||
pageAdapter.registerNewFragment(p);
|
pageAdapter.registerNewFragment(p);
|
||||||
if (p.hasFragment() && !p.isFragmentVisible() && p.isEnabled(p.pluginDescription.getType())) {
|
if (p.hasFragment() && !p.isFragmentVisible() && p.isEnabled(p.pluginDescription.getType()) && !p.pluginDescription.neverVisible) {
|
||||||
MenuItem menuItem = menu.add(p.getName());
|
MenuItem menuItem = menu.add(p.getName());
|
||||||
menuItem.setCheckable(true);
|
menuItem.setCheckable(true);
|
||||||
menuItem.setOnMenuItemClickListener(item -> {
|
menuItem.setOnMenuItemClickListener(item -> {
|
||||||
Intent intent = new Intent(this, SingleFragmentActivity.class);
|
Intent intent = new Intent(this, SingleFragmentActivity.class);
|
||||||
intent.putExtra("plugin", MainApp.getPluginsList().indexOf(p));
|
intent.putExtra("plugin", MainApp.getPluginsList().indexOf(p));
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
((DrawerLayout) findViewById(R.id.drawer_layout)).closeDrawers();
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ import info.nightscout.androidaps.plugins.Source.SourceDexcomG5Plugin;
|
||||||
import info.nightscout.androidaps.plugins.Source.SourceGlimpPlugin;
|
import info.nightscout.androidaps.plugins.Source.SourceGlimpPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Source.SourceMM640gPlugin;
|
import info.nightscout.androidaps.plugins.Source.SourceMM640gPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Source.SourceNSClientPlugin;
|
import info.nightscout.androidaps.plugins.Source.SourceNSClientPlugin;
|
||||||
|
import info.nightscout.androidaps.plugins.Source.SourcePoctechPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Source.SourceXdripPlugin;
|
import info.nightscout.androidaps.plugins.Source.SourceXdripPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
|
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Wear.WearPlugin;
|
import info.nightscout.androidaps.plugins.Wear.WearPlugin;
|
||||||
|
@ -178,6 +179,8 @@ public class MainApp extends Application {
|
||||||
pluginsList.add(SourceGlimpPlugin.getPlugin());
|
pluginsList.add(SourceGlimpPlugin.getPlugin());
|
||||||
if (!Config.NSCLIENT)
|
if (!Config.NSCLIENT)
|
||||||
pluginsList.add(SourceDexcomG5Plugin.getPlugin());
|
pluginsList.add(SourceDexcomG5Plugin.getPlugin());
|
||||||
|
if (!Config.NSCLIENT)
|
||||||
|
pluginsList.add(SourcePoctechPlugin.getPlugin());
|
||||||
if (Config.SMSCOMMUNICATORENABLED) pluginsList.add(SmsCommunicatorPlugin.getPlugin());
|
if (Config.SMSCOMMUNICATORENABLED) pluginsList.add(SmsCommunicatorPlugin.getPlugin());
|
||||||
pluginsList.add(FoodPlugin.getPlugin());
|
pluginsList.add(FoodPlugin.getPlugin());
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.Config;
|
import info.nightscout.androidaps.Config;
|
||||||
|
import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.ProfileStore;
|
import info.nightscout.androidaps.data.ProfileStore;
|
||||||
|
@ -38,6 +39,7 @@ import info.nightscout.androidaps.plugins.Source.SourceDexcomG5Plugin;
|
||||||
import info.nightscout.androidaps.plugins.Source.SourceGlimpPlugin;
|
import info.nightscout.androidaps.plugins.Source.SourceGlimpPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Source.SourceMM640gPlugin;
|
import info.nightscout.androidaps.plugins.Source.SourceMM640gPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Source.SourceNSClientPlugin;
|
import info.nightscout.androidaps.plugins.Source.SourceNSClientPlugin;
|
||||||
|
import info.nightscout.androidaps.plugins.Source.SourcePoctechPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Source.SourceXdripPlugin;
|
import info.nightscout.androidaps.plugins.Source.SourceXdripPlugin;
|
||||||
import info.nightscout.androidaps.receivers.DataReceiver;
|
import info.nightscout.androidaps.receivers.DataReceiver;
|
||||||
import info.nightscout.utils.BundleLogger;
|
import info.nightscout.utils.BundleLogger;
|
||||||
|
@ -54,6 +56,7 @@ public class DataService extends IntentService {
|
||||||
boolean mm640gEnabled = false;
|
boolean mm640gEnabled = false;
|
||||||
boolean glimpEnabled = false;
|
boolean glimpEnabled = false;
|
||||||
boolean dexcomG5Enabled = false;
|
boolean dexcomG5Enabled = false;
|
||||||
|
boolean poctechEnabled = false;
|
||||||
|
|
||||||
public DataService() {
|
public DataService() {
|
||||||
super("DataService");
|
super("DataService");
|
||||||
|
@ -70,36 +73,49 @@ public class DataService extends IntentService {
|
||||||
mm640gEnabled = false;
|
mm640gEnabled = false;
|
||||||
glimpEnabled = false;
|
glimpEnabled = false;
|
||||||
dexcomG5Enabled = false;
|
dexcomG5Enabled = false;
|
||||||
|
poctechEnabled = false;
|
||||||
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourceXdripPlugin.class)) {
|
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourceXdripPlugin.class)) {
|
||||||
xDripEnabled = true;
|
xDripEnabled = true;
|
||||||
nsClientEnabled = false;
|
nsClientEnabled = false;
|
||||||
mm640gEnabled = false;
|
mm640gEnabled = false;
|
||||||
glimpEnabled = false;
|
glimpEnabled = false;
|
||||||
dexcomG5Enabled = false;
|
dexcomG5Enabled = false;
|
||||||
|
poctechEnabled = false;
|
||||||
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourceNSClientPlugin.class)) {
|
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourceNSClientPlugin.class)) {
|
||||||
xDripEnabled = false;
|
xDripEnabled = false;
|
||||||
nsClientEnabled = true;
|
nsClientEnabled = true;
|
||||||
mm640gEnabled = false;
|
mm640gEnabled = false;
|
||||||
glimpEnabled = false;
|
glimpEnabled = false;
|
||||||
dexcomG5Enabled = false;
|
dexcomG5Enabled = false;
|
||||||
|
poctechEnabled = false;
|
||||||
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourceMM640gPlugin.class)) {
|
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourceMM640gPlugin.class)) {
|
||||||
xDripEnabled = false;
|
xDripEnabled = false;
|
||||||
nsClientEnabled = false;
|
nsClientEnabled = false;
|
||||||
mm640gEnabled = true;
|
mm640gEnabled = true;
|
||||||
glimpEnabled = false;
|
glimpEnabled = false;
|
||||||
dexcomG5Enabled = false;
|
dexcomG5Enabled = false;
|
||||||
|
poctechEnabled = false;
|
||||||
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourceGlimpPlugin.class)) {
|
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourceGlimpPlugin.class)) {
|
||||||
xDripEnabled = false;
|
xDripEnabled = false;
|
||||||
nsClientEnabled = false;
|
nsClientEnabled = false;
|
||||||
mm640gEnabled = false;
|
mm640gEnabled = false;
|
||||||
glimpEnabled = true;
|
glimpEnabled = true;
|
||||||
dexcomG5Enabled = false;
|
dexcomG5Enabled = false;
|
||||||
|
poctechEnabled = false;
|
||||||
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourceDexcomG5Plugin.class)) {
|
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourceDexcomG5Plugin.class)) {
|
||||||
xDripEnabled = false;
|
xDripEnabled = false;
|
||||||
nsClientEnabled = false;
|
nsClientEnabled = false;
|
||||||
mm640gEnabled = false;
|
mm640gEnabled = false;
|
||||||
glimpEnabled = false;
|
glimpEnabled = false;
|
||||||
dexcomG5Enabled = true;
|
dexcomG5Enabled = true;
|
||||||
|
poctechEnabled = false;
|
||||||
|
} else if (ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().equals(SourcePoctechPlugin.class)) {
|
||||||
|
xDripEnabled = false;
|
||||||
|
nsClientEnabled = false;
|
||||||
|
mm640gEnabled = false;
|
||||||
|
glimpEnabled = false;
|
||||||
|
dexcomG5Enabled = false;
|
||||||
|
poctechEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isNSProfile = MainApp.getConfigBuilder().getActiveProfileInterface() != null && MainApp.getConfigBuilder().getActiveProfileInterface().getClass().equals(NSProfilePlugin.class);
|
boolean isNSProfile = MainApp.getConfigBuilder().getActiveProfileInterface() != null && MainApp.getConfigBuilder().getActiveProfileInterface().getClass().equals(NSProfilePlugin.class);
|
||||||
|
@ -129,6 +145,10 @@ public class DataService extends IntentService {
|
||||||
if (dexcomG5Enabled) {
|
if (dexcomG5Enabled) {
|
||||||
handleNewDataFromDexcomG5(intent);
|
handleNewDataFromDexcomG5(intent);
|
||||||
}
|
}
|
||||||
|
} else if (Intents.POCTECH_BG.equals(action)) {
|
||||||
|
if (poctechEnabled) {
|
||||||
|
handleNewDataFromPoctech(intent);
|
||||||
|
}
|
||||||
} else if (Intents.ACTION_NEW_SGV.equals(action)) {
|
} else if (Intents.ACTION_NEW_SGV.equals(action)) {
|
||||||
if (nsClientEnabled || SP.getBoolean(R.string.key_ns_autobackfill, true))
|
if (nsClientEnabled || SP.getBoolean(R.string.key_ns_autobackfill, true))
|
||||||
handleNewDataFromNSClient(intent);
|
handleNewDataFromNSClient(intent);
|
||||||
|
@ -250,6 +270,41 @@ public class DataService extends IntentService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleNewDataFromPoctech(Intent intent) {
|
||||||
|
|
||||||
|
Bundle bundle = intent.getExtras();
|
||||||
|
if (bundle == null) return;
|
||||||
|
|
||||||
|
BgReading bgReading = new BgReading();
|
||||||
|
|
||||||
|
String data = bundle.getString("data");
|
||||||
|
log.debug("Received Poctech Data", data);
|
||||||
|
|
||||||
|
try {
|
||||||
|
JSONArray jsonArray = new JSONArray(data);
|
||||||
|
log.debug("Received Poctech Data size:" + jsonArray.length());
|
||||||
|
for (int i = 0; i < jsonArray.length(); i++) {
|
||||||
|
JSONObject json = jsonArray.getJSONObject(i);
|
||||||
|
bgReading.value = json.getDouble("current");
|
||||||
|
bgReading.direction = json.getString("direction");
|
||||||
|
bgReading.date = json.getLong("date");
|
||||||
|
bgReading.raw = json.getDouble("raw");
|
||||||
|
if (JsonHelper.safeGetString(json, "utils", Constants.MGDL).equals("mmol/L"))
|
||||||
|
bgReading.value = bgReading.value * Constants.MMOLL_TO_MGDL;
|
||||||
|
boolean isNew = MainApp.getDbHelper().createIfNotExists(bgReading, "Poctech");
|
||||||
|
if (isNew && SP.getBoolean(R.string.key_dexcomg5_nsupload, false)) {
|
||||||
|
NSUpload.uploadBg(bgReading);
|
||||||
|
}
|
||||||
|
if (isNew && SP.getBoolean(R.string.key_dexcomg5_xdripupload, false)) {
|
||||||
|
NSUpload.sendToXdrip(bgReading);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void handleNewDataFromMM640g(Intent intent) {
|
private void handleNewDataFromMM640g(Intent intent) {
|
||||||
Bundle bundle = intent.getExtras();
|
Bundle bundle = intent.getExtras();
|
||||||
if (bundle == null) return;
|
if (bundle == null) return;
|
||||||
|
|
|
@ -49,4 +49,6 @@ public interface Intents {
|
||||||
String GLIMP_BG = "it.ct.glicemia.ACTION_GLUCOSE_MEASURED";
|
String GLIMP_BG = "it.ct.glicemia.ACTION_GLUCOSE_MEASURED";
|
||||||
|
|
||||||
String DEXCOMG5_BG = "com.dexcom.cgm.DATA";
|
String DEXCOMG5_BG = "com.dexcom.cgm.DATA";
|
||||||
|
|
||||||
|
String POCTECH_BG = "com.china.poctech.data";
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,11 @@ public abstract class PluginBase {
|
||||||
return getName();
|
return getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
if (pluginDescription.description == -1) return null;
|
||||||
|
else return MainApp.gs(pluginDescription.description);
|
||||||
|
}
|
||||||
|
|
||||||
public PluginType getType() {
|
public PluginType getType() {
|
||||||
return pluginDescription.mainType;
|
return pluginDescription.mainType;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ public class PluginDescription {
|
||||||
boolean showInList = true;
|
boolean showInList = true;
|
||||||
int pluginName = -1;
|
int pluginName = -1;
|
||||||
int shortName = -1;
|
int shortName = -1;
|
||||||
|
int description = -1;
|
||||||
int preferencesId = -1;
|
int preferencesId = -1;
|
||||||
int advancedPreferencesId = -1;
|
int advancedPreferencesId = -1;
|
||||||
public boolean enableByDefault = false;
|
public boolean enableByDefault = false;
|
||||||
|
@ -74,6 +75,11 @@ public class PluginDescription {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PluginDescription description(int description) {
|
||||||
|
this.description = description;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getFragmentClass() {
|
public String getFragmentClass() {
|
||||||
return fragmentClass;
|
return fragmentClass;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ public class ActionsPlugin extends PluginBase {
|
||||||
.fragmentClass(ActionsFragment.class.getName())
|
.fragmentClass(ActionsFragment.class.getName())
|
||||||
.pluginName(R.string.actions)
|
.pluginName(R.string.actions)
|
||||||
.shortName(R.string.actions_shortname)
|
.shortName(R.string.actions_shortname)
|
||||||
|
.description(R.string.description_actions)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,10 @@ public class FillDialog extends DialogFragment implements OnClickListener {
|
||||||
|
|
||||||
private EditText notesEdit;
|
private EditText notesEdit;
|
||||||
|
|
||||||
|
//one shot guards
|
||||||
|
private boolean accepted;
|
||||||
|
private boolean okClicked;
|
||||||
|
|
||||||
final private TextWatcher textWatcher = new TextWatcher() {
|
final private TextWatcher textWatcher = new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
|
@ -163,7 +167,14 @@ public class FillDialog extends DialogFragment implements OnClickListener {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void confirmAndDeliver() {
|
private synchronized void confirmAndDeliver() {
|
||||||
|
if (okClicked) {
|
||||||
|
log.debug("guarding: ok already clicked");
|
||||||
|
dismiss();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
okClicked = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Double insulin = SafeParse.stringToDouble(editInsulin.getText());
|
Double insulin = SafeParse.stringToDouble(editInsulin.getText());
|
||||||
|
|
||||||
|
@ -198,32 +209,40 @@ public class FillDialog extends DialogFragment implements OnClickListener {
|
||||||
if (insulinAfterConstraints > 0 || pumpSiteChangeCheckbox.isChecked() || insulinCartridgeChangeCheckbox.isChecked()) {
|
if (insulinAfterConstraints > 0 || pumpSiteChangeCheckbox.isChecked() || insulinCartridgeChangeCheckbox.isChecked()) {
|
||||||
builder.setMessage(Html.fromHtml(Joiner.on("<br/>").join(confirmMessage)));
|
builder.setMessage(Html.fromHtml(Joiner.on("<br/>").join(confirmMessage)));
|
||||||
builder.setPositiveButton(MainApp.gs(R.string.primefill), (dialog, id) -> {
|
builder.setPositiveButton(MainApp.gs(R.string.primefill), (dialog, id) -> {
|
||||||
if (finalInsulinAfterConstraints > 0) {
|
synchronized (builder) {
|
||||||
DetailedBolusInfo detailedBolusInfo = new DetailedBolusInfo();
|
if (accepted) {
|
||||||
detailedBolusInfo.insulin = finalInsulinAfterConstraints;
|
log.debug("guarding: already accepted");
|
||||||
detailedBolusInfo.context = context;
|
return;
|
||||||
detailedBolusInfo.source = Source.USER;
|
}
|
||||||
detailedBolusInfo.isValid = false; // do not count it in IOB (for pump history)
|
accepted = true;
|
||||||
detailedBolusInfo.notes = notes;
|
|
||||||
ConfigBuilderPlugin.getCommandQueue().bolus(detailedBolusInfo, new Callback() {
|
if (finalInsulinAfterConstraints > 0) {
|
||||||
@Override
|
DetailedBolusInfo detailedBolusInfo = new DetailedBolusInfo();
|
||||||
public void run() {
|
detailedBolusInfo.insulin = finalInsulinAfterConstraints;
|
||||||
if (!result.success) {
|
detailedBolusInfo.context = context;
|
||||||
Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class);
|
detailedBolusInfo.source = Source.USER;
|
||||||
i.putExtra("soundid", R.raw.boluserror);
|
detailedBolusInfo.isValid = false; // do not count it in IOB (for pump history)
|
||||||
i.putExtra("status", result.comment);
|
detailedBolusInfo.notes = notes;
|
||||||
i.putExtra("title", MainApp.gs(R.string.treatmentdeliveryerror));
|
ConfigBuilderPlugin.getCommandQueue().bolus(detailedBolusInfo, new Callback() {
|
||||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
@Override
|
||||||
MainApp.instance().startActivity(i);
|
public void run() {
|
||||||
|
if (!result.success) {
|
||||||
|
Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class);
|
||||||
|
i.putExtra("soundid", R.raw.boluserror);
|
||||||
|
i.putExtra("status", result.comment);
|
||||||
|
i.putExtra("title", MainApp.gs(R.string.treatmentdeliveryerror));
|
||||||
|
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
MainApp.instance().startActivity(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
FabricPrivacy.getInstance().logCustom(new CustomEvent("Fill"));
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("Fill"));
|
}
|
||||||
|
if (pumpSiteChangeCheckbox.isChecked())
|
||||||
|
NSUpload.uploadEvent(CareportalEvent.SITECHANGE, now(), notes);
|
||||||
|
if (insulinCartridgeChangeCheckbox.isChecked())
|
||||||
|
NSUpload.uploadEvent(CareportalEvent.INSULINCHANGE, now() + 1000, notes);
|
||||||
}
|
}
|
||||||
if (pumpSiteChangeCheckbox.isChecked())
|
|
||||||
NSUpload.uploadEvent(CareportalEvent.SITECHANGE, now(), notes);
|
|
||||||
if (insulinCartridgeChangeCheckbox.isChecked())
|
|
||||||
NSUpload.uploadEvent(CareportalEvent.INSULINCHANGE, now() + 1000, notes);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
builder.setMessage(MainApp.gs(R.string.no_action_selected));
|
builder.setMessage(MainApp.gs(R.string.no_action_selected));
|
||||||
|
|
Loading…
Reference in a new issue