Giter VIP home page Giter VIP logo

Comments (3)

moberwasserlechner avatar moberwasserlechner commented on May 29, 2024

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

  • Just to be clear, you did not add the Android part of the plugin to com.companyname.appname.MainActivity#onCreate
  • Do you have any logs?

from capacitor-filesharer.

TayKara avatar TayKara commented on May 29, 2024

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 :

  • Initially, I've added the file-sharer plugin in the onCreate method, and used it. It worked fine for what it supposed to do. Unfortunately I noticed after one or two weeks that there was a bug with the received notification listener of Capacitor Push Notifications plugin. Nothing said that the problem came from file-sharer plugin, so it was really difficult to determinate what provoked the bug.

  • Unfortunately for both of us, there was not any logs, it's the reason why it was so difficult to find the bug's source.

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

  • ionic start sample-file-sharer blank --capacitor
  • npx cap init (with package com.filesharer.sample)
  • add PushNotification functionnality in home.page.ts
  • add npm @byteowls/capacitor-filesharer
  • build/add android
  • npx cap sync
  • add app com.filesharer.sample in firebase console and download google-service.json
  • add google-service.json in android/app

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".

from capacitor-filesharer.

moberwasserlechner avatar moberwasserlechner commented on May 29, 2024

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.

from capacitor-filesharer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.