-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Does the SDK support push notification by default? #200
Comments
Hey Tran
We don't support Push due to the possible multiple options for Push. I e.
There are many different Push suppliers so therefore might need multiple
SDK implementations
…On Mon, Jun 17, 2019, 21:59 Tran Huy Phuc ***@***.***> wrote:
I used parse SDK for Android and iOS before. The SDK saves the device
tokens automatically (and silently) when parse is initialized on client
app. Do we support this yet?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#200>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB4CPXRYGTNKLK5I42N7VXDP273MXANCNFSM4HY2G4WA>
.
|
Hi @thphuc |
The same here |
I'm using the following code with Firebase Messaging e flutterLocalNotifications to show in the foreground @override
void initState() {
// TODO: implement initState
super.initState();
configNotification();
}
void configNotification() {
var android = new AndroidInitializationSettings('mipmap/ic_launcher');
var ios = new IOSInitializationSettings();
var platform = new InitializationSettings(android, ios);
flutterLocalNotificationsPlugin.initialize(platform);
_firebaseMessaging.configure(
onMessage: (Map<String, dynamic> message) async {
print("onMessage: $message");
showNotification(message);
},
onLaunch: (Map<String, dynamic> message) async {
print("onLaunch: $message");
},
onResume: (Map<String, dynamic> message) async {
print("onResume: $message");
},
);
_firebaseMessaging.requestNotificationPermissions(
const IosNotificationSettings(sound: true, badge: true, alert: true));
_firebaseMessaging.onIosSettingsRegistered
.listen((IosNotificationSettings settings) {
print("Settings registered: $settings");
});
_firebaseMessaging.getToken().then((String token) {
assert(token != null);
UserBloc _userBloc = UserBloc();
_userBloc.updateInstallation(token);
});
}
showNotification(Map<String, dynamic> msg) async {
var data = jsonDecode(msg["data"]["data"]);
var android = new AndroidNotificationDetails(
'xxxxID',
"xxxxxName",
"xxxxDescription",
);
var iOS = new IOSNotificationDetails();
var platform = new NotificationDetails(android, iOS);
await flutterLocalNotificationsPlugin.show(
0, "xxxxx", data["alert"], platform);
} |
There's not been much movement on this recently. Are we safe to close? |
I used parse SDK for Android and iOS before. The SDK saves the device tokens automatically (and silently) when parse is initialized on client app. Do we support this yet?
The text was updated successfully, but these errors were encountered: