You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to ring the phone when I receive a notification in the background.
I have this as my handler that never gets called.
Future backGroundHandler(Map<String, dynamic> message) async {
print("onBackgroundMessage: $message");
await FlutterRingtonePlayer.play(
android: AndroidSounds.ringtone,
ios: IosSounds.glass,
looping: true, // Android only - API >= 28
volume: 1, // Android only - API >= 28
asAlarm: true, // Android only - all APIs
);
Future.value();
}
I have double-checked the I follow the steps in the Readme but surely I have missed something.
Please let me know which file you would need and I will share them. I need to get approval before sharing any file.
'''flutter doctor
Waiting for another flutter command to release the startup lock...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.2, on Microsoft Windows [Version 10.0.19041.572], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.50.1)
[√] Connected device (1 available)
! Doctor found issues in 1 category.'''
AndroidManifest.xml
Shell script for notification
DATA='{"notification": {"body": "Mike, Dr. Sami Abdul is waiting for you. Join now!"}, "priority": "high", "data": {"click_action": "FLUTTER_NOTIFICATION_CLICK","action_type":"SESSION_STARTED","payload":{"channel":"test","name":"Mike"}}, "to": "/topics/9"}'
curl https://fcm.googleapis.com/fcm/send -H "Content-Type:application/json" -X POST -d "$DATA" -H "Authorization: key=""
echo ""
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to ring the phone when I receive a notification in the background.
I have this as my handler that never gets called.
Future backGroundHandler(Map<String, dynamic> message) async {
print("onBackgroundMessage: $message");
await FlutterRingtonePlayer.play(
android: AndroidSounds.ringtone,
ios: IosSounds.glass,
looping: true, // Android only - API >= 28
volume: 1, // Android only - API >= 28
asAlarm: true, // Android only - all APIs
);
Future.value();
}
I have double-checked the I follow the steps in the Readme but surely I have missed something.
Please let me know which file you would need and I will share them. I need to get approval before sharing any file.
'''flutter doctor
Waiting for another flutter command to release the startup lock...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.2, on Microsoft Windows [Version 10.0.19041.572], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.50.1)
[√] Connected device (1 available)
! Doctor found issues in 1 category.'''
AndroidManifest.xml
Shell script for notification
DATA='{"notification": {"body": "Mike, Dr. Sami Abdul is waiting for you. Join now!"}, "priority": "high", "data": {"click_action": "FLUTTER_NOTIFICATION_CLICK","action_type":"SESSION_STARTED","payload":{"channel":"test","name":"Mike"}}, "to": "/topics/9"}'
curl https://fcm.googleapis.com/fcm/send -H "Content-Type:application/json" -X POST -d "$DATA" -H "Authorization: key=""
echo ""
Beta Was this translation helpful? Give feedback.
All reactions