We confirm a compatibility issue which might threaten the robustness of your app and give a detailed suggestion for you.
In ''it.feio.android.omninotes.services.NotificationListener", you invoke the API "<android.service.notification.StatusBarNotification: java.lang.String getPackageName()>" and "<android.service.notification.StatusBarNotification: int getId()>" in "onNotificationRemoved" method as shown in following. But actually, those APIs are introduced after API level 18(
https://developer.android.google.cn/reference/android/service/notification/StatusBarNotification?hl=en#getPackageName()
).
@Override
public void onNotificationRemoved(StatusBarNotification sbn) {
if (getPackageName().equals(sbn.getPackageName())) {
EventBus.getDefault().post(new NotificationRemovedEvent(sbn));
LogDelegate.d("Notification removed for note: " + sbn.getId());
}
}
So when the app try to invoke this API on devices before API level 18, your app will run with an unpredictable results. So we suggest you add an "if(SDK_INT >= 18)" to fix this potential issue.
We confirm a compatibility issue which might threaten the robustness of your app and give a detailed suggestion for you.
In ''it.feio.android.omninotes.services.NotificationListener", you invoke the API "<android.service.notification.StatusBarNotification: java.lang.String getPackageName()>" and "<android.service.notification.StatusBarNotification: int getId()>" in "onNotificationRemoved" method as shown in following. But actually, those APIs are introduced after API level 18( https://developer.android.google.cn/reference/android/service/notification/StatusBarNotification?hl=en#getPackageName() ).
So when the app try to invoke this API on devices before API level 18, your app will run with an unpredictable results. So we suggest you add an "if(SDK_INT >= 18)" to fix this potential issue.
Android device