Unsolved Android: QtService and NotificationListenerService
-
Currently,
QtService
extendsService
but I would like to subclassNotificationListenerService
.What is the best approach? I see two possible approaches and I would appreciate input on which path is preferred.
- Option 1: I started with the example on https://www.kdab.com/qt-android-create-android-service-using-qt/ and I modified the
org.qtproject.qt5.android.bindings.QtService
and let it inherit fromNotificationListenerService
instead ofService
. I couldn't get this to work (yet) but I'm also not sure whether this is conceptually OK and whether I should also change the onBind implementation to call eg theNotificationListenerService.onBind
etc - Option 2: create two services: one pure Java
NotificationListenerService
that sends messages (via a BroadcastReceiver I guess) to a QtService
- Option 1: I started with the example on https://www.kdab.com/qt-android-create-android-service-using-qt/ and I modified the