darryncampbell / darryncampbell-cordova-plugin-intent

General purpose intent shim layer for cordova appliations on Android. Handles various techniques for sending and receiving intents.
MIT License
86 stars 136 forks source link

NOT getting any data with registerBroadcastReceiver ionic 3 #76

Closed azzaGarsaa closed 5 years ago

azzaGarsaa commented 5 years ago

i had followed the ZebraIonicDemo and i wanted to set it in in my app, so i installed this plugin : ionic cordova plugin remove com-darryncampbell-cordova-plugin-intent which is now (1.1.7)

` (window).plugins.intentShim.getIntent((intent) => { if (intent ) { console.log('intent', intent); (window).plugins.intentShim.registerBroadcastReceiver({ filterActions: [ 'com.continuousnet.myAPP.ACTION',

          ]
        },
          function (intent) {
            //  Broadcast received
            console.log('Received Intent: ' + JSON.stringify(intent.extras));
          })
      }
    }, () => console.log("intent error"));

`

i'm not getting any data, even the console.log('Received Intent: ' + JSON.stringify(intent.extras)); is not showing
could any one help me ?

darryncampbell commented 5 years ago

Hi, does the ZebraIonicDemo work for you without modification?

azzaGarsaa commented 5 years ago

@darryncampbell yes it's working

darryncampbell commented 5 years ago

Have you configured DataWedge to send intents to your application with the correct action? See the ReadMe of ZebraIonicDemo for more information.

azzaGarsaa commented 5 years ago

@darryncampbell thank you for responding me, I found it:), in DataWedge configuration, it was Intent delivery should be set on Broadcast intent