Title: Code sends browser notification
Last modified: August 27, 2017

---

# Code sends browser notification

 *  Resolved [macbethmanene](https://wordpress.org/support/users/macbethmanene/)
 * (@macbethmanene)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/code-sends-browser-notification/)
 * Hi
 * This code sends browser notification instead of App notification, my app is android
   made in ionic platiform, please help
 * <?php
    function onesignal_send_notification_filter($fields, $new_status, $old_status,
   $post) { $fields[‘isAndroid’] = true; $fields[‘isIos’] = true; $fields[‘isAnyWeb’]
   = false; $fields[‘isChrome’] = false; $fields[‘data’] = array( “myappurl” => 
   $fields[‘url’] ); /* Unset the URL to prevent opening the browser when the notification
   is clicked */ unset($fields[‘url’]); return $fields; }
    -  This topic was modified 8 years, 9 months ago by [macbethmanene](https://wordpress.org/support/users/macbethmanene/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [OneSignal Push Notifications](https://wordpress.org/support/users/onesignal/)
 * (@onesignal)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/code-sends-browser-notification/#post-9455292)
 * Based on the code above, your Android / iOS app should be receiving a native 
   app notification, and a browser notification should not be sent because isAnyWeb
   is being set to false.
 * Your Android app has to handle the notification correctly and read “myappurl”
   to customize the click action (see first section of [https://documentation.onesignal.com/docs/wordpress#section-opening-web-and-mobile-notifications-in-the-browser-and-app](https://documentation.onesignal.com/docs/wordpress#section-opening-web-and-mobile-notifications-in-the-browser-and-app)).
 * If you’re still having trouble, please reach out to us at [support@onesignal.com](https://wordpress.org/support/topic/code-sends-browser-notification/support@onesignal.com?output_format=md).

Viewing 1 replies (of 1 total)

The topic ‘Code sends browser notification’ is closed to new replies.

 * ![](https://ps.w.org/onesignal-free-web-push-notifications/assets/icon.svg?rev
   =3003897)
 * [OneSignal - Web Push Notifications](https://wordpress.org/plugins/onesignal-free-web-push-notifications/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/onesignal-free-web-push-notifications/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/)
 * [Active Topics](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [OneSignal Push Notifications](https://wordpress.org/support/users/onesignal/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/code-sends-browser-notification/#post-9455292)
 * Status: resolved