Pumpcontrol icon
|
@ -99,19 +99,19 @@ android {
|
|||
applicationId "info.nightscout.androidaps"
|
||||
dimension "standard"
|
||||
resValue "string", "app_name", "AndroidAPS"
|
||||
versionName version
|
||||
versionName version + "-pumpcontrol"
|
||||
manifestPlaceholders = [
|
||||
appIcon: "@mipmap/ic_launcher",
|
||||
appIconRound: "@mipmap/ic_launcher_round"
|
||||
]
|
||||
}
|
||||
pumpcontrol {
|
||||
applicationId "info.nightscout.androidaps"
|
||||
applicationId "info.nightscout.aapspumpcontrol"
|
||||
dimension "standard"
|
||||
resValue "string", "app_name", "AndroidAPS"
|
||||
resValue "string", "app_name", "Pumpcontrol"
|
||||
versionName version
|
||||
manifestPlaceholders = [
|
||||
appIcon: "@mipmap/blueowl",
|
||||
appIcon: "@mipmap/ic_pumpcontrol",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ android {
|
|||
resValue "string", "app_name", "NSClient"
|
||||
versionName version + "-nsclient"
|
||||
manifestPlaceholders = [
|
||||
appIcon: "@mipmap/yellowowl",
|
||||
appIcon: "@mipmap/ic_yellowowl",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ android {
|
|||
resValue "string", "app_name", "NSClient2"
|
||||
versionName version + "-nsclient"
|
||||
manifestPlaceholders = [
|
||||
appIcon: "@mipmap/yellowowl",
|
||||
appIcon: "@mipmap/ic_yellowowl",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -378,10 +378,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
case R.id.nav_about:
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(MainApp.gs(R.string.app_name) + " " + BuildConfig.VERSION);
|
||||
if (Config.NSCLIENT)
|
||||
builder.setIcon(R.mipmap.yellowowl);
|
||||
else
|
||||
builder.setIcon(R.mipmap.blueowl);
|
||||
builder.setIcon(MainApp.getIcon());
|
||||
String message = "Build: " + BuildConfig.BUILDVERSION + "\n";
|
||||
message += "Flavor: " + BuildConfig.FLAVOR + BuildConfig.BUILD_TYPE + "\n";
|
||||
message += MainApp.gs(R.string.configbuilder_nightscoutversion_label) + " " + NSSettingsStatus.getInstance().nightscoutVersionName;
|
||||
|
|
|
@ -29,27 +29,31 @@ import info.nightscout.androidaps.interfaces.PluginBase;
|
|||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.plugins.general.actions.ActionsFragment;
|
||||
import info.nightscout.androidaps.plugins.general.careportal.CareportalPlugin;
|
||||
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
||||
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin;
|
||||
import info.nightscout.androidaps.plugins.aps.openAPSMA.OpenAPSMAPlugin;
|
||||
import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
|
||||
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.actions.ActionsFragment;
|
||||
import info.nightscout.androidaps.plugins.general.careportal.CareportalPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.food.FoodPlugin;
|
||||
import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin;
|
||||
import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin;
|
||||
import info.nightscout.androidaps.plugins.insulin.InsulinOrefUltraRapidActingPlugin;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.maintenance.LoggerUtils;
|
||||
import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin;
|
||||
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.receivers.AckAlarmReceiver;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.receivers.DBAccessReceiver;
|
||||
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin;
|
||||
import info.nightscout.androidaps.plugins.aps.openAPSMA.OpenAPSMAPlugin;
|
||||
import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.persistentNotification.PersistentNotificationPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.wear.WearPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatuslinePlugin;
|
||||
import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin;
|
||||
import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin;
|
||||
import info.nightscout.androidaps.plugins.insulin.InsulinOrefUltraRapidActingPlugin;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin;
|
||||
import info.nightscout.androidaps.plugins.profile.ns.NSProfilePlugin;
|
||||
import info.nightscout.androidaps.plugins.profile.simple.SimpleProfilePlugin;
|
||||
|
@ -65,7 +69,6 @@ import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin;
|
|||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref0Plugin;
|
||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin;
|
||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin;
|
||||
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.source.SourceDexcomG5Plugin;
|
||||
import info.nightscout.androidaps.plugins.source.SourceDexcomG6Plugin;
|
||||
import info.nightscout.androidaps.plugins.source.SourceEversensePlugin;
|
||||
|
@ -76,14 +79,11 @@ import info.nightscout.androidaps.plugins.source.SourcePoctechPlugin;
|
|||
import info.nightscout.androidaps.plugins.source.SourceTomatoPlugin;
|
||||
import info.nightscout.androidaps.plugins.source.SourceXdripPlugin;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.wear.WearPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatuslinePlugin;
|
||||
import info.nightscout.androidaps.receivers.DataReceiver;
|
||||
import info.nightscout.androidaps.receivers.KeepAliveReceiver;
|
||||
import info.nightscout.androidaps.receivers.NSAlarmReceiver;
|
||||
import info.nightscout.androidaps.services.Intents;
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||
import info.nightscout.androidaps.plugins.general.maintenance.LoggerUtils;
|
||||
import io.fabric.sdk.android.Fabric;
|
||||
|
||||
|
||||
|
@ -390,6 +390,24 @@ public class MainApp extends Application {
|
|||
return devBranch;
|
||||
}
|
||||
|
||||
public static int getIcon() {
|
||||
if (Config.NSCLIENT)
|
||||
return R.mipmap.ic_yellowowl;
|
||||
else if (Config.PUMPCONTROL)
|
||||
return R.mipmap.ic_pumpcontrol;
|
||||
else
|
||||
return R.mipmap.ic_launcher;
|
||||
}
|
||||
|
||||
public static int getNotificationIcon() {
|
||||
if (Config.NSCLIENT)
|
||||
return R.drawable.ic_notif_nsclient;
|
||||
else if (Config.PUMPCONTROL)
|
||||
return R.drawable.ic_notif_pumpcontrol;
|
||||
else
|
||||
return R.drawable.ic_notif_aaps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTerminate() {
|
||||
if (L.isEnabled(L.CORE))
|
||||
|
|
|
@ -126,12 +126,8 @@ public class NotificationStore {
|
|||
private void raiseSystemNotification(Notification n) {
|
||||
Context context = MainApp.instance().getApplicationContext();
|
||||
NotificationManager mgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
Bitmap largeIcon = BitmapFactory.decodeResource(context.getResources(), R.mipmap.blueowl);
|
||||
int smallIcon = R.drawable.ic_notification;
|
||||
if (Config.NSCLIENT) {
|
||||
largeIcon = BitmapFactory.decodeResource(MainApp.instance().getResources(), R.mipmap.yellowowl);
|
||||
smallIcon = R.drawable.nsclient_smallicon;
|
||||
}
|
||||
Bitmap largeIcon = BitmapFactory.decodeResource(context.getResources(), MainApp.getIcon());
|
||||
int smallIcon = MainApp.getNotificationIcon();
|
||||
Uri sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
|
||||
NotificationCompat.Builder notificationBuilder =
|
||||
new NotificationCompat.Builder(context, CHANNEL_ID)
|
||||
|
|
|
@ -11,17 +11,11 @@ import android.graphics.Bitmap;
|
|||
import android.graphics.BitmapFactory;
|
||||
import android.os.Build;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.support.v4.app.TaskStackBuilder;
|
||||
|
||||
// Android Auto
|
||||
import android.support.v4.app.RemoteInput;
|
||||
|
||||
|
||||
|
||||
import android.support.v4.app.TaskStackBuilder;
|
||||
|
||||
import com.squareup.otto.Subscribe;
|
||||
|
||||
import info.nightscout.androidaps.Config;
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainActivity;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
|
@ -165,8 +159,8 @@ public class PersistentNotificationPlugin extends PluginBase {
|
|||
IobTotal basalIob = TreatmentsPlugin.getPlugin().getLastCalculationTempBasals().round();
|
||||
|
||||
|
||||
String line2 = MainApp.gs(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U " + MainApp.gs(R.string.cob)+": " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "PersistentNotificationPlugin").generateCOBString();
|
||||
String line2_aa = MainApp.gs(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U. " + MainApp.gs(R.string.cob)+": " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "PersistentNotificationPlugin").generateCOBString() + ".";
|
||||
String line2 = MainApp.gs(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U " + MainApp.gs(R.string.cob) + ": " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "PersistentNotificationPlugin").generateCOBString();
|
||||
String line2_aa = MainApp.gs(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U. " + MainApp.gs(R.string.cob) + ": " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "PersistentNotificationPlugin").generateCOBString() + ".";
|
||||
|
||||
|
||||
String line3 = DecimalFormatter.to2Decimal(ConfigBuilderPlugin.getPlugin().getActivePump().getBaseBasalRate()) + " U/h";
|
||||
|
@ -210,7 +204,7 @@ public class PersistentNotificationPlugin extends PluginBase {
|
|||
.setLatestTimestamp(System.currentTimeMillis())
|
||||
.setReadPendingIntent(msgReadPendingIntent)
|
||||
.setReplyAction(msgReplyPendingIntent, remoteInput);
|
||||
|
||||
|
||||
/// Add dot to produce a "more natural sounding result"
|
||||
unreadConversationBuilder.addMessage(line3_aa);
|
||||
/// End Android Auto
|
||||
|
@ -220,15 +214,9 @@ public class PersistentNotificationPlugin extends PluginBase {
|
|||
builder.setOngoing(true);
|
||||
builder.setOnlyAlertOnce(true);
|
||||
builder.setCategory(NotificationCompat.CATEGORY_STATUS);
|
||||
if (Config.NSCLIENT){
|
||||
builder.setSmallIcon(R.drawable.nsclient_smallicon);
|
||||
Bitmap largeIcon = BitmapFactory.decodeResource(ctx.getResources(), R.mipmap.yellowowl);
|
||||
builder.setLargeIcon(largeIcon);
|
||||
} else {
|
||||
builder.setSmallIcon(R.drawable.ic_notification);
|
||||
Bitmap largeIcon = BitmapFactory.decodeResource(ctx.getResources(), R.mipmap.blueowl);
|
||||
builder.setLargeIcon(largeIcon);
|
||||
}
|
||||
builder.setSmallIcon(MainApp.getNotificationIcon());
|
||||
Bitmap largeIcon = BitmapFactory.decodeResource(ctx.getResources(), MainApp.getIcon());
|
||||
builder.setLargeIcon(largeIcon);
|
||||
builder.setContentTitle(line1);
|
||||
builder.setContentText(line2);
|
||||
builder.setSubText(line3);
|
||||
|
|
Before Width: | Height: | Size: 1,001 B After Width: | Height: | Size: 1,001 B |
Before Width: | Height: | Size: 968 B After Width: | Height: | Size: 968 B |
BIN
app/src/main/res/drawable-hdpi/ic_notif_pumpcontrol.png
Normal file
After Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 663 B After Width: | Height: | Size: 663 B |
Before Width: | Height: | Size: 571 B After Width: | Height: | Size: 571 B |
BIN
app/src/main/res/drawable-mdpi/ic_notif_pumpcontrol.png
Normal file
After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_notif_pumpcontrol.png
Normal file
After Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_notif_pumpcontrol.png
Normal file
After Width: | Height: | Size: 511 B |
Before Width: | Height: | Size: 1,001 B After Width: | Height: | Size: 1,001 B |
BIN
app/src/main/res/drawable/ic_notif_pumpcontrol.png
Normal file
After Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 5.2 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_pumpcontrol.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_pumpcontrol.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 7.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_pumpcontrol.png
Normal file
After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 7 KiB After Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_pumpcontrol.png
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 18 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_pumpcontrol.png
Normal file
After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |