U-Report is a social messaging tool and data collection system developed by UNICEF to improve citizen engagement, inform leaders, and foster positive change. The program sends polls and alerts to its participants, collecting real-time responses, and subsequently publishes gathered data.
[x] Instantiate firebase messaging to access the API methods such as getToken() etc.
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
[x] Obtain a registration token that uniquely identifies the app instance by adding _firebaseMessaging.getToken() inside initState() of main.dart to ensure it's only obtained once when the app launches; save it in fcm_token variable.
[ ] To register contacts, POST to the following URL with the parameters urn, fcm_token and optionally name.
[ ] Visit contacts page to verify if the contact registration POST action above was successful(To access contacts you must be logged into RapirPro workspace):
Steps For Contact Registration on RapidPro
[x] create a new branch from
develop
calledcontact-registration-install
[x] Add
firebase_messaging
as a dependency in your pubspec.yaml file.[x] Perform Android integration for
firebase_messaging
plugin.[x] Import necessary dependencies into main.dart.
[x] Instantiate firebase messaging to access the API methods such as
getToken()
etc.[x] Obtain a registration token that uniquely identifies the app instance by adding
_firebaseMessaging.getToken()
insideinitState()
ofmain.dart
to ensure it's only obtained once when the app launches; save it infcm_token
variable.[ ] To register contacts, POST to the following URL with the parameters
urn
,fcm_token
and optionallyname
.References: https://pub.dev/packages/firebase_messaging https://pub.dev/packages/firebase_messaging/example