Skip to content

You're reading the docs for Draftbit Classic (v1), our previous builder. In Draftbit today, you describe the app you want and the agent writes real code you own.

Push Notification Actions

This Action will return the device’s Expo Push Token. This token can be used to to send notifications to the specific device using Expo’s Push API. Typically, you would store the Expo Push Token in your database - on the ‘user’ record or in a ‘devices’ table, for instance.

ParameterDescription
Failure MessageThe message shown to the user when the Action fails, such as if the user is offline or in airplane mode. Default: “Failed to get push token for push notification!”
Device MessageThe message when not run from a physical device, such as an emulator. Default: “Must use physical device for Push Notifications”
ResultThe name of the variable to assign to the result which is an Expo Push Token as a String. You can use this variable to store the token in your database, for instance.

You can get your apps notification badge count using this Action

ParameterDescription
ResultGets the current notification badge count. See docs for more

You can set your apps notification badge count using this Action

ParamterDescription
InputSets the current notification badge count.
ResultGets the current notification badge count. See docs for more