<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Salvo One thousand</title>
    <description>The latest articles on DEV Community by Salvo One thousand (@salvo_onethousand_26c493).</description>
    <link>https://dev.to/salvo_onethousand_26c493</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2062356%2Fbbe40644-44cd-446b-ab60-65692f48f354.png</url>
      <title>DEV Community: Salvo One thousand</title>
      <link>https://dev.to/salvo_onethousand_26c493</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/salvo_onethousand_26c493"/>
    <language>en</language>
    <item>
      <title>Push notification</title>
      <dc:creator>Salvo One thousand</dc:creator>
      <pubDate>Thu, 12 Sep 2024 09:04:21 +0000</pubDate>
      <link>https://dev.to/salvo_onethousand_26c493/push-notification-4c2e</link>
      <guid>https://dev.to/salvo_onethousand_26c493/push-notification-4c2e</guid>
      <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I have an android app created using react. The app contains a wordpress web site and enable push notification on mobile device. A push notification is generated on device when an article is published.&lt;/p&gt;

&lt;p&gt;The app works but, starting from a specific moment (maybe after a wordpress core upgrade), the push notifications doesn't work anymore.&lt;/p&gt;

&lt;p&gt;I didn't develop the app and I'm noto an expert in mobile app developing but I have the source code of the package.&lt;/p&gt;

&lt;p&gt;Someone can help me understanding and repair?&lt;/p&gt;

&lt;p&gt;Furthermore I don't know how to test the mobile app to verify the app behaviour in a virtual dev environmet.&lt;/p&gt;

&lt;p&gt;Following the libraries used in the mobile app:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;App.js:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;import React, { useEffect, useState } from "react";&lt;br&gt;
import {SafeAreaView, StyleSheet, View} from "react-native";&lt;br&gt;
import messaging from "@react-native-firebase/messaging";&lt;br&gt;
import analytics from "@react-native-firebase/analytics"&lt;br&gt;
import { NativeBaseProvider } from "native-base/src/core/NativeBaseProvider";&lt;br&gt;
import RNBootSplash from "react-native-bootsplash";&lt;br&gt;
import AppWebView from "./components/AppWebView";&lt;br&gt;
import {configureNotifs, LocalNotification} from "./notifications/LocalPushController";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LocalPushController.js:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;import PushNotification, {Importance} from 'react-native-push-notification'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;wordpress function.php&lt;/strong&gt; file I have:&lt;br&gt;
&lt;code&gt;add_action('rest_after_insert_post', 'test' , 10, 3)&lt;/code&gt;&lt;br&gt;
and the fuction that sends a rest call:&lt;br&gt;
&lt;code&gt;function test($post, $request, $creating = true)&lt;/code&gt;&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>react</category>
      <category>wordpress</category>
      <category>androiddev</category>
    </item>
  </channel>
</rss>
