Italian Push notification direttamente da wordpress.

Nino Caminiti

Member
Licensed User
Ciao a tutti ,

sono un principiante ho creato una semplice applicazione per una pagina web che ho già pubblicato su apple store e su Google Play. Riesco a mandare le PUSH direttamente dalla console di Firebase e con il codice b4j indicato da Erel nel tutorial, Ho visto che c'è un plugin di wordpress che permette di inviare le push direttamente quando pubblichi un post e vorrei integrarlo sia in B4A che b4I. Qualcuno ha mai realizzato qualcosa del genere? o sa come potrei integrarlo ?

Per inviare le push io hi seguito questi tutorial e funzionano perfettamente utilizzando la console di firebase,




Questo è quello che richiede il plugin:

Lato wordpress non ho problemi ma non so come integrarlo in b4i e b4a

EASY INTEGRATION AND USE​

Simply, you install the plugin, enter your Firebase Server (API) key in the plugin settings, generate a site key and choose the types of posts for which you want to push a notification.

Then you need to insert the generated REST endpoints of your site in your mobile application.

These endpoints are used to register the device with the site when the application is launched and deregister the device when the user deletes the application.

After device registration, every time a new article or page is published in the selected post types, all registered devices are notified and a notification appears.

REST API ENDPOINTS​

In order to be able to send push notifications, you need to record the device ID and device token in the site’s database. Therefore, you have 2 REST endpoints to subscribe the device when the application is installed or launched, and unsubscribe the device during app deletion.

Subscribe device:


Parameters:

  • rest_api_key (required) – Unique generated site key provided by the plugin
  • device_uuid (required)
  • device_token (required)
  • subscription (required) – This would be the some category name in which the device is registered, if there is no category exists in WordPress it’ll be created automatically.
  • device_name (optional)
  • os_version (optional)
Returns JSON:

{
"error": false,
"message": "Device token registered",
"subscription_id": 123
}

Unsubscribe device:


Parameters:

  • rest_api_key (required) – Unique generated site key provided by the plugin
  • device_uuid (required)
Returns JSON:

{
"error": false,
"message": "The device token w
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…