moberwasserlechner / capacitor-filesharer

Capacitor plugin to download and share files for the Web, Android and iOS! Stop the war in Ukraine!
MIT License
82 stars 20 forks source link

No data received with Capacitor Plugin PushNotifications #4

Closed TayKara closed 4 years ago

TayKara commented 5 years ago

Hello @moberwasserlechner ,

I have a bug with PushNotifications on Android, when I receive a notification, the app detect it and go inside of the listener, but it's empty (data field is empty). The problem appears when capacitor-filesharer is installed (just installed with npm, not used). If I remove "@byteowls/capacitor-filesharer": "^1.0.0-beta.1" from package.json, it fixes the bug.

moberwasserlechner commented 5 years ago

Boah, it is difficult to say whats the issue. Could plz answer these question to I get a better idea whats going on.

TayKara commented 5 years ago

Many thanks for your quick answer :)

First, I have to notice you that I'm not an English speaker, so forgive me for my poor grammar. ^^'

About my problem :

I created a sample project for you : sample-file-sharer What I did in this project was :

after these manipulations, I tested push notifications (with firebase console/cloud-messaging), and here are the results : with file-sharer : console log with file-sharer without file-sharer : console log without file-sharer

to test with/without, just remove the line "@byteowls/capacitor-filesharer": "^1.0.0-beta.1" in package.json, and then ionic build/npx cap sync

I removed google-service.json file from android directory (there is some confidential data in it), so you have to create a project/add an app in firebase console to try it. Make sure to add your app with the package name "com.filesharer.sample".

moberwasserlechner commented 4 years ago

I tested v1.0.1 with Push Notifications from Capacitor 2.0.0-beta.1 and v.2.0.0 (not released yet) with Capacitor 2.0.0 and had no issues.

But it's a year later and thing have improved on both sides. Maybe #17 was one of the reason for this issue.