Android: QtService and NotificationListenerService

  • Currently, QtService extends Service but I would like to subclass NotificationListenerService.

    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 and I modified the and let it inherit from NotificationListenerService instead of Service. 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 the NotificationListenerService.onBind etc
    • Option 2: create two services: one pure Java NotificationListenerService that sends messages (via a BroadcastReceiver I guess) to a QtService

Log in to reply