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

Push Notifications with OneSignal not showing pushToken

$
0
0

@C_shubham wrote:

Hello,

I am using ionic 4 react, i have integrated oneSignal push notification but i didn’t get push notification.
Push Notifications with OneSignal does not showing pushToken,

Code:
import { OneSignal } from ‘@ionic-native/onesignal’;
.
.
.
OneSignal.startInit(‘4eeef01f-02fc-48ef-bf8c…’, ‘fir-…’);
OneSignal.inFocusDisplaying(OneSignal.OSInFocusDisplayOption.None);
OneSignal.inFocusDisplaying(OneSignal.OSInFocusDisplayOption.InAppAlert);
OneSignal.setSubscription(true);
OneSignal.handleNotificationReceived().subscribe(() => {

});
OneSignal.handleNotificationOpened().subscribe(() => {

});
OneSignal.endInit();

OneSignal.getIds().then((id) => 
{
    alert(JSON.stringify(id))
    localStorage.removeItem('player_id_list');
    localStorage.setItem('player_id_list', JSON.stringify(id));
}, (error) => {
                    
                });

Any suggestions appreciated…

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles