Qt5 Android application as Service

1,454 views
Skip to first unread message

willia...@gmail.com

unread,
Feb 9, 2015, 4:04:50 AM2/9/15
to andro...@googlegroups.com
Hello , i am new to the group and i have a very strange question. Is it possible to create a Qt5 Android application that can also work in the background and still give up notifications ? I have only seen the example that shows a string notification but, not one that actually can work without the QML User Interface. Is there a way to actually make this happen ?

Christophe M

unread,
Feb 10, 2015, 10:00:47 AM2/10/15
to andro...@googlegroups.com
Look at this : https://bugreports.qt.io/browse/QTBUG-37221

I have actually an android Qt service always connected to a server that can use native notification and act as a communication proxy between apps and server using this code, so yes it's possible.
(can't share it as it is, sorry, but I can give you some piece of code for implementing the java part and sending notification from Qt to java)

2015-02-09 10:04 GMT+01:00 <willia...@gmail.com>:
Hello , i am new to the group and i have a very strange question. Is it possible to create a Qt5 Android application that can also work in the background and still give up notifications ? I have only seen the example that shows a string notification but, not one that actually can work without the QML User Interface. Is there a way to actually make this happen ?

--
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.

William Kibira

unread,
Feb 10, 2015, 10:07:46 AM2/10/15
to andro...@googlegroups.com
Ow thank you , i would be grateful if you gave me the Java side , i have a messaging application i am planning to build and i wanted to get a non Visual element that can be used for Notification sending for android.

--
You received this message because you are subscribed to a topic in the Google Groups "android-qt" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-qt/8QJpPzSWcvs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-qt+...@googlegroups.com.

Christophe M

unread,
Feb 10, 2015, 10:26:32 AM2/10/15
to andro...@googlegroups.com
Ok, just try the code from  https://github.com/think-free/qt-android-helper before.
I hope that tomorrow I'll have the time to clean the java part (and the Qt calling code) of our service to give it to you but you'll have to setup a project with the above code before ... (The ideal would be to update the above code with the new java code but I don't have the time :/ )

William Kibira

unread,
Feb 15, 2015, 9:24:11 AM2/15/15
to andro...@googlegroups.com
Thank you , at least i know that it is possible to do this . If a Service can be created , then i can make a piece of code that can run and update the service as i wish.

Christophe M

unread,
Feb 17, 2015, 6:31:18 AM2/17/15
to andro...@googlegroups.com
Hi, 
Did you manage to use the code ?
Do need the code for notifications ?

Christophe

William Kibira

unread,
Feb 17, 2015, 8:21:37 AM2/17/15
to andro...@googlegroups.com

Haven't gotten to that yet but, just doing a feasibility of the software i wish to build

Talal Butt

unread,
Dec 1, 2015, 8:07:20 AM12/1/15
to android-qt
Hi Christopher,

I have tried to use your QtService code with your https://github.com/think-free/qt-android-helper. However, I am getting following error while using your example:

/home/talal/qt-projects/QtAndroidHelper/example/build-MyTestService-Desktop-Debug/android-build/src/org/qtproject/qt5/android/addons/qtserviceapp/QtService.java:252: error: cannot find symbol

note.setLatestEventInfo(this, m_lib_name ,

^

symbol: method setLatestEventInfo(QtService,String,String,PendingIntent)

location: variable note of type Notification


I am trying to achieve an architecture in which my Qt Application runs in the background and another Android Service runs and feed different information to the Qt Application using JNI. Please guide me in this regard.

Best regards,
Talal



On Tuesday, 17 February 2015 11:31:18 UTC, think-free wrote:
Hi, 
Did you manage to use the code ?
Do need the code for notifications ?

Christophe
2015-02-15 15:24 GMT+01:00 William Kibira <willia...@gmail.com>:
Thank you , at least i know that it is possible to do this . If a Service can be created , then i can make a piece of code that can run and update the service as i wish.
On Tue, Feb 10, 2015 at 6:26 PM, Christophe M <meume...@gmail.com> wrote:
Ok, just try the code from  https://github.com/think-free/qt-android-helper before.
I hope that tomorrow I'll have the time to clean the java part (and the Qt calling code) of our service to give it to you but you'll have to setup a project with the above code before ... (The ideal would be to update the above code with the new java code but I don't have the time :/ )
2015-02-10 16:07 GMT+01:00 William Kibira <willia...@gmail.com>:
Ow thank you , i would be grateful if you gave me the Java side , i have a messaging application i am planning to build and i wanted to get a non Visual element that can be used for Notification sending for android.
On Tue, Feb 10, 2015 at 6:00 PM, Christophe M <meume...@gmail.com> wrote:
Look at this : https://bugreports.qt.io/browse/QTBUG-37221

I have actually an android Qt service always connected to a server that can use native notification and act as a communication proxy between apps and server using this code, so yes it's possible.
(can't share it as it is, sorry, but I can give you some piece of code for implementing the java part and sending notification from Qt to java)
2015-02-09 10:04 GMT+01:00 <willia...@gmail.com>:
Hello , i am new to the group and i have a very strange question. Is it possible to create a Qt5 Android application that can also work in the background and still give up notifications ? I have only seen the example that shows a string notification but, not one that actually can work without the QML User Interface. Is there a way to actually make this happen ?

--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "android-qt" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-qt/8QJpPzSWcvs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-qt+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "android-qt" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-qt/8QJpPzSWcvs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-qt+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages