Opening a desktop shortcut on IOS (ipad) via JS - javascript

thanks in advance for any help.
I am wanting to know if anyone has tried or if it is possible to open a desktop shortcut on an ipad from within another app on the Ipad.
To elaborate I use an app called ServiceM8 of which I can use JS to create an add on. My addon is a webapp and I simply want to open the webapp. I can open it as a url in a new safari window however this doesn't allow me to hide the address bar.
By making the webapp a shortcut on the device I can remove that address bar which is much better for user experience and which is why I want to open the shortcut rather than have serviceM8 open it in safari.
I hope this makes sense and someone can shed some advice.
I have searched the forum and couldn't even find one case that related to the question I am asking.

A web app is essentially just a URL. It isn't a fully-fledged app and can't register a custom URL scheme. This means that it is not possible to launch it from another app or web site; the URL will just be handle directly by the default application that handles http(s) urls, which is Safari.

Related

Detect apple's forced phantom banner in JavaScript

I'm not an iOS developer, and know little less about Safari's configuration by apple.
But Please, hear me out.
I have universal links configured, and I understand that if the App is installed, visiting the website with Safari browser will automatically show a phantom banner to open the page in the app. This seems one of the policies apple included in their Universal Link settings.
Image below shows an example of the Phantom banner
My question is: How can I detect the presence of this Apple's Phantom banner through JavaScript?
To be precise, currently, there is no way to detect the Phantom banner if the universal link is enabled in safari.
You cannot remove it through JS also it has no presence in the DOM.
Try integrating a 3rd party plugin like Firebase or Branch.
I tried firebase hoping it can resolve the issue and below is a summary.
It will create a dynamic link to your webpage which is nothing but a wrapper on your deep link.
But with that you will lose the ability to click on your webpage link and open the App, instead, you will have to use the dynamic link to open the App.
The Dynamic link can be on your domain or on a custom domain.
Here is some more information on domain configuration
https://firebase.google.com/docs/dynamic-links/custom-domains
In my case, the ask was to link directly to the website link so this did not help much. But if the ask is to open the App on a link click then it can help as the Apple App Association file will not be on your domain and you will not see the phantom banner.

how to force links or pages to open outside of facebook inapp browser?

First of all there are few posts already but with satisfactory answers so i am posting the same issue again hoping for the solution
Force links to open outside facebook's inapp browser
Open website link outside of Facebook app
The problem is when the user clicks on a website link posted on facebook clicking on the link will open the site in facebook in app browser. I want to detect that the site was opened in facebook's in app browser and then if so force the site or page to open in external browser. I want this ability because there are many things that dont seem to work in facebook's in app browser. I appreciate any input! Thanks!
This is not something you can (reliably) detect.
Even if you could, I'm pretty sure there's no way to force the site to open in the device's browser, instead of the in-app browser
Here's an answer that worked for me, using Firebase Dynamic Links. It works for Android but not iOS.
I needed this solution so I could upload documents in the messenger in-app browser but couldn't on Android devices.
https://stackoverflow.com/a/56143217/3664100

Check if app is installed from webpage

I have an iOS and Android app and I'm building a corresponding website. I would like that the webpage, if opened using a mobile device, opens the app or its corresponding app store page (without using Facebook app links).
On the app side everything is working, including the url schema.
Does someone know how to implement this procedure, without external services, using HTML and JS?
Thanks in advance for your help.
To be honest, this is kind of a pain to implement on your own. There is no easy way to handle everything without a ton of nasty edge cases, most notably the 'Cannot Open Page" error users will see if they don't have your app installed. Until iOS 9, a reasonable basic implementation was putting a JavaScript redirect like this into a dedicated redirect page on your site:
setTimeout(function() {
window.location = "https://yourdomain.com";
}, 25);
// If "yourapp://" is registered, the user will see a dialog
// asking if they want to open your app. If they agree, your
// app will launch immediately and the timer won't fire.
// If not installed, you'll get an ugly "Cannot Open Page"
// dialogue and your fallback page will open when the timer expires.
window.location = "yourapp://";
Unfortunately this would still show a 'Cannot Open Page' error, but until recently it was possible to get around this in a reasonably user-friendly way by using a more nuanced version of this script. Sadly, Apple intentionally broke that with the iOS 9.2 update, so custom URL schemes are actually pretty much useless for deep linking now, unless you are certain the app is already installed on that device.
Apple is obviously trying to push the newer Universal Links standard as much as possible. Universal Links lets you use a normal http:// URL to a page on your website (the page could be a simple redirection to your desired fallback webpage without the custom URL trigger that causes the 'Cannot Open Page' error), which is intercepted by your phone and sent directly into your app if installed.
This is quite a lot to handle, so the best option might be a free service like Branch.io (full disclosure: I work with the team) to take care of all the technical aspects. You can find examples of apps using the Branch service here.

