Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70747

[IONIC 4] [OneSignal] Load Specific

$
0
0

@Kez1 wrote:

Hi guys,

I’ve been stuck on this for a while & am in urgent need of some help!

I’m trying to load a specific page when a notification is clicked on when the app is not open.

Things to note:

  • the loadPage function works fine as I am calling it elsewhere
  • the if statement is defo trigged ( I have tried without it)
  • the detailid variable isn’t empty, ( I have tried hardcoding an id)
var self = this;

this.oneSignal
.startInit('000','000')
.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.Notification)
.handleNotificationOpened(function (jsonData) {
    if (jsonData.payload.additionalData.template == 'news') {
        self.loadPage('/news-detail/' +  jsonData.payload.additionalData.detailid);
    }
})
.handleNotificationReceived(function (jsonData) { ... })
.endInit();

any help would be really appreciated!!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70747

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>