Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Start third-party Android Service
Forum Updated to NodeBB v4.3 + New Features

Start third-party Android Service

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 415 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ibcsystems
    wrote on last edited by
    #1

    I'm struggling to get a service started that is not part of my application.
    All the examples I've seen are for a Qt service, but I like to start a java service from my Qt creator app.
    In java you can use something like this:

    Intent serviceIntent = new Intent();
    serviceIntent.setAction("com.sample.service");
    startService(serviceIntent);

    What's the equivalent in Qt Creator C++?

    btw, the service is exported and enabled in the manifest

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      There's no Qt Creator C++, Qt Creator is just an IDE.

      You may want to take a look at the dedicated Qt JNI classes to call Java methods.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • I Offline
        I Offline
        ibcsystems
        wrote on last edited by ibcsystems
        #3

        I know it's an IDE but I'm programming in C++ and there does not seem to be an easy way of starting an external service; documentation and examples of JNI are not very comprehensive.
        I would have thought someone has already done this and I'm not shooting for the moon here.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          There's blog post about Android intents with Qt

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved