How will i stop expo from sending push notification "Hello there! This is an example push notification"

anyone has managed to stop expo from sending push notification “Hello there! This is an example push notification” ?. I am using push notification in my app, but i dint want to receive that example push notification on start up at the first time opening the app after installation. Anyone please help me on this issue.

can you provide some code? I am using expo push notification and am not getting such message

i think its almost certain that you’re sending this notification somehow. can you grep your server code and your client code for “Hello there! This is an example” and see if you can find it?

I’m pretty sure you just used the starter tabs template and the code is in api/registerForPushNotificationsAsync.js that calls it

1 Like

@vipeeshp there is a bunch of comments in the file @ccheever mentioned if you want to understand why thats happening, alternatively you can just delete the file and go to RootNavigation and delete the import and function call

I have generated new project using expo xde and modified code. I have done
grep for that word in my project and folder and I couldn’t find.

this is the code you need to remove:


  // POST the token to our backend so we can use it to send pushes from there
  return fetch(PUSH_ENDPOINT, {
    method: 'POST',
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      token: {
        value: token,
      },
    }),
  });

Its worked, many thanks.

I’m also having this issue. The app is closed the app is not running but I continue to get notifications every few seconds. When I was testing I did set the notifications to occur every two seconds every minute but now I’m getting notifications from something that does not exist because I deleted all the code from the app but it continues to send notifications.