I have an app that listens for a deeplinks starting with example:// The app can be launched by scanning a QR code containing a deeplink.
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "example://” -->
<data android:scheme="example"/>
</intent-filter>
I am using the code above. It works exactly as expected on Samsung hardware. My other test device is a Google Pixel 5a. When using the google default camera with my app installed, The camera sees a deeplink starting with example:// my app is not part of the "open with" list that appears.
Any ideas what may be causing this?
It looks as though this is a bug specific to the Pixel camera app. The app is treating all example:// links as though the destination is a web browser, even though http:// or https:// is not included
Related
How can I control the default Open supported links to either Ask every time or Open in this app for my Android app? Does it happen in the manifest?
I have two apps that try to accept the same universal link scheme, and the ideal behavior is to have the user decide which app to open when they click on the link. However, it seems that the first app correctly has the Open supported links in settings set to Ask every time, while the other app has the Open supported links as Open in this app. Thus, when both apps are installed, only the second one will be opened straight away, whereas the first one won't even be prompted.
The portion that accepts universal links in both of the AndroidManifest.xml files are almost identical.
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="foo.bar.com" android:pathPrefix="/action/" android:scheme="https" />
</intent-filter>
I have implemented deeplinking in my application that open my app (if available) but my app opens within other application. I want it should open out of the other app.
Here is my code for deeplinking.
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="controller"
android:path="/productDetail"
android:scheme="lalaland" />
</intent-filter>
Example: If i hit a url in slack it opens my app ( lalaland ) with in slack.
You are at the mercy of the application that the user executed the deep-link from.
I'm afraid there is no solution for this. For example, Facebook messenger butchers deep-links rendering them unusable in many cases, same with the Samsung messaging app.
What you see here is Slack hijacking the deep-link and forcing it to open within its own app.
I feel stupid as I have found three different questions which seem to be the same as mine, but I can't get it to work. I tried "Open Android app using intent-filter not working", "Open Android app from URL using intent-filter not working", and "Open Android app from URL using intent-filter not working for 4.1 version 2". My app captures activity on my mobile web site using a WebView, but I know a lot of my users use Google to launch their browser. I would like instead for it to launch my app. In addition, it would be nice when a user types the address of my site into a browser, they would get a selection dialog to give them the option of using my app for my web site. My Manifest has the following:
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:host="www.tennisrecruiting.net" />
<!--<data android:pathPattern="/.*" />-->
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I have tried it with and without the commented out line, and with the pattern ".*" but none of them work. That is, if I type "tennisrecruiting" into a google search, and click on a choice that takes me to "http://tennisrecruiting.net", the phone goes directly to my Chrome browser without asking to use my app. Similarly, if I am in my chrome browser and type "http://tennisrecruiting.net" as the target URL, chrome just opens my site without launching my app or asking the user for a choice.
What am I doing wrong - other questioners seem to get it to work but I have tried all of their solutions and they don't work for me. I have a Galaxy G6 on Verizon with Android version 6.0.1, Kernel version 3.10.61
I figured out my own problem but thought it would be good to post the answer in case someone else has the same problem. The problem was that I only had one browser, Chrome, on my device and it was, of course, registered for the http scheme. Since it was the only one, my device treated it as the preferred app for all http schemes. My scheme was more selective by designating a host. The solution was to download another browser so that none were user preferred, then when Google was navigating to http://tennisrecruiting.net, my app was listed for selection. I still don't get a transfer or selection when my mobile website is entered into Chrome but that is not surprising.
this whole subject took some precious time from my life, and still isn't 100% solved, hope i could find some answers here.
EXPECTED RESULT: when tapping a link to my app (http://www.myapp.com), if app is installed, os should open a dialog where user chooses the app to open this link (my app or browser), if app isn't installed should normally browse this url with the browser.
ACTUAL RESULT:
on Samsung devices, tapping the link (http://www.myapp.com) gives the expected result, a dialog opens prompting me to choose an app to open this with, including my app.
on Nexus devices, on the other hand, it acts like the app isn't installed, and it just browses the url with the browser with no prompting to choose an app to open.
How to get Nexus devices to support this flow as well? like Samsung devices?
this is how i registered the activity in my app manifest:
<activity
android:name=".activities.MainActivity2"
android:configChanges="keyboardHidden|screenSize"
android:theme="#style/application_theme_header_green">
<intent-filter >
<data android:scheme="http" android:host="www.myapp.com" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
hope i provided all needed info.
thanks all.
Try replacing
<data android:scheme="http" android:host="www.myapp.com" />
With
<data android:scheme="http" />
<data android:host="www.myapp.com" />
This looks like the only difference between what I have and what you've posted, and it works on Nexus devices.
scenario:
i get an sms with link like this https://www.xyz.com. once i click on the link it opens a browser and if the app exists on my device [given it has the above link in its data scheme] like below
</intent-filter>
<intent-filter android:priority="100">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="www.xyx.com" />
</intent-filter>
when ever the browser opens the https://www.xyz.com the app is opened.
problem:
this works perfect in emulator. i believe it does in nexus devices too.
but, i tried on htc one x and samsung s3 ... it didnt work.
even the app is present the browser opens the webpage.
is it something the manufacturer done to the OS. theoretically it works in emulators.
now i am worried to publish the app since. most of the devices out there are samsung's htc's etc..,
should i use mime return from that page type now?
is there something i am missing?