Can a link on a site open an Android app? - javascript

Can I set a link on my site so it will open certain Android app when clicked?

This depends on whether or not the app you want to open is capable of handling a link. If the app has an appropriate <intent-filter> then it could be launched through a link. For example, the Google Play app has a filter for all play.google.com links, and gives the user an option to choose between the browser and Google Play when the linked is clicked.

Related

How to open a mobile or desktop app with JavaScript from the browser?

How to open a mobile or desktop app with JavaScript from the browser?
A perfect example of what I want to achieve is what Whatsapp and Telegram do when they manage to run their mobile or desktop apps after a click on a website button.
Whatsapp (A click on Continue to Chat will open the WhatsApp app);
Telegram (A click on VIEW IN TELEGRAM will open the Telegram app);
Use Windows.open(app://,"_blank","location=yes)
Example:
Open Telegram group
<script>
document.querySelector("a").addEventListener("click", function(event) {
if (navigator.userAgent.match(/(iPad|iPhone|iPod)/g)) {
event.preventDefault();
location.href = this.href;
}
});
</script>
This code creates a link with the URL tg://resolve?domain=my_group_username, which is the URL scheme associated with the Telegram app. When the link is clicked, the Telegram app will be opened and the user will be taken to the specified group.
Note that this code is specific to the Telegram app and will not work for other apps. Each app has its own custom URL scheme, and you will need to consult the app's documentation to determine what it is and how to use it.
eg: Open the url such as https://t.me/publictestgroup , then open the devtools, check the Elements, click the 「Select an element in the page to inspect it」, choose View in Telegram, and you can see the flow:
<div class="tgme_page_action">
<a class="tgme_action_button_new shine" href="tg://resolve?domain=publictestgroup">View in Telegram</a>
</div>

How to launch an android app from website

I have an android application, which I want to launch from the website.
Here is the condition: If user had installed that app previously then give the option to open it, if not then go to the play store.
I used this code in my website:
Click me
It is working fine.
Now what I want that when a user searches my website on Google and the link appears, if someone clicks on that link it will open the app.
As well as this code:
Click me
is not working if I put this into a function like:
launchApp:function(){
$window.location.href='myapp://link';
}
this is not working.
How do I fix these issues?
Create an Intent filter for the main activity/ the activity which you want to open, something like this: https://stackoverflow.com/a/31404717/7527995

Branch.io deeplink not working in my browser

I created the link in the branch.io dashboard. https://app.zebpay.com/zFAzt88rcT but the link is not working when i opened it in the browser.
I also tried the journey mobile banners they also not changing the button text to the open when I already installed the app on my mobile.
I already added the web sdk code on my website.
The link does not seem to be a valid branch custom link. Please contact integrations#branch.io to troubleshoot this domain and link.

Cordova - Issue navigating some links in a Confluence/Gliffy diagram opened with InAppBrowser

I am building a Cordova Application that allows to browse an Atlassian Confluence site containing navigable diagrams. My diagrams are built with Gliffy and I want to navigate from one page to another via clickable diagram elements. I realized such navigation structure and it works fine in browsers. You can check it out at this link (click on M_Function).
In my Cordova app I am using InAppBrowser and, after a login screen, I am redirecting to a page of my mobile-oriented website (again, an Atlassian Confluence site) this way:
var ref = cordova.InAppBrowser.open('http://51.255.206.207:8090/pages/viewpage.action?pageId=1245261' + page, '_self', 'location=no');
On my website, I have menus and diagrams. When I click on menu items, everything works correctly, but when I click on the clickable shapes from the diagrams, I get an error (the page does not exist).
What's wrong with Confluence/Gliffy links? What's the difference between the app and the browser?
Or, at lease, how do I get to know the URL I am trying to reach from the app?

web app opening external URL without leaving web app

I have a web app. The web app is added to home screen on iPhone. I have many external resources(Links) in my web app. Every time a link is clicked, it opens the web browser because target is set to _blank and there is no way for the user to go back. is it possible that the user will be able to open any of these resources without leaving my web app?
I was thinking of doing the following:
creating an iframe and have the links open within that iframe. I am hoping that there is something better out there.
If you still not sure what is it that I want?
a good example would be, if you look at facebook's native app for iPhone when you click on an article that someone posted, it opens the link within a frame that allow you to go back to your last page. In other words, you never leave their app. I understand that it is a native app and it is completely different but I believe that with JQuery Mobile or just JQuery it is possible. Am I wrong?

Categories

Resources