Closed xavierarpa closed 3 years ago
@kingdox i've having the same issue - have you managed to solve it all?
@kingdox i don;t know how / why but i have managed to get past this issue. I added import { Capacitor } from '@capacitor/core'; to my file and then checked if the platform was 'web' or not....
if (Capacitor.getPlatform() !== 'web') { PushNotifications.register(); }
But i removed the import and code - and it still works.. no idea why, but i have managed to get pas thtis which is great.
hope it helps you as well
@kingdox i've having the same issue - have you managed to solve it all?
Yes I did it, in my case of desesperation just redo with npx cap init android in a new android project and adding one by one the things that knows it needs
My conclusion after that is it might be some libraries or another internal element who keeps obsoletes but it wasn't cleared at all after a update of a plugin or any other thing what Android manages π€
I'll close this thread, I'll hope that my response can solve your problem π
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.
Bug Report
Plugin(s)
Capacitor Version
Platform(s)
Current Behavior
Each time when it do the check as expect and reach to the line PushNotification.register shows an error on the Android studio logcat (using the 'Run' app option with a USB mobile conection) and then close the app itself !
that occurs when it pass after PushNotifications.requestPermissions().then promise and checking if it is a 'granted' in the return response
Currently it was tested on this android devices:
Expected Behavior
As the PushNotifications plugin works, it should start to do the request and then if is right to be registered (by the promise response with a 'granted' value) and next register it.
Other Technical Details
Possible details to know:
Additional Context
the following images shows the Android studio logcat within 'HUAWEI GRA-L09' device:
And this is the Plugin, why so many things appears Deprecated? am I missing a new version and if is it, how can I update it?: