<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Notification not showing in background IONIC3 .</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111000575" />
  <subtitle>Notification not showing in background IONIC3 .</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111000575</id>
  <updated>2026-04-06T17:17:15Z</updated>
  <dc:date>2026-04-06T17:17:15Z</dc:date>
  <entry>
    <title>RE: Notification not showing in background IONIC3 .</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111017838" />
    <author>
      <name>Victor Galan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111017838</id>
    <updated>2018-09-24T08:51:56Z</updated>
    <published>2018-09-24T08:51:56Z</published>
    <summary type="html">&lt;p&gt;Hey&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In which platform are you observing this behavior?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Victor Galan</dc:creator>
    <dc:date>2018-09-24T08:51:56Z</dc:date>
  </entry>
  <entry>
    <title>Notification not showing in background IONIC3 .</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111000574" />
    <author>
      <name>reda zejli</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111000574</id>
    <updated>2018-09-20T16:59:28Z</updated>
    <published>2018-09-20T16:59:28Z</published>
    <summary type="html">&lt;p&gt;Hello community, I am facing an issue !! I am developping an hybrid
  app in ionic3 and I need to implement push notification, I use as
  backend liferay6.2. And everything seems fine cause I can now send
  messages from Cloud Messaging in firebase console.And My phone
  receuives the message when I am in foreground or background mode ,The
  problem is that when I try to send from push notification module in
  liferay, I receive the message in foreground but when I kill the app
  or I turn to background mode I receive nothing.Any help please, The
  code of on('notification') below : &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;pushObject.on('notification').subscribe((notification: any) =&amp;gt; {&lt;/p&gt;
&lt;p&gt;//if user using app and push notification comes&lt;/p&gt;
&lt;p&gt;if (notification.additionalData.foreground) {&lt;/p&gt;
&lt;p&gt;// if application open, show popup&lt;/p&gt;
&lt;p&gt;let confirmAlert = this.alertCtrl.create({&lt;/p&gt;
&lt;p&gt;title: 'New Notification',&lt;/p&gt;
&lt;p&gt;message: notification.message,&lt;/p&gt;
&lt;p&gt;buttons: [{&lt;/p&gt;
&lt;p&gt;text: 'Ignore',&lt;/p&gt;
&lt;p&gt;role: 'cancel'&lt;/p&gt;
&lt;p&gt;}, {&lt;/p&gt;
&lt;p&gt;text: 'View',&lt;/p&gt;
&lt;p&gt;handler: () =&amp;gt; {&lt;/p&gt;
&lt;p&gt;alert(&amp;quot;Hello World&amp;quot;);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}]&lt;/p&gt;
&lt;p&gt;});&lt;/p&gt;
&lt;p&gt;confirmAlert.present();&lt;/p&gt;
&lt;p&gt;} else {&lt;/p&gt;
&lt;p&gt;//if user NOT using app and push notification comes&lt;/p&gt;
&lt;p&gt;//TODO: Your logic on click of push notification directly&lt;/p&gt;
&lt;p&gt;// this.nav.push(DetailsPage, { message: data.message });&lt;/p&gt;
&lt;p&gt;alert('Push notification clicked');&lt;/p&gt;
&lt;p&gt;console.log('Push notification clicked');&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;console.log('Received a notification', JSON.stringify(notification))&lt;/p&gt;
&lt;p&gt;});&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you in advance&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>reda zejli</dc:creator>
    <dc:date>2018-09-20T16:59:28Z</dc:date>
  </entry>
</feed>
