j3k0 / cordova-plugin-openwith

Get your Cordova App in the O.S. "Share" menu on iOS and Android
MIT License
138 stars 114 forks source link

Adding plugin to IONIC 3 #74

Open oudj001 opened 5 years ago

oudj001 commented 5 years ago

Hi!

Has anyone already installed this into an ionic 3 application? Where to add the 'basic usage' code? My app is launching, but unfortunately I don't get the stream with the image.

Thanks in advance!

rafaelmrdyn commented 5 years ago

Hi!

Has anyone already installed this into an ionic 3 application? Where to add the 'basic usage' code? My app is launching, but unfortunately I don't get the stream with the image.

Thanks in advance!

add it to the app.component's constructor

oudj001 commented 5 years ago

Hi @iamrafo,

Thanks. Can you show me some code you've got? I get the error that openwith isn't defined in at cordova.

cordova.openwith.setVerbosity(cordova.openwith.DEBUG);

Thanks in advance,

oudj001 commented 5 years ago

I get this specific error:

        Property 'openwith' does not exist on type 'Cordova'.
NiklasMerz commented 5 years ago

Do wait for the "ready" event? https://cordova.apache.org/docs/en/latest/cordova/events/events.html#deviceready

cheranrj commented 4 years ago

Hi! @iamrafo @oudj001 how to add openwith plugin in app.component's constructor? can you share some code..

rafaelmrdyn commented 4 years ago

@cheranrj @oudj001 constructor(private platform: Platform) { platform.ready().then(() => { cordova.openwith.addHandler((intent) => { console.log('intent received', intent); }); }); }

vladimirSnapAddy commented 2 years ago

@rafaelmrdyn did it work for you for ios? In my ionic app, app is listed in share options but doesnt get into handler when shared.

rafaelmrdyn commented 2 years ago

@rafaelmrdyn did it work for you for ios? In my ionic app, app is listed in share options but doesnt get into handler when shared.

yes it worked both in iOS and Android

vladimirSnapAddy commented 2 years ago

Can you please help or share some of the handler code? Also, what is the expected behaviour after image or a file is shared? Does your app open after image/file is shared, or share window closes and nothing else happens?

rafaelmrdyn commented 2 years ago

Can you please help or share some of the handler code? Also, what is the expected behaviour after image or a file is shared? Does your app open after image/file is shared, or share window closes and nothing else happens?

Sorry but I can't help because that project was 2 years ago and I have no code

vladimirSnapAddy commented 2 years ago

Can you maybe help with pointing me in the right direction? My ionic app doesn't open once share is clicked. Do you know what could be a reason?