The Google Mobile Data Plan Sharing API also allows an operator to send notifications to a user by pushing a PlanStatus.
The API currently supports 5 types of notifications.
- Low Balance: when PlanModule.coarseBalanceLevel is set to LOW_QUOTA
- Out of Data: when PlanModule.coarseBalancelevel is set to OUT_OF_DATA. If in addition to this, the PlanModule.overUsagePolicy is set to PAY_AS_YOU_GO, then the user will be notified that they are about to enter pay as you go mode.
- Data Expiration: when PlanModule.planModuleState is set to EXPIRING_SOON
- Plan Activation: when PlanModule.planModuleState is set to NEWLY_ACTIVE
- Pay as you go: when AccountInfo.payAsYouGoCharge is populated with the amount that the user has spent.
One notification is sent to the user for each field set. If multiple
planModuleState fields are set in a single
PlanStatus, then an equal number of notifications will be sent to the user.
A notification PlanStatus SHOULD contain as much information as possible about the user's mobile plan. For each type of notification, the Data Plan Sharing API also defines a minimum set of fields which are required to build the notification text. The operator MUST include these fields in a notification PlanStatus.
|Low Balance||PlanModule.moduleName, PlanModule.byteBalance.remainingBytes|
|Out of Data||PlanModule.moduleName|
|Data Expiration||PlanModule.moduleName, PlanModule.expirationTime|