Android service

460 views
Skip to first unread message

christophe

unread,
Feb 10, 2014, 10:00:42 AM2/10/14
to andro...@googlegroups.com
Hey,

I want to devellop an android service with native Qt code.
I've tried to build a "console application" with QtCreator and run it on android but it failed to run (and it wasn't a service).
I hope it will be possible to create such an application (android service) in the future as easy as it is to create a Qt based activity. 

Anything planned ?
Anybody have already done it ?

Thanks,

Christophe

christophe

unread,
Mar 5, 2014, 7:49:20 AM3/5/14
to andro...@googlegroups.com
For thoses interested ...

I filled a bug for this and provided a quick and dirty implementation of an android service using Qt, it's really hacky for now but it works ...
More details in the bug report.


Christophe

Derek Cole

unread,
Mar 25, 2014, 2:39:48 PM3/25/14
to andro...@googlegroups.com
Hello,

I am interested in this work you have done. I went to the bug report and I saw your overview of what you did to get a "hack" to work. I would like to try to do that as well, for a Network application, as you said. Could you elaborate on the steps to make this happen?

I am almost exclusively a Qt developer, and not an android developer, so I'd love to see a sample of how to make a simple Qt application run in the background on android, explained.

Christophe M

unread,
Mar 25, 2014, 2:55:27 PM3/25/14
to andro...@googlegroups.com

OK tomorrow I'll send you an updated version of the code that I use and some explanation

--
You received this message because you are subscribed to the Google Groups "android-qt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-qt+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

christophe

unread,
Mar 27, 2014, 12:02:30 PM3/27/14
to andro...@googlegroups.com
Hi Derek,

I've created a git with my code : https://github.com/think-free/qt-android-helper.git

You have to copy the android folder to your project and run setup.sh
But look at the readme and the example for more explanation.

Remember it's hacky but it works for me. I hope it can be included in a more standard way into Qt in a near future.

Hope it help.

Christophe

Paul-Henri FERME

unread,
Apr 11, 2014, 5:53:07 PM4/11/14
to andro...@googlegroups.com
Hi Christophe
I download tour and follow tour instruction but th part do note build properly. Did you used qtcreator 3.0 anti qt 5.2 to run it?
Phf

christophe

unread,
Apr 14, 2014, 4:10:28 AM4/14/14
to andro...@googlegroups.com, andro...@googlegroups.com
Hi,
Sorry I'm a little bit busy theses days, I'll try to look at it quickly.
I'm using 5.2.1 bundle on ubuntu.

Christophe


El vie, 11 de abr 2014 a las 11:53 , Paul-Henri FERME <paul...@gmail.com> escribió:
Hi Christophe I download tour and follow tour instruction but th part do note build properly. Did you used qtcreator 3.0 anti qt 5.2 to run it? Phf

Paul-Henri FERME

unread,
Apr 14, 2014, 1:42:35 PM4/14/14
to andro...@googlegroups.com
thanks!
I post more detail information and an error log in a separate thread:
I cannot understand what is wrong with the java part....
PHF

christophe

unread,
Apr 15, 2014, 9:41:41 AM4/15/14
to andro...@googlegroups.com
Hi,
I've tried to create a project from scratch and it's working fine
The only difference I have is that I'm building for android 4.4 but it shouldn't be a problem ... I've tried with Qt 5.2.1 and 5.3 (there is a problem with androiddeployqt use the one from 5.2 if you want to try) with ndk android-ndk-r9b.


I have : 

 [checkenv] Android SDK Tools Revision 22.3.0
 [checkenv] Installed at /opt/Android/adt-bundle-linux-x86-20131030/sdk

-setup:
     [echo] Project Name: QtApp
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.0
     [echo] Resolving Build Target for QtApp...
[gettarget] Project Target: Android 4.4
[gettarget] API level: 19
     [echo] ----------

Rajesh Mallah

unread,
Jul 21, 2014, 11:38:59 PM7/21/14
to andro...@googlegroups.com

Dear Think-Free,

please suggest in the example

https://github.com/think-free/qt-android-helper

where should we put the working code of the service.
should it be in main.cpp or some java file?

Eg we would want to have a background service that periodically
polls a web-service and create a notification when something
worth notifying happens. We are able to send notification to android
using JNI object integration of androidextras.

regds
rajesh kumar mallah.
Reply all
Reply to author
Forward
0 new messages