Merge pull request #1239 from MilosKozak/logo3

NSClient -> owl
This commit is contained in:
AdrianLxM 2018-07-22 01:47:04 +02:00 committed by GitHub
commit 6619e4514a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 4 deletions

View file

@ -21,6 +21,7 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import info.nightscout.androidaps.Config;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.Services.AlarmSoundService;
@ -123,10 +124,15 @@ public class NotificationStore {
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 || Config.G5UPLOADER){
largeIcon = BitmapFactory.decodeResource(MainApp.instance().getResources(), R.mipmap.yellowowl);
smallIcon = R.drawable.nsclient_smallicon;
}
Uri sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(context, CHANNEL_ID)
.setSmallIcon(R.drawable.ic_notification)
.setSmallIcon(smallIcon)
.setLargeIcon(largeIcon)
.setContentText(n.text)
.setPriority(NotificationCompat.PRIORITY_MAX)

View file

@ -15,6 +15,7 @@ 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;
@ -153,9 +154,15 @@ public class PersistentNotificationPlugin extends PluginBase {
builder.setOngoing(true);
builder.setOnlyAlertOnce(true);
builder.setCategory(NotificationCompat.CATEGORY_STATUS);
builder.setSmallIcon(R.drawable.ic_notification);
Bitmap largeIcon = BitmapFactory.decodeResource(ctx.getResources(), R.mipmap.blueowl);
builder.setLargeIcon(largeIcon);
if (Config.NSCLIENT || Config.G5UPLOADER){
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.setContentTitle(line1);
builder.setContentText(line2);
builder.setSubText(line3);

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

BIN
logo/nsclient/white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB