Comments (8)
@aktug HI aktug , may I ask about the progress of this issue?
from hms-flutter-plugin.
Hello @keepfocusontechnology ,
Push SDK does not expose notification's informations, as you can see there are all null. This is not an issue.
My suggestion as a workaround is;
You can send data messages instead of notification thus you can access all properties of data message then use that values with LocalNotification feature 👍
from hms-flutter-plugin.
thanks @aktug , The function I want to implement is when my app in background and receive a HW push msg, I click this message and I can parse this message what it Contained data.
How do I do that?
from hms-flutter-plugin.
@override
void initState() {
super.initState();
initPlatformState();
//...
}
Future<void> initPlatformState() async {
if (!mounted) return;
Push.onNotificationOpenedApp.listen(_onNotificationOpenedApp);
var initialNotification = await Push.getInitialNotification();
_onNotificationOpenedApp(initialNotification);
}
void _onNotificationOpenedApp(dynamic initialNotification) {
print(initialNotification.toString());
}
Thats response is like that :
{
result: {
extras: {
_push_cmd_type: "cosa",
_push_msgid: "-1744601771",
_push_notifyid: 1218295586,
KEY1: "VALUE1",
},
remoteMessage: {
Link: "null",
NotifyId: "0",
contents: "0",
ttl: "86400",
isDefaultSound: "true",
...
},
uriPage: "app://app2",
},
resultCode: "0",
}
You can use "Key-value pair" part so these values come from the extras part
from hms-flutter-plugin.
My problem has been solved,Thank you @aktug
from hms-flutter-plugin.
Hi, I've the same problem.
@keepfocusontechnology How do you solve it?
from hms-flutter-plugin.
@digitex Hi, U want to parse the remoteMessage,the first u must config the intent data refer to the official website.
from hms-flutter-plugin.
@aktug Hello
```dart @override void initState() { super.initState(); initPlatformState(); //... } Future<void> initPlatformState() async { if (!mounted) return; Push.onNotificationOpenedApp.listen(_onNotificationOpenedApp); var initialNotification = await Push.getInitialNotification(); _onNotificationOpenedApp(initialNotification); } void _onNotificationOpenedApp(dynamic initialNotification) { print(initialNotification.toString()); }Thats response is like that :
{
result: {
extras: {
_push_cmd_type: "cosa",
_push_msgid: "-1744601771",
_push_notifyid: 1218295586,
KEY1: "VALUE1",
},
remoteMessage: {
Link: "null",
NotifyId: "0",
contents: "0",
ttl: "86400",
isDefaultSound: "true",
...
},
uriPage: "app://app2",
},
resultCode: "0",
}You can use "Key-value pair" part so these values come from the extras part
Could you please share JSON sample for this request?
from hms-flutter-plugin.
Related Issues (20)
- Error 11203(3002): Service Unavailable when Starting Speech Recognition
- [huawei_push] Can't get the token: 907135003: client api invalid HOT 1
- NullPointerException in FlutterBackgroundRunner
- huawei_modeling3d 1.8.0+300 只支持Android平台, 近期有计划增加支持iOS等其他平台吗
- Location Kit throws AGC_CHECK_FAIL - 10808 (AppGallery Connect identity verification failed) HOT 2
- flutter ios AGConnectCrashPlugin init failed HOT 1
- AGP8 upgrade
- CRITICAL : the future initFusedLocationService() never end HOT 9
- huawei_push GetToken returned null HOT 5
- [Huawei_push][Bug] cancelNotificationsWithId is not await or return any result
- Flutter Huawei FIDO: unable to decode FIDO registration response
- 集成huawei_location 提示FusedLocationService is not initialized HOT 2
- Huawei analytics does not work on Flutter HOT 1
- Unexpected CFBundleExecutable Key
- Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
- UserHandle data is missing in Flutter FIDO Authentication result HOT 5
- Geocoding Service Error
- [huawei_map] Clicking on Marker Causes setZIndex:Failure win parameter HOT 1
- 有无支持基于鸿蒙的Flutter适配的计划
- Getting MissingPluginException when using with Huawei Location inside workmanager
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hms-flutter-plugin.