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 130 forks source link

ERROR TypeError: Object(…) is not a function at WebIntent.get [as ACTION_VIEW] #94

Closed rajmaxi closed 4 years ago

rajmaxi commented 4 years ago

I am trying to integrate Google pay into my app using web intent plugin. I am using ionic framework version 3.20.0 but this plugin had worked in ionic version 4+ After I completed the install I got the following error:

ERROR TypeError: Object(...) is not a function at WebIntent.get [as ACTION_VIEW]

ljeh7

darryncampbell commented 4 years ago

I'm not too certain what the exact cause could be - I have an Ionic sample app that was built with v3 that works by accessing the plugin directly which seemed to work for others:

(<any>window).plugins.intentShim.METHOD

You might want to take a look at the sample app at https://github.com/Zebra/ZebraIonicDemo, the exact code is https://github.com/Zebra/ZebraIonicDemo/blob/master/src/providers/barcode/barcode.ts#L23

darryncampbell commented 4 years ago

Closing this issue. For anybody who has a similar question about Ionic v3+ support, I updated the sample at https://github.com/ZebraDevs/DataWedge-Ionic-Demo to support anything up to v6 - see that project's readme