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. Porting Qt Application (desktop) to Android App
Forum Updated to NodeBB v4.3 + New Features

Porting Qt Application (desktop) to Android App

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 1.3k Views
  • 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.
  • Chandras002C Offline
    Chandras002C Offline
    Chandras002
    wrote on last edited by
    #1

    Dear Qt Community,

    I am trying to port a Qt Desktop application to Android. I have set up the environment on Windows with latest Qt 5.12 and Qt Creator 4.8.1. On the Desktop GUI application purely Qt C++ with QTcpSocket. The GUI application has launch button - which will launch a executable (Windows .exe) file with embedded in resource. (when user click the button)

    My team is porting this application to Android 6.0 as proof of concept. Similar in Android, when a button pressed, a Test android service should be launched and keep running. There is 2 question, Please bear with if miss any basic concept here
    As new to Android development /porting, i am clueless

    1. Lets assume, Test android service which ping to Google /Web server in the background when launched (or any simple task)
    2. As said in the beginning , it is a proof of concept, When button clicked from ported Android app - it should launch the Test android service and it should run on the background service.
      No need to communicate back to main app.

    What is correct and easy way. Is the Test android service can be stand-alone java code/application , then i call that from Qt Android (ported) app. (Unlike Desktop can not embedded in resource) or any better way... just for Proof of concept.

    Am i missing any basic points? Any suggestion useful.

    Cheers!
    Chandra

    J.HilkJ 1 Reply Last reply
    0
    • Chandras002C Chandras002

      Dear Qt Community,

      I am trying to port a Qt Desktop application to Android. I have set up the environment on Windows with latest Qt 5.12 and Qt Creator 4.8.1. On the Desktop GUI application purely Qt C++ with QTcpSocket. The GUI application has launch button - which will launch a executable (Windows .exe) file with embedded in resource. (when user click the button)

      My team is porting this application to Android 6.0 as proof of concept. Similar in Android, when a button pressed, a Test android service should be launched and keep running. There is 2 question, Please bear with if miss any basic concept here
      As new to Android development /porting, i am clueless

      1. Lets assume, Test android service which ping to Google /Web server in the background when launched (or any simple task)
      2. As said in the beginning , it is a proof of concept, When button clicked from ported Android app - it should launch the Test android service and it should run on the background service.
        No need to communicate back to main app.

      What is correct and easy way. Is the Test android service can be stand-alone java code/application , then i call that from Qt Android (ported) app. (Unlike Desktop can not embedded in resource) or any better way... just for Proof of concept.

      Am i missing any basic points? Any suggestion useful.

      Cheers!
      Chandra

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      hi,@Chandras002

      IIRC then Qt supports since 5.7 android services, and it's gotten even easier since the introduction of QRemoteObjects.

      I'vent yet done a project myself with that, but I would recommend this block post by KDAB that is rather good.

      https://www.kdab.com/qt-android-create-android-service-using-qt/

      It should contain everything you'll need.

      And you should be able to pack everything into one single apk file, if I understand the concept correctly.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      2
      • Chandras002C Offline
        Chandras002C Offline
        Chandras002
        wrote on last edited by
        #3

        Hi Hilk,

        I have seen that link earlier but did not go through in details. Seems that comments for that also very useful. Thanks.

        1 Reply Last reply
        0

        • Login

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