REPOST
So im still having problem with android captive portal/chrome with authpuppy.
Once im connected to a wifi, the captive portal will will pop up, showing a custom page and when user clicks on a button on the page, my app will open.
no matter what i did, on clicking the button, the captive portal will show ERR_UNKNOWN_URL_SCHEME as error. Chrome will show ERR_CONNECTION_REFUSED as error.
I had no problem with firefox or normal web browser.
If successfully authenticate, all the above works like charm, but if pending authentication (no internet) then it will not work.
Android as follows:
<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"
android:host="www.mydomain.com"
android:pathPattern="/a/b/c/" />
<data
android:scheme="myapp"
android:host="www.mydomain.com"
android:pathPattern="/a/b/c/" />
</intent-filter>
And html as follows:
<a href="intent://www.mydomain.com/a/b/c/#Intent;scheme=myapp;package=com.mypackage;S.browser_fallback_url=http://play.google.com/store/apps/details?id=blablabla&hl=en;end;";></a>
Can someone pls help me out?
For Android on Chrome / WebView, you should use an Intent per Google Chrome Documentation
https://developer.chrome.com/multidevice/android/intents
Example
intent://#Intent;scheme=abcd://;package=com.abcd.yourapp;S.browser_fallback_url=http://m.abcd.com
Related
I am trying to implement an AppLink (deeplink) such that when the app-link is triggered it does not bring up the popup asking for my App or Chrome, I want it to just launch my app so I can direct them to the proper place in the app.
I have read various android articles and posts and cannot get the AppLink to work the way I want.
Here is my manifest xml:
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<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:scheme="http"
android:host="www.example.com" />
</intent-filter>
<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:scheme="https"
android:host="www.example.com" />
</intent-filter>
</activity>
I read in the android doc here the following:
A deep link is an intent filter that allows users to directly enter a
specific activity in your Android app. Clicking one of these links
might open a disambiguation dialog, which allows the user to select
one of multiple apps (including yours) that can handle the given URL.
For example, figure 1 shows the disambiguation dialog after the user
clicks a map link, asking whether to open the link in Maps or Chrome.
Android App Links are a special type of deep link that allows your
website URLs to immediately open the corresponding content in your
Android app (without requiring the user to select the app).
I added auto verify to the intent and have the assetlinks.json file but still prompts to choose my app or chrome. I DO NOT want the prompt for chrome... only my app.
So, what am I missing?
Has anyone here got an app link to work that DOES NOT pop up the option for Chrome?
Can anyone point me to a sample app or code or an article that actually works?
Thanks for any assistance with this.
I'm trying to launch my android application through a browser link.
When I open the link through the chrome browser, it successfully shows the App Dialog Picker which shows the app available for the scheme like this.
app dialog picker
But when the link is opened through the Chrome Custom tab,
it just redirects to the site without showing the App Dialog Picker.
I need it to launch the app or show the dialog picker when the link is opened from another app (like gmail) which opens the in-app browser and not just in the chrome browser.
here is the current intent-filter I have.
<intent-filter>
<data
android:scheme="http"
android:host="www.myapp.com" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
If anyone could point out would be a great help. Thanks
So if ever anyone encounters the same problem, here's what I did. To launch your app with Chrome Custom Tabs browser, you need to make your scheme a non web-link format and make it into a custom scheme (example below). Because apparently, Chrome Custom tabs considers web link schemes as an ordinary link therefore launching it in the browser.
so from
<intent-filter>
<data
android:scheme="http"
android:host="www.myapp.com" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
change the scheme to a custom one, that way, your app's scheme will be the only one that gets handled by the browser. This is an example link with the scheme given below ~ myapp://myapp.app (note that this link is not clickable in android apps, but you can place it in the href of the html anchor tag of your website).
<intent-filter>
<data
android:scheme="myapp"
android:host="myapp.app" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
I would like to open an app (if its installed) when I click on the link on my webpage. I've implemented App Links according to official docs but the link is opened in Chrome and my app is not offered to handle the link. If I click on the link in Messages app for example, it works correctly. I think that it's some limitation of the Chrome but I cant find anything online about that. If I try to turn off the verification for App links and implement it just like regular deeplinks it does not work either. Do I need to implement Chrome Intent
s?
This is my intent filter
<activity
android:name=".MainActivity"
android:windowSoftInputMode="adjustNothing">
<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="mydomain.com"
android:pathPattern="/.*/app-microsite"
android:scheme="http" />
<data
android:host="www.mydomain.com"
android:pathPattern="/.*/app-microsite"
android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
</activity>
I'm putting the comment by Simon Marquis, that helped me, here as an answer to that question, so following visitors might see it more easily.
Deep links are not working if you're using relative links on the same domain.
E.g. you have this page: example.com/index.html
This will open in browser
This will open the app
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?