No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    cordova plugins not working

    Help
    3
    4
    844
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      native last edited by

      hey guys, been trying to use cordova plugins and i’ve reached the point where i’m tearing out my hair.
      tried to use these two plugins namely phonegap-plugin-push and cordova-plugin-facebook4
      both install successfully but the issue is it does nothing which is frustrating because when i log their api’s its not undefined , tried running it separately outside the export with the device ready event. the event gets triggered ok but none of the plugins apis work
      in a new cordova project this runs alright .

      facebookConnectPlugin.login([‘public_profile’, ‘pages_messaging’, ‘manage_pages’], function (data) {
      alert(data)
      }, function (err) {
      alert(err)
      });

      const push = PushNotification.init({
      android: {
      alert: “true”,
      badge: “true”,
      sound: “true”,
      forceShow:“true”
      },
      browser: {
      pushServiceURL: ‘http://push.api.phonegap.com/v1/push’
      },
      ios: {
      alert: “true”,
      badge: “true”,
      sound: “true”
      },
      windows: {}
      });

        push.on('registration', function (data) {
          // data.registrationId
          alert('reg',data)
        });
      
        push.on('notification', function (data) {
          alert('not',data)
          // data.message,
          // data.title,
          // data.count,
          // data.sound,
          // data.image,
          // data.additionalData
        });
      

      but in quasar whether in mounted,created or outside the export nothing happens . don’t know what i’m doing wrong would even love to get an error at this point .please help

      1 Reply Last reply Reply Quote 0
      • F
        Florentin last edited by

        Hi, did you try with other plugins like the ones in the quasar guide : https://quasar-framework.org/guide/cordova-plugins.html ?

        Are they aded to your config.xml in your codova folder ?

        1 Reply Last reply Reply Quote 0
        • F
          fsergeant last edited by

          Hey, do you find a way to resolve this issue ?
          I encounter the same issue with phonegap-plugin-push…
          Thanks

          1 Reply Last reply Reply Quote 0
          • F
            fsergeant last edited by fsergeant

            After two days, I resolve this issue. @Florentin you’re right.
            You’ve to add plugin to config.xml:
            <plugin name="phonegap-plugin-push" spec="^2.2.3" />

            1 Reply Last reply Reply Quote 0
            • First post
              Last post