0
채팅 앱에 푸시 알림을 보내려고합니다. 문제는 OneSignal에서 계속 오류가 발생한다는 것입니다. 잘못된 Google 인증 정보입니다. 올바른 서버 API 키를 넣었을 것입니다. 내 ionic2 프로젝트에서 이걸 내 앱에 넣었습니다 .ts :Onesignal ionic2가 포함 된 Google 자격증 명이 올바르지 않습니다.
class MyApp {
@ViewChild(NavController) nav: NavController;
rootPage: any = Accueil;
pages: Array<{icon : string, title: string, component: any}>;
constructor(public platform: Platform, private authService : AuthService, private alertController: AlertController) {
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
var notificationOpenedCallback = function(jsonData) {
console.log('didReceiveRemoteNotificationCallBack: ' + JSON.stringify(jsonData));};
window["plugins"].OneSignal.init("MTUxMDg0YjYtZmFiMS00ZTE2LTk3NmYtZWNjMjY3YTdkMDc5",
{googleProjectNumber: "220513038393"},
notificationOpenedCallback);
// Show an alert box if a notification comes in when the user is in your
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
});
}
어디에서 오류가 발생한다고 생각하세요?
내 다른 질문은 사용자가 새 메시지를받을 때마다 밀어 넣기 알림을받을 수 있도록 내 서버 (NODE JS)에서 보내는 알림을 관리하는 방법입니다.
찾았습니다 : 0fe7be35-7a59-4739-b97d-5bb618c45598 여전히 장치에서 밀어 넣기를 볼 수 없습니다. – voguendi