Open sreenumalae opened 4 years ago
We have the same problem. Broadcast messages are not delivered.
Dear @contributors, is there really no solution to this problem?
Bump. Having the same issue.
What I've done so far:
VPS/SERVER SIDE: Installed Python: sudo apt-get install python3-pip build-essential git pip3 install pipenv --user
Installed and started MongoDB: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/ sudo systemctl unmask mongod sudo service mongod start
Downloaded and ran Airnotifier: cd ~ git clone -b master git://github.com/airnotifier/airnotifier.git airnotifier cd airnotifier pipenv install --deploy mv config.py-sample config.py sudo python3 -m pipenv run ./app.py
Created an App: orgID = 0 Name of app = CHClassroom Entered FCM Project ID and Json Key, APN and WNS empty.
Moodle Integration: Airnotifier URL: https://[my_airnotifier_ip_addr] Airnotifier Port: 8801 Mobile app name: com.ch.moodlemobile Airnotifier app name: CHClassroom Airnotifier Access Key: generated an access key with all permissions given, and pasted it into the airnotifier access key field in Moodle.
APP SIDE: Building the App: Downloaded https://github.com/moodlehq/moodleapp/tree/integration Changed the App name Changed the App id Changed the siteurl Build using -> ionic cordova build android Run using -> npm run dev:android App successfully executed and I'm able to log in
Testing Airnotifier: Went to broadcast, and entered a message Clicked sent No notifications, no logs, no tokens.
Only thing that worked was to directly send broadcasts through Cloud Messaging from Firebase.
Any help is appreciated.
Edit: Turns out there was a https parameter that was commented in config.py, as I am using https I'm thinking that's the reason why it's not sending anything. I'll try and update once I set the https parameters.
Still having the same issue, even though my website isn't using https.
I think I had the same issue and this is what I have found:
curl -XPOST -H 'Accept: application/json' -H 'X-AN-APP-NAME: apptest' -H 'X-AN-APP-KEY: My App key from AirNotifier' -H "Content-type: application/json" -d '{
"device": "fcm",
"token": "The registration token from the test page",
"alert": "Hello from AirNotifier",
"sound": "Submarine.aiff",
"badge": 1
}' 'http://localhost:8801/api/v2/push'
This worked.
8. Then I check in AirNotifier and saw that the token I used was now added to the list of tokens for the app.
9. Then I tried the broadcast again, and this time it worked.
So I think you can only broadcast to known devices, so tokens that is already known to AirNotifier.
Hello Everyone !!
I just hosted airnotifier (Version 3.X) in my azure virtual machine. And i'm trying send a broadcast message from airnotifier.
I created a app in Firebase and when i tried to send a notification using cloud message it works. It means my firebase and app are perfect
In airnotifier i created a app and i gave project id and json key in Firebase Cloud Messaging settings.
Then i tried to send a broadcast message and i didn't receive any.
Here is my JSON key { "type": "service_account", "project_id": "*", "private_key_id": "**", "private_key": "-----BEGIN PRIVATE KEY-----\n***\n-----END PRIVATE KEY-----\n", "client_email": "***@appspot.gserviceaccount.com", "client_id": "**", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/************%40appspot.gserviceaccount.com" }