Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-58471

Android QtService unable to stop service

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9.0 RC
    • 5.8.0
    • Extras: Android
    • None
    • * Android 5.1.0
      * Android API-Level 25

    Description

      If using an activity, one can stop the application by calling qApp->quit();. However, if using a service, this will not properly work, and crash the service instead!

      I tried using QtAndroid::androidService().callMethod<void>("stopSelf"); and it does indeed stop the service, but not the Qt thread, as it seems. Because if I try to start the service again, it fails with WARNING: QApplication was not created in the main() thread and tons of "already registered" warnings, and does not start.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            taipan BogDan Vatra
            SkyCoder Felix Barz
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes