Ionic Push Notifications failing on Android (working on IOS)

Hi All,

I am developing an app for Android and IOS, I would like to use Ionic Push Notifications. My code for my app is WORKING on IOS. But for Android it is failing and has never worked.

in my app.components.ts file

registerPush() {
    if (this.platform.is('cordova')) {
    	alert('On a Device');
	    this.push.register().then((t: PushToken) => {
	    	alert('Registering...');
	    	return this.push.saveToken(t);
	    }).then( (t: PushToken) => {
                     ---always here IOS
	    	alert('Subscribing to Push...');
	    	this.push.rx.notification().subscribe(msg => this.processPush(msg, this));
	    	this.pushToken = t.token;
	    }).catch( (err) => {
                     ---always here on Android
	      	alert('Token Error!!!');
	    });
    }
}

seems to be that it gives this error, when I take the catch away::

Error: Uncaught (in promise): Error: Push plugin not found! See logs.
Error: Push plugin not found! See logs.
at g (http://localhost:8101/build/polyfills.js:3:7133)
at http://localhost:8101/build/main.js:66947:33
at EventEmitter.once (http://localhost:8101/build/main.js:49775:13)
at Push.register (http://localhost:8101/build/main.js:66929:22)
at MyApp.registerPush (http://localhost:8101/build/main.js:138928:19)
at http://localhost:8101/build/main.js:138887:19
at t.invoke (http://localhost:8101/build/polyfills.js:3:14529)
at Object.onInvoke (http://localhost:8101/build/main.js:4425:37)
at t.invoke (http://localhost:8101/build/polyfills.js:3:14469)
at n.run (http://localhost:8101/build/polyfills.js:3:9741)
at http://localhost:8101/build/polyfills.js:3:6774
at t.invokeTask (http://localhost:8101/build/polyfills.js:3:15213)
at Object.onInvokeTask (http://localhost:8101/build/main.js:4416:37)
at t.invokeTask (http://localhost:8101/build/polyfills.js:3:15134)
at n.runTask (http://localhost:8101/build/polyfills.js:3:10390)
at g (http://localhost:8101/build/polyfills.js:3:7133)
at l (http://localhost:8101/build/polyfills.js:3:6251)
at l (http://localhost:8101/build/polyfills.js:3:5937)
at http://localhost:8101/build/polyfills.js:3:6765
at t.invokeTask (http://localhost:8101/build/polyfills.js:3:15213)
at Object.onInvokeTask (http://localhost:8101/build/main.js:4416:37)
at t.invokeTask (http://localhost:8101/build/polyfills.js:3:15134)
at n.runTask (http://localhost:8101/build/polyfills.js:3:10390)
at a (http://localhost:8101/build/polyfills.js:3:5313)
at HTMLDocument.invoke (http://localhost:8101/build/polyfills.js:3:16210)

I am doing the same install on the mac as on windows with exception to xcode step for IOS build. and my android is built by calling IONIC with my debug profile.

any thoughts would be helpful

…oh we are using ionic 3

thank you,

Never mind…

I didn’t see this note::
However, l please be aware that we are shutting this whole platform down on January 31, 2018. The new platform, Ionic Pro, will not contain push notifications. For this reason, honestly I would recommend looking for another provider for push notifications.

will have to use OneSignal or something else for this.