-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I get this receiving a URL from a browser? #102
Comments
Any luck? |
For iOS, add
to your share extension .plist file under NSExtensionActivationRule section |
Thank you, is there a way to do this on android? |
For Android, paste the following into your AndroidManifest.xml file: <intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter> This will make your app accept any type of files, including links. If you need to restrict to links only, examine what mime is coming when you're sharing links with the configuration above and them replace / with what you found. |
Ended up using https://github.com/missive/cordova-plugin-openwith and setup was super easy. Make sure to add via the git repo. Not sure how it differs from Eternal's which it was forked from... |
Ok thanks for the help! I am going to look at the github link! |
Thanks @MrXyfir !!! That worked PERFECTLY (the For the record, here is how I added it: cordova plugin add https://github.com/missive/cordova-plugin-openwith.git \
--variable ANDROID_MIME_TYPE="text/*" \
--variable IOS_URL_SCHEME=myversesapp \
--variable IOS_UNIFORM_TYPE_IDENTIFIER=public.plain-text \
--variable IOS_BUNDLE_IDENTIFIER=com.josiahbryan.myverses On Android, the item in
On iOS 13, the same
If only I had tried that plugin two hours ago LOL - anyway, thanks!! |
@josiahbryan 2 hours? Rookie numbers! I spent like two days trying to get these stupid plugins to work! Glad I could help though. |
@EternallLight or anyone else who knows - Can you elaborate on how to make this plugin receive urls from a specific site - i.e. universal links? Can any of you elaborate on the equivalent in iOS?
Any help would be appreciated. |
@HarelM That's not what this plugin is for. You need a plugin specifically for universal links like https://github.com/GEDYSIntraWare/cordova-universal-links-plugin which is a fork of the original deprecated plugin https://github.com/nordnet/cordova-universal-links-plugin There are many forks available so you have to test and find one that works for you. |
@MrXyfir It works for android, also I found this information on predicate so I think it's possible for ios too :-) |
related: #117 |
I tried all mimeTypes but nothing is working. even with |
I gave up on cordova and use capacitor js instea: https://capacitorjs.com/ Everything works out of the box very well. There is 1 share plugin that works well except for sharing images: The only drawback beween cordova and capacitorjs so far has been the lack of good status bar support. In cordova they manage to push the view down.. in capacitor you have to make use of the safari safe zones with CSS.. other that that though it all just worked out of the box so far very well. |
on android try: |
How do I get this plugin receiving a URL from a browser?
The text was updated successfully, but these errors were encountered: