# How to get Push Notifications in background

**URL:** <https://forums.fusetools.com/t/how-to-get-push-notifications-in-background/1860>\
**Category:** How-to Discussions\
**Created:** [February 13, 2016, 11:01am UTC](https://forums.fusetools.com/t/how-to-get-push-notifications-in-background/1860 "2016-02-13T11:01:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor\_Wallander](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@Victor\_Wallander](https://forums.fusetools.com/u/Victor_Wallander)\
**Post date:** [February 13, 2016, 11:01am UTC](https://forums.fusetools.com/t/how-to-get-push-notifications-in-background/1860/1 "2016-02-13T11:01:42Z")

</div>

I’m trying to receive and show local notifications in background. I’m successfully receiving push notification when the app is active but when you close the app nothing happens.

Is there anyone who has managed to do this with the fuse yet? =)

---

<div class="post-metadata">

**Author:** ![Baggers](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/baggers/32/665_2.png) [@Baggers](https://forums.fusetools.com/u/Baggers)\
**Post date:** [February 15, 2016, 3:58pm UTC](https://forums.fusetools.com/t/how-to-get-push-notifications-in-background/1860/2 "2016-02-15T15:58:22Z")

</div>

Hey there Victor, The tests I’ve done on this seem to suggest it’s still working. Can you explain more about your setup?

Details on platform, service & especially message layout would be very useful.

Cheers!

---

<div class="post-metadata">

**Author:** ![Victor\_Wallander](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@Victor\_Wallander](https://forums.fusetools.com/u/Victor_Wallander)\
**Post date:** [February 16, 2016, 10:44am UTC](https://forums.fusetools.com/t/how-to-get-push-notifications-in-background/1860/3 "2016-02-16T10:44:54Z")

</div>

Hi Chris!

When we try it on iOS it works like a charm. But in Android we don’t get any notification when the app is closed. We think maybe it is the message layout?

```auto
$msg = array(
'message' => 'here is a message. message',
'title' => 'This is a title. title',
'subtitle' => 'This is a subtitle. subtitle',
'tickerText' => 'Ticker text here...Ticker text here...Ticker text here',
'vibrate' => 1,
'sound' => 1
);

```

---

<div class="post-metadata">

**Author:** ![Victor\_Wallander](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@Victor\_Wallander](https://forums.fusetools.com/u/Victor_Wallander)\
**Post date:** [March 1, 2016, 10:30am UTC](https://forums.fusetools.com/t/how-to-get-push-notifications-in-background/1860/4 "2016-03-01T10:30:51Z")

</div>

It was the layout of the message I sent. Now we get background notis in android.  
**But no sound.**

[https://developers.google.com/cloud-messaging/http-server-ref#table1](https://developers.google.com/cloud-messaging/http-server-ref#table1)

```auto
$msg = array(
  'notification' => array( 
      'alert' => array( 'title' => 'Hello ', 
          'body' => 'This is a message ',
        'sound'=> 'default' // Still no sound?
          )
    )
);

```

And how do you turn notifications off from the app?

---

<div class="post-metadata">

**Author:** ![Baggers](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/baggers/32/665_2.png) [@Baggers](https://forums.fusetools.com/u/Baggers)\
**Post date:** [March 8, 2016, 3:16pm UTC](https://forums.fusetools.com/t/how-to-get-push-notifications-in-background/1860/5 "2016-03-08T15:16:24Z")

</div>

That does make sense, we havent explicitly exposed sound in the api yet. But if you put `'sound' => 'default'` in the alert body of your message you should get the default alert sound on android.

---

<div class="post-metadata">

**Author:** ![Levi\_Olson](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/levi_olson/32/151_2.png) [@Levi\_Olson](https://forums.fusetools.com/u/Levi_Olson)\
**Post date:** [March 8, 2016, 4:03pm UTC](https://forums.fusetools.com/t/how-to-get-push-notifications-in-background/1860/6 "2016-03-08T16:03:32Z")

</div>

Moved comment/question to separate forum post [https://www.fusetools.com/community/forums/general/push\_notifications\_body\_json\_structure](https://www.fusetools.com/community/forums/general/push_notifications_body_json_structure).
