I tried all the versions of Airnotifier still not receiving notification, in version 3 I receive notifications but no vibration or sound

I tried all the versions of Airnotifier still not receiving notification, in version 3 I receive notifications but no vibration or sound

by Ardian Deari -
Number of replies: 2

Hi,

Thanks to the instructions and the open-source code offered by Moodle staff, I have come to the point to build successfully android version of my customized Moodle Mobile App. 

I edited:

google-services.json (downloaded on android apps from https://console.firebase.google.com/u/0/project/english-for-life-moodle-notif/settings/general/)
config.xml
ionic.config.json
config.json
AndroidManifest.xml (from android studio in the app > manifests folder)

I build it with:

sudo cordova platform add android

then I added 

cordova platform add android@7.1.2

cordova plugin add cordova-android-support-gradle-release@2.0.1

Finally, using Android Studio, I signed the app and build it successfully. 

Project Structure:
Android Gradle Plugin Version 3.0.1
Gradle Version 4.5

####

1. Using Airnotifier 3 > I installed it successfully on one of the server ip-s. It runs perfectly well but the problem is:

-I can't sent broadcast notifications even though I have the token for fcm... (when I write from moodle to the user whose app is installed on the phone) the user only receives notifications without sound or vibration, when the app is open it crashes!

Airnotifier log from a notification example:

payload: {"device":"Android-fcm","token":"cxbqR-4paO0:APA91bF8_IBEuBNku1qwnOze-D6f0Co4wodmQ97wPxp6lVnbssm2q1VsrafJDJSEllVzybm-BqpIsKw-kiWLHQ9rljIqJPo6BXmWDM_P6oZ9eUlzfZ64ODXC1Sh6vMREBKdxjYyd11Xs","extra":{"courseid":1,"modulename":null,"component":"moodle","name":"instantmessage","convid":507,"conversationtype":"1","subject":"New message from Ardian Deari","fullmessage":"dwdw\n\n---------------------------------------------------------------------\nThis is a copy of a message sent to you at \"English For Life LLC\". Go to https:\/\/englishforlife.mk\/elearn\/message\/index.php?id=2 to reply.","fullmessageformat":0,"fullmessagehtml":"","smallmessage":"dwdw","notification":0,"contexturl":null,"contexturlname":null,"replyto":null,"replytoname":null,"savedmessageid":29924,"attachment":null,"attachname":null,"timecreated":1590585678,"fullmessagetrust":null,"customdata":"{\"actionbuttons\":{\"send\":\"Send\"},\"placeholders\":{\"send\":\"Write a message...\"},\"notificationiconurl\":\"https:\\\/\\\/englishforlife.mk\\\/elearn\\\/pluginfile.php\\\/5\\\/user\\\/icon\\\/boost\\\/f1?rev=31709\",\"courseid\":1,\"tokenpluginfile\":\"f4e9be774c091e6c4485888a4920a7e5\"}","userfromid":"2","userfromfullname":"Ardian Deari","usertoid":"459","processor":"moodle","site":"632e3f89ecbef809a6885266fe0919c0","date":1590585678,"sitefullname":"English For Life LLC","siteshortname":"English For Life LLC","wwwroot":"https:\/\/englishforlife.mk\/elearn"}}, access key: b503001bda1712153251dcb5f2adea39

2. Using Airnotifier version 1 (moodle branch) it doesn't work 

Could you please tell me or do you have any idea why when the app is open it crashes and why can't I send broadcast notifications from airnotifier?

PS: I can send notifications from cloud messaging (from here: https://console.firebase.google.com/u/0/project/english-for-life-moodle-notif/notification )

Average of ratings: -
In reply to Ardian Deari

Re: I tried all the versions of Airnotifier still not receiving notification, in version 3 I receive notifications but no vibration or sound

by Aleksandr Kuldaev -
Ardian, sorry that it’s not your problem, can you tell me how you managed to solve the problem "ANDROID_SUPPORT_V4_VERSION"?
I tried a lot of things and came to a standstill. In one of the topics you wrote that you faced the same problem, I will be grateful if you help.
In reply to Aleksandr Kuldaev

Re: I tried all the versions of Airnotifier still not receiving notification, in version 3 I receive notifications but no vibration or sound

by Ardian Deari -

That problem as I can remember was caused because I tried to build my app using phonegap. I stopped using phonegap, try cordova instead.  I think it will help you. 

Anyone here please help me with the question above sad