I do folow instruction of ionic for push notification but not work
my code :
import { CloudSettings, CloudModule } from '@ionic/cloud-angular';
import {
Push,
PushToken
} from '@ionic/cloud-angular';
const cloudSettings: CloudSettings = {
'core': {
'app_id': '5bb9a616',
},
'push': {
'sender_id': '482738418736',
'pluginConfig': {
'ios': {
'badge': true,
'sound': true
},
'android': {
'iconColor': '#343434'
}
}
}
};
@Component({
selector: 'signup',
templateUrl: 'signup.html'
})
export class SignupPage implements OnInit {
constructor(private http: Http, public navCtrl: NavController, public loadingCtrl: LoadingController, public toastCtrl: ToastController,
private storage: Storage, private platform: Platform, private geolocation: Geolocation, public push: Push) {
this.push.register().then((t: PushToken) => {
return this.push.saveToken(t);
}).then((t: PushToken) => {
console.log('Token saved:', t.token);
}); this.push.rx.notification()
.subscribe((msg) => {
alert(msg.title + ': ' + msg.text);
});
}
}
who do folow this instruction work plz help me . thanks for reading!