Prevent browser from opening applications - android

I'm using soundcloud api and I'm trying to generate an access token from their OAuth2 authorization endpoint which is https://soundcloud.com/connect.
In the authentication process, I fire up an Intent to launch the default browser and go to the link specified above. The problem is, it automatically opens soundcloud's native app and shows a toast "There was a problem loading that URL" because the sc native app is set to open m.soundcloud.com and soundcloud.com URLs.
However, when I open the browser myself and enter the address manually, It works just fine without opening the sc native app. It is notable to mention that there exists an app on the store that opens the connect link above in the default browser without the native sc app popping up.
I was wondering if there is an intent filter or something to force the browser not to redirect to any 3rd party apps or to act as if I opened it manually without an Intent. I don't know if this makes any sense, but I hope you got the idea.

Related

Route from URL with parameters to my PWA in iOS and Android instead of opening in browser

I have links we will be sending out the users to install the PWA and open it in the app with parameters. Currently, when they click on the URL (if they have to app installed or not) it directs them to the browser and NOT the app. I think I might need to update the manifest, but I'm not sure where to target or send them so it opens in the app instead. This is my first PWA, and it's going well except this issue. This is a mobile app with React.
you should look about deep-link https://en.wikipedia.org/wiki/Deep_linking

Open an Android app from a web browser

I'm opening an app from a web browser in android and I can't seem to find the way to open this app outside the browser itself. I mean, the app opens inside the browser. I've tried both of these ways:
1) intent://pinnacle.androidApp/#Intent;scheme=launch package=my.androidApp;S.content=WebContent;end
2) my.androidapp://cb
What's the proper way to do this in order to open the app outside the browser?
Thanks in advance.
UPDATE:
My app consists of a native android app with a web view that loads an angular web app. I think that the web browser is opening the web app instead of redirecting back to the android app with the web view.
It goes as follows:
The user opens an android app with a web view that loads an angular web app. Then the user is supposed to log in. Due to some recent changes that google implemented, I can't log in with google from a web view, so I have to open a web browser, log in and go back to the android app. This latter thing is the actual problem. It only works properly if the browser that I use is chrome.
I can't use android to log in because I'm using custom authentication as well to provide access to other web services.
Register a URI scheme for your app and launch it by calling the URI somewhere as a link in your web page. This works 100%.

How to launch my app by typing the name of the app?

By clicking Link my of app on webpage it launch app properly. But I want when some one type name of my app in web browser it should launch my app instead of searching for app on google..
Currently I m doing this by using intent filter...
Actually I want when some type name of app in web browser "myapp_name:http://www.google.com" my app should launch and main_activity should get url(www.google.com or http:google.com) for further process.
There is no requirement for a Web browser to launch an app based on the user typing in a URL in the browser's address bar. In fact, I know of no browsers that support this, though some might exist.

Facebook In App web browser clears my browser cookies after 2-3 days

I have articles which are posted on Facebook for our subscribers and when a user clicks in one of the links they get re-directed to a mobile-site where they login, the problem is now after a a few days 2-3 days the mobile site asks them to authenticate again.
Im guessing Facebook in app browser clears my cookies but what i need to know is how does it manage its cookies especially for external sites. I tried the Facebook developer website there's no documentation on how this in app webview/browser works.
Background Info
Facebook in app browser is rather a webview which renders all the links which user's browse so instead of delegating the rendering to an external browser it handles everything on its own. This comes with limited functionality of course, Facebook added this in app browsing functionality to keep user's in session, because most of the time if user's make use of external browsers they don't come back into the app.
With the above background information Facebook browser is accessible to developer's in a sense that they may choose to use Deep-Linking if the browser doesn't conform to their specifications because the browser is closed i.e you can not modify or rather interact with it, thats why the deep linking functionality allows for developers to give user's an option to choose wether they wish to use their app this is if they have it installed in their mobile devices.
Cookies
Cookie management entirely depends on the In-app browser which if a user wishes to clear them then they can do so via their app settings. Since Facebook in-app browser manages its own cookies thus if a webpage is rendered by the in-app browser it will entirely depend of the in-app browser if its time to clear them from the device.
Deep Linking Overview
App Links is an open standard to deep link to content in your app. When someone using your app shares content to Facebook or another App Links-enabled app you can create a link that makes it possible to jump back into your app from that piece of content.
App Links work by adding metadata to existing URLs on the web so that they can be consumed by your app. If your app doesn't have a web presence with content you can annotate, you can also use a Facebook-provided service to host the data.
The Facebook's app for iOS and Android support App Links today. When the Facebook app comes across a link that supports App Links it will launch your app with the right information so someone can see the content immediately and quickly.
How App Linking Works
A person clicks on a story on Facebook
If someone shares a story on Facebook with content from your app, people can click on the story to view the content in your app. The URL shared to Facebook contains App Link metadata or be a Facebook-hosted URL.
Facebook app looks up the URL to see if it supports App Links
Once someone clicks on a story, the Facebook App does a lookup to see if the content supports App Links. if it does, the Facebook App takes people to your content, either in a web view or by launching your app and linking to the content, depending on the following criteria:
Whether people have your app installed
Whether the device is and Android or iOS device
Whether your app is mobile only
App Links has the following requirements:
If the content is a web page, your web page must include markup to let the app know what app should be launched.
If the content is mobile only, you must still supply a valid http(s) URL that hosts the App Link metadata. Facebook provides a Hosting API for App Links to make it easy for app developers to support App Links content without having to set up a web server.
In order to accept incoming App Links, your app will need to be set up to support them. We cover how to do that for both iOS and Android.
Launching Outbound Apps
It's possible for any app to do what the Facebook app does and add support to launch other apps based on App Links. If you've got an app where people want to click through to links instead of just going to inbound links, we've also provided a document that covers how to add support for the outbound navigation protocolto your app.

Checking if the right instance of an app is running locally _before_ presenting a link in a webpage

I’m creating an application that at some point requires the user to confirm their email address or phone number. For confirmation purposes a link is sent to the user. Naturally, user can switch to another application on their iOS device to open the link or they may use another device to do so.
I would like to implement some method for detecting if the user opened the link on the same device that app is running and if so initiate a redirect back to the app to resume the process (app is registered as a handler of a specific URI scheme). In case user opened the link on another device that has the same app installed I don’t want the redirect to happen.
Is it possible from the context of Safari JavaScript to find out if the page is being open on the same device that a certain instance of app is running? (The app could be and is likely in background so I don't suppose running an http service in it would be of any good)
I could open a special page from the app that would drop a cookie that later can be detected but that wouldn’t be nice since user will have to see browser flicker even if for a second (before the page redirects him back to the app)
Are there any good solutions to this problem in the post UDID ios world?
Is this any easier on android?

Categories

Resources