Flutter+Firebase when message is received background, saving data to Hive Database
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
I have a error when background message received from firebase,
error:
D/FLTFireMsgReceiver( 6145): broadcast received for message
I/flutter ( 6145): FlutterFire Messaging: An error occurred in your background messaging handler:
I/flutter ( 6145): MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider)
myBackroundhandler func:
```
Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
await Firebase.initializeApp()
await Hive.initFlutter();
Box ussdBox3 = await Hive.openBox("ussdBox");
ussdBox3.put("key", "message saved");
}
```
I need to some advice about this error or I should use other DB for this. Because I read that Hive don't support many proccess.
what do you advice ?..........
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.