Linking to external android apps through html - android

I'm a First time developer who is developing a basic WebView based app for android devices. I have some links that lead to profiles on facebook, twitter & instagram etc. At the moment whenever these links are clicked the relevant profiles open but in website form and not app. How can I make these links open the relevant app instead of the website. For example whenever I click on instagram it loads the mobile website for instagram instead of launching the actual app. Also if I have a telephone number set using href="tel: how can I set it to launch the phone app with the telephone number filled in. Sorry if these are stupid questions but I am very new to app development and am still learning. Many thanks for your time.

You will need to use the application specific URL schemes:
A good read on what this is:
https://fokkezb.nl/2013/08/26/url-schemes-for-ios-and-android-1/
Once you understand what this is you will need to do some research to find the URL scheme and correct url for every app you want to target
Example: fb://profile/
Phone number this might work: 2125551212

Related

Convert android deep link phone call saved as a shortcut into html anchor

Tl;Dr: I need to open deep link connected to a phone call from html page on Android. It MUST be the deep link, not the "tel:..." Url.
I've made simple mobile-friendly html page, with openstreetmap, showing gates around my residential block. Any gate could be opened by calling specific phone number, so, I've added map points, each having open link, that get opened by my android calling app (Google Phone), and gives ability to open the gate which is near me (on the map).
This solution is simple and workable, but it requires too many interactions, also, from time to time, after Google phone got open from the tel: link, the phone number isn't entered in the dialer (some kind of bug).
With specific command in Google Phone menu, I've created desktop shortcuts with the same numbers, and they are making the call by a single finger tap.
Now, I want to combine this two methods, as shortcut on Android desktop should be using some kind of deep link to the call app, but I don't know how to get the link that is used in shortcut.
Are there any tools/methods to see the actual deep links used to create shortcut, and use it in my html application to make it open immediately without opening Google call app dialer?
Googled a lot, tried different tools but no luck

Get referring url for Android or iOS installation

We have several landing pages that link to Google Play and iOS App Store. I would love to know the landing page that a person came from within the app code. I have searched around and can't find any clear answer. Lots of gray area.
I just want to access the landing page URL in Java or Swift.
I realize iOS and Android are two separate beasts. But does anyone know how I could achieve this?
You will need to use Firebase Dynamic Links this helps you create various links using various alternatives as shown in this quote from the official Firebase source:
You create a Dynamic Link either by using the Firebase console, using a REST API, iOS or Android Builder API, or by forming a URL by adding Dynamic Link parameters to a domain specific to your app.
Then your app can access the link in code using Java or Swift and the link will work even if the user has your app already in their phone and you can set a logic to handle that too and the links are also automatically direct the user to AppStore or PlayStore depending on which device is used.
Dont worry about whether the link will work for both Android and iOS and you can use the api to access the link as this quote says.
With Dynamic Links, your users get the best available experience for the platform they open your link on. If a user opens a Dynamic Link on iOS or Android, they can be taken directly to the linked content in your native app. If a user opens the same Dynamic Link in a desktop browser, they can be taken to the equivalent content on your website.
In addition, Dynamic Links work across app installs: if a user opens a Dynamic Link on iOS or Android and doesn't have your app installed, the user can be prompted to install it; then, after installation, your app starts and can access the link.
You can get more information on dynamic links here and check if it will solve your problem.

Manually open hyperlinks in specific app in Android

I use the Twitter app to follow a lot of news outlets. Each one of them posts links to articles on their websites. I want to open those articles in the news outlet's dedicated Android app. Some of them, like the NYTimes app, does it by itself. But most of them don't. I'm figuring that's because they haven't declared an intent in their app to do so. So basically I want to write an app that would give me an option to redirect the hyperlink of the article to a specific app, and I want to do it for multiple apps. Would it be possible to create a regex that would run on the URL and redirect it to the proper app accordingly?
Would it be possible to create a regex that would run on the URL
That is impossible to state in the abstract. Android's <intent-filter> system does not allow for filtering on all parts of a URL.
and redirect it to the proper app accordingly?
That is impossible to state in the abstract:
There is no requirement for the app for a news site to have any means for outside apps to tell it what to view
There is no requirement for an app's developers to document how to convert a Web site URL to whatever input would be available to tell the app to go view something
So, what you want may be possible for some news apps, but the details would vary by app.
Not that I am aware of - though this is an interesting concept.
Here are some things to know:
the twitter app doesn't care how the intent is resolved. the purpose of the intent is to share external data. once the twitter app has handed over the intent with the url it is up to the android system to decide which app can resolve.
the NY Times app is capable of opening because of this feature: https://developer.android.com/training/app-indexing/deep-linking.html
Workaround:
Learn to develop your own Android ROM to modify the Android Open Source Project adding your logic for intent resolution, compile and get your new Android ROM ready for deploy, install ROM on phone, keep your fingers crossed the entire time.

How to interact with website from android app

I am trying to interact with a website from an android application. More specifically I am trying to login to my online depot and retrieve different data like balances, profit/loss on current day and so on because I don't want to log on to the webpage manually every time I want to see how my stocks are doing. Unfortunately my bank does not have an android app for those purposes.
What I want is an app that automatically retrieves the information from the website and shows it as an notification. So I need to open the website, login with username, password and cookie and then find specific elements (e.g. by css selector).
So far I only achieved something similar with selenium webdriver on windows. Since selenium does not run on android I have to find another solution.
What I have look into so far:
HTMLUnit (not running on android)
HttpURLConnection + JSoup (not sure if this allows me to simulate clicks on specific buttons...)
Robotium (can it only be used for testing apps or also for my purposes?)
Are there alternatives? Can this be achieved with one of the listed tools?
Any ideas are appreciated. Cheers!

Android App for mobile website

I'm looking to build an android app based off a mobile site. Basically, I just need an app with a browser that I can use as a platform.
Many of the "build an app online" sites offer this, where you just put in the home url etc, but they all include their own ads etc.
Any ideas where to start?
If you want to make your own simple app without Ads, use just a WebView inside of a simgle activity layout set to fill the screen.
Doing this you will eliminate all ads, as well as have the ability to add in more features later on if you so choose.
If you just want to create a launcher icon that will open up the default browser to your sites page, you can do that by just starting a browser intent, and then closing the actual app.
This will allow you to have an app icon and play store listing, however the only thing that iw will do is bring the user to your website like you have mentioned.
Create an Activity with a WebView.
I think you're looking for an app that displays a WebView. However, that will only display the website as if you were looking at it in a mobile browser such as Android Chrome.
If you want the data from a mobile site, without anything else, then you have to hope that the site provides that, or you have to download its HTML and scrape it.

Categories

Resources