Sends push notifications using Firebase Cloud Messaging (FCM).
Uses Stetho's prefs dumpapp plugin to find the application Firebase Registration ID token in app shared preferences
You can install the plugin from the IntelliJ Plugin Repository.
Or you can download the latest binary from releases on this repo
You need to set the "Authorization Key" in plugin settings:
The plugin installs one menu entry under tools menu:
And a toolbar button:
When using this option the FCM push sender dialog will be shown:
At this point the plugin tries to find the app Firebase Id in the configured shared preference key, if the id is found it will be shown, otherwise you can set it manually.
The "Remember" check allows to store the current data for next plugin executions.
The plugin uses the legacy Firebase Cloud Messaging HTTP protocol to send push notifications.
You can select "Data only" or "Full message" JSON types:
This type allows only to provide the data
field of the payload.
{
"to" : "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"data" : [Provided JSON object]
}
This type allows full control over the message payload. The plugin will add the to
field for you.
{
"to" : "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
[Provided JSON object]
}
See Firebase Cloud Messaging HTTP protocol for more information about the HTTP syntax.
Also you can create, import and export templates:
Then you can use the templates in the send dialog:
One of the main features of this plugin is the ability of search automatically the Firebase Registration ID token in app shared preferences using stetho dumpapp plugin, however you can disable the stetho integration in plugin settings and set the ID manually.
When using stetho to find the Id, the plugin works with connected devices on debug mode (ADB accessible). If more than one debuggable device is connected, the plugin will show a dialog to select the target device:
If the target device has more than one stetho-enabled process running, the plugin will ask to select the target process: