Back to sdk level 19 (#173)
parent
81c2f657bd
commit
95dc67c98d
|
@ -10,7 +10,7 @@ android {
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "nodomain.freeyourgadget.gadgetbridge"
|
applicationId "nodomain.freeyourgadget.gadgetbridge"
|
||||||
minSdkVersion 18
|
minSdkVersion 19
|
||||||
targetSdkVersion 23
|
targetSdkVersion 23
|
||||||
versionCode 32
|
versionCode 32
|
||||||
versionName "0.6.6"
|
versionName "0.6.6"
|
||||||
|
|
|
@ -218,14 +218,11 @@ public class NotificationListener extends NotificationListenerService {
|
||||||
|
|
||||||
LOG.info("Processing notification from source " + source);
|
LOG.info("Processing notification from source " + source);
|
||||||
|
|
||||||
if (GBApplication.isRunningOnKitkatOrLater()) {
|
|
||||||
dissectNotificationTo(notification, notificationSpec);
|
dissectNotificationTo(notification, notificationSpec);
|
||||||
}
|
|
||||||
notificationSpec.id = (int) sbn.getPostTime(); //FIMXE: a truly unique id would be better
|
notificationSpec.id = (int) sbn.getPostTime(); //FIMXE: a truly unique id would be better
|
||||||
GBApplication.deviceService().onNotification(notificationSpec);
|
GBApplication.deviceService().onNotification(notificationSpec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.KITKAT)
|
|
||||||
private void dissectNotificationTo(Notification notification, NotificationSpec notificationSpec) {
|
private void dissectNotificationTo(Notification notification, NotificationSpec notificationSpec) {
|
||||||
Bundle extras = notification.extras;
|
Bundle extras = notification.extras;
|
||||||
CharSequence title = extras.getCharSequence(Notification.EXTRA_TITLE);
|
CharSequence title = extras.getCharSequence(Notification.EXTRA_TITLE);
|
||||||
|
|
Loading…
Reference in New Issue