WeChat share button

I am trying to find out if it is possible to create a share button on a website that shares to WeChat.
So just as you would with Twitter or Facebook to share a message or link back to the social network.
Has anyone managed to do this? Or has anyone confirmed that it is not possible?
thanks!
You can use the AddThis service to embed a range of share buttons, including WeChat.
It doesn't seem to support opening the WeChat app with a pre-populated message (like when sharing to Twitter/Facebook) - probably because the WeChat app doesn't support this - but works around it in two ways:
On Desktop: clicking the share button displays a QR code which the user can scan using their mobile device
On Mobile: tapping the share button displays a share URL, a button to easily copy the URL, and another button to open the WeChat app. The user needs to still perform a couple of steps manually, but it's about the easiest it's gonna get.
Hope that helps.
They publish an APK for Android and iOS that allows you to do this from another native app.
As far as I'm aware, WeChat, like WhatsApp, does not support any web browser access so I don't think it's possible.
http://dev.wechat.com/wechatapi
Perhaps somewhere in the API you can create a share button on a website that opens the Android or iOS apps, but I don't think any WeChat access is possible from the desktop.
The answer in this SO question should help you WeChat sharing, how to change re-share description and thumbail?. It refers to a Javascript API WeixinJSBidge http://mp.weixin.qq.com/qa/index.php?qa=3163 with the documentation in Chinese but the code is still readable. Hope it helps you!
I have tried to implement the integration of WeChat on Meteor before. The questions are:
1. Did you have the correct package ID and signature?
2. Did you get approved from WeChat and get the WeChat App ID?
I follow the tutorials and get my app work here: http://blog.sanuker.com/?p=691
Hope it helps! Good luck.

Save site as a mobile shortcut android

I spent a lot of time to search for solution but without result.
I check this topics :
Website Bookmark/ Shortcut Icon for Android Help. Cant get passed standard ribbon icon
Whick is very nice ,but here user must click on bookmark.That`s not what i need. May be button,or automatic script that prompt user for this and created automaticaly.For example something like this :
http://socialmedia.biz/2012/02/21/encourage-visitors-to-save-your-site-as-a-mobile-shortcut/
But it`s work only on Apple devices .. What im looking for is a similar solution for android.
Is this possible at all?
May be the only solution is to create simple app that act like a shortcut to my web page?
The page that is talking about has a mobile version ..
Have you looked here [for Chrome]? https://developers.google.com/chrome/mobile/docs/installtohomescreen
May be the only solution is to create simple app that act like a shortcut to my web page? The page that is talking about has a mobile version ..
If this is "allowed" and doesn't go against too many guidelines, this might be your only option. Basically you'd want to create a one Activity application and all it does is call the default Intent for your web page. This should push the user into the default Browser.
You could put the app in the Google Play store and link to it from the site or a script. I'd call the app something like "SITE_NAME Web Shortcut" and make it clear in the description that the only purpose is to launch the browser -- as previously mentioned this doesnt "feel" like something that should be in an app store, and if users think they're getting something extra you'll definitely get bad reviews.
(I'd also make the Activity with #style/Theme.Transparent)
Please be aware that Chrome has changed the way that installs web apps.
Here are the details: https://developers.google.com/web/updates/2018/06/a2hs-updates
There is an install criteria now:
The web app is not already installed
Meets a user engagement heuristic
Be served over HTTPS
Includes a Web App Manifest that includes:
short_name or name
icons - must include a 192px and a 512px icon
start_url
display - must be one of fullscreen, standalone, or minimal-ui
prefer_related_applications must not be present, or be false
-Registers a service worker with a fetch handler

Categories

Resources