GCM push notifications android
-
Hello, I am developing an android application and I would like to implement GCM push notifications. Any suggestions how to do it?
-
Hi and welcome to devnet,
Currently Qt doesn't have anything specific that so you would need to write some native code for that. However you might be interested by V-Play and it's GCM plugin.
-
Hi and welcome to devnet,
Currently Qt doesn't have anything specific that so you would need to write some native code for that. However you might be interested by V-Play and it's GCM plugin.
@SGaist I can imagine that there are some devs out there already done this work. I'm really missing a central page at Qt where all such native integrations with Android or iOS can be mentioned. would be better to do work only one time and would make it easier for new devs using Qt for mobile. @tero-kojo we already discussed this some time ago. any news ?
-
@ekkescorner sur there is, but usually specific to their own applications except in the case of V-Play that provides the support through their framework.
@Schluchti In the categories of stuff that can help:
- https://inqlude.org for Qt related libraries
- qt-pods project
-
@ekkescorner sur there is, but usually specific to their own applications except in the case of V-Play that provides the support through their framework.
@Schluchti In the categories of stuff that can help:
- https://inqlude.org for Qt related libraries
- qt-pods project
@SGaist V-Play is not a solution for me - I'm using Qt because it's Open Source and I want to use Open Source for any plugins / extensions / libraries. V-Play is a great SDK, but V-Play PlugIns are not OSS
Mobile Apps are special. Developing mobile Apps with Qt there are many common things missed: PushServices, Access to Contacts, Phone, Android Intents, iOS App Extensions, Battery state, SignaturePad, ... all those stuff you usually need, but not found from Qt Classes.
And you need it for Android and iOS and probably W10. All mobile devs together could develop a community market place. Not for Qt in general - for Qt mobile Apps. Current solution is that devs have to learn HowTo create the native Android / iOS stuff and HowTo call this from Qt. I'm sure there are many devs doing the same again and again.Would be cool to have a common place where devs can provide solutions and take a look at other devs solutions HowTo handle such kind of stuff for Android and iOS.
take a look at PhoneGab / Cordova Plugins: http://www.plugreg.com/plugins and http://www.plugreg.com/plugins or per ex. a SignaturePad for ReactNative: https://github.com/RepairShopr/react-native-signature-capture I found from https://react.parts/native. Try to find a Signature Pad for QQC2 apps running on Android and iOS.
there was one Qt Blog about Intents with Qt for Android, part 1 and nothing else. also no info HowTo solve similar use-case für iOS.
There are also some great blogs from KDAB.
Now with QQC2 we have the UI Controls we need for mobile, but I'm really missing a central place from Qt from where you can find all those important extensions/libraries for mobile app developers.... seems I'm running out of scope from this thread ;-)
-
@ekkescorner sur there is, but usually specific to their own applications except in the case of V-Play that provides the support through their framework.
@Schluchti In the categories of stuff that can help:
- https://inqlude.org for Qt related libraries
- qt-pods project
@SGaist Many thanks for the links! Didn't know that such great projects exist :)
I already implemented push notifiction for iOs and android. As it took me some time to implement it, I am thinking about writing it down to save other Qt developers time when implementing that stuff.
-
@SGaist Many thanks for the links! Didn't know that such great projects exist :)
I already implemented push notifiction for iOs and android. As it took me some time to implement it, I am thinking about writing it down to save other Qt developers time when implementing that stuff.
@Schluchti said in GCM push notifications android:
@SGaist Many thanks for the links! Didn't know that such great projects exist :)
I already implemented push notifiction for iOs and android. As it took me some time to implement it, I am thinking about writing it down to save other Qt developers time when implementing that stuff.
great idea ;-)
best would be a small example project at gitHub together with blogpost -
Hi,
As already mentioned by @SGaist, V-Play provides support for Push Notifications via GCM and OneSignal for Android and iOS. Also, local notifications are possible with V-Play.
It's really convenient to add, check out this code sample for OneSignal:
import QtQuick 2.1 import VPlayPlugins 1.0 OneSignal { id: onesignal appId: "<ONESIGNAL-APP-ID>" onNotificationReceived: { console.debug("Received notification with message:", message) } }
That's all the code you'll need!
As pointed out by @ekkescorner, you will need a V-Play Indie- or Enterprise license starting from $49 / month to use these features.
By the way, support for Firebase is currently in the pipeline ;)
Cheers,
Lorenz -
@Schluchti said in GCM push notifications android:
@SGaist Many thanks for the links! Didn't know that such great projects exist :)
I already implemented push notifiction for iOs and android. As it took me some time to implement it, I am thinking about writing it down to save other Qt developers time when implementing that stuff.
great idea ;-)
best would be a small example project at gitHub together with blogpost@ekkescorner Yeah, that's what I was thinking about ;-). Hope to get the first article done by the end of this week. :)
-
Thank you for answers guys! I knew before about V-Play, but I'm not interested in using it since it is not free. @Schluchti it would be great if you don't mind sharing your code!
-
First part is now available. https://gympulsr.com/blog/qt/2017/03/08/push-notification-ios-qt.html
I hope it covers everything. -
First part is now available. https://gympulsr.com/blog/qt/2017/03/08/push-notification-ios-qt.html
I hope it covers everything.@Schluchti great article - thx providing your experiences and sample app.
-
Second part is now done: https://gympulsr.com/blog/qt/2017/03/26/push-notification-android-qt.html
Hope I didn't miss anything (implemented the notifications a while ago and now tried to remember as much as I could ;-)). If something is missing, please let me know.
-
Second part is now done: https://gympulsr.com/blog/qt/2017/03/26/push-notification-android-qt.html
Hope I didn't miss anything (implemented the notifications a while ago and now tried to remember as much as I could ;-)). If something is missing, please let me know.
@Schluchti cool - blog look great :)
probably next 2 weeks I'll test it.
just still optimizing all my apps for Qt 5.8
-
Second part is now done: https://gympulsr.com/blog/qt/2017/03/26/push-notification-android-qt.html
Hope I didn't miss anything (implemented the notifications a while ago and now tried to remember as much as I could ;-)). If something is missing, please let me know.
-
@Atr0n thanks! :)
You are refering to the android blog post, right? Have you enabled
Gradle
in the project settings? I haven't seen this errorin particular, but some similar packaging errors when usingAnt
. In my experience it sometimes also helps to delete the whole build folder to enforce a clean rebuild.edit: are you sure that error is the acutal reason why it failed?
-
@Atr0n thanks! :)
You are refering to the android blog post, right? Have you enabled
Gradle
in the project settings? I haven't seen this errorin particular, but some similar packaging errors when usingAnt
. In my experience it sometimes also helps to delete the whole build folder to enforce a clean rebuild.edit: are you sure that error is the acutal reason why it failed?
@Schluchti said in GCM push notifications android:
@Atr0n thanks! :)
You are refering to the android blog post, right? Have you enabled
Gradle
in the project settings? I haven't seen this errorin particular, but some similar packaging errors when usingAnt
. In my experience it sometimes also helps to delete the whole build folder to enforce a clean rebuild.edit: are you sure that error is the acutal reason why it failed?
Hi @Schluchti,
I deleted my last post because after some investigations, I realiced Qt creator has a bug which makes impossible to use the last gradle version (or 3.3 in my case). QT-BUG
I will give it a try once qt creator 4.3 is out.
Anyway, thanks again for your blog. I hope you keep doing these amazing series.
Regards, -
@Schluchti Finally I make it work. The python scripts need to be updated to make it works with python3 since apns2 it's only compatible with it at version 0.52. But everything works like a charm..
Thank you a lot.
PD: I can pull the python script modification to github if you want. -
@Schluchti Finally I make it work. The python scripts need to be updated to make it works with python3 since apns2 it's only compatible with it at version 0.52. But everything works like a charm..
Thank you a lot.
PD: I can pull the python script modification to github if you want.