Minimum Chrome version for TWA - options? - google-chrome

I have a Trusted Web Activity app that is displaying a Progressive Web Application by using the Android Browser Helper. The documentation and code indicates that the mobile app only runs properly when the Chrome Browser is 72 or above. The address bar is visible when the Chrome Browser is outdated. I believe I have the option of a Webview-fallback but I prefer not to use Webview as some of the app's functionality is incompatible with Webview.
While testing, when the Chrome Browser is updated on the same device, the trusted web activity runs without any issues.
What options do I have where the address bar isn't visible?
Is the min SDK the only way to set the minimum browser requirements or can I explicitly set a min Chrome Browser version in the Play Console for the app before the user downloads it? (which prompts the user to update the browser before installation)
Thanks in advance!

It's not possible to set a browser version requirement on the Play Console.
Besides falling back to a WebView, or showing the application with the URL bar, the other solution would to block the application from loading and ask the user to update / install a browser that supports Trusted Web Activity.

Related

Progressive Web App (PWA) redirect page into standalone mode

I have PWA and I can run it as standalone (if user clicks icon on a device) or I can run as normal website (if user enter URL directly into web browser).
Is it possible to redirect page (open as standalone) if user open it as non standalone?
My manifest file already contain standalone parameter:
"display": "standalone"
I need something to start with.
As far as I know you need to "install" the pwa on the user device first.
By clicking the icon on the device (meaning you already installed the app there) you open the PWA that will be rendered as described in the web manifest (standalone in your case).
If you wouldn't have already installed the pwa on the device, you would have the same behaviour you are getting on your desktop by accessing the web site with the browser.
Let me know if I misunderstood your question.
UPDATE
The answer to your question (in the comment) is no (from a desktop browser). Chrome on an Android device uses/opens directly the PWA version, if installed of course. This is due to the Android Intent Filters that enable this.
But this is not the case from a desktop browser, where the user accesses the web site by entering the url manually. Maybe in the future it might change, but at the moment it is not possible.
In Chrome on desktop, if the PWA is installed and the user opens the app in the browser, there's a "To open this link, choose an app" link at top right on the address bar, between the password manager key and the bookmarks star - you could point that out to the user. Clicking that link offers a button to open the PWA and close the browser tab.

User Agent not working

I'm trying to load http://m.zara.com from my desktop browser. I have tried with Chrome developer tools to change the user agent to mobile. I have also installed User-Agent Switcher plugin for Chrome without any success. For some reason it is always redirecting to the desktop version.
Why is this not working? How could I manage to do this?
Checkout the link here
Try to download user-agent extension in chrome browser and then you can use the online parsers available in this blog.
There by the simulation of browsers can happen for cross browser access.

Silverlight Display Mixed Content crashes IE

So, I have an HTML page that includes a Silverlight xap file which plays a video. It works correctly while running locally and on our DEV environment when using Chrome or FF. The issue is when I am trying to view the video on our DEV environment using Internet Explorer. When doing so, it prompts me to Display Mixed Content. Whether I hit Yes or No, the browser crashes. I am able to go into my options and Enable Display Mixed Content, which fixes the issue and the video shows up correctly on the DEV environment using IE. But, this is not a good solution for a client facing site. Is there a way around this message to prevent it from crashing the browser?
A workaround for this is to use JavaScript to open the HTML page that contains the video in a new window. The user will still be prompted to Display Mixed Content, but it will not crash the browser and the video will play.

Does mobile Google Chrome support browser extensions?

Can I create a plugin or an extension for Google Chrome MOBILE (Android Google Chrome)?
If not, can I create an extension for Google Chrome (desktop), which will add a button in Google Chrome bar. This button will open the page in another web browser (in my own web browser), so, this button should launch my own web browser.
Extensions are not supported, see: https://developers.google.com/chrome/mobile/docs/faq .
Specifically:
Does Chrome for Android now support the embedded WebView for a hybrid native/web app?
A Chrome-based WebView is included in Android 4.4 (KitKat) and later. See the WebView overview for details.
Does Chrome for Android support apps and extensions?
Chrome apps and extensions are currently not supported on Chrome for
Android. We have no plans to announce at this time.
Can I write and deploy web apps on Chrome for Android?
Though Chrome apps are not currently supported, we would love to see great interactive web sites accessible by URL.
You can use bookmarklets (javascript code in a bookmark) - this also means they sync across devices.
I have loads - I prefix the name with zzz, so they are eazy to type in to the address bar and show in drop down predictions.
To get them to operate on a page you need to go to the page and then in the address bar type the bookmarklet name - this will cause the bookmarklet to execute in the context of the page.
edit
Just to highlight - for this to work, the bookmarklet name must be typed into the address bar while the page you want to operate in is being displayed - if you go off to select the bookmarklet in some other way the page context gets lost, and the bookmarklet operates on a new empty page.
I use
zzzpocket - send to pocket.
zzztwitter tweet this page
zzzmail email this page
zzzpressthis send this page to wordpress
zzztrello send this page to trello
and more...
and it works in chrome whatever platform I am currently logged on to.
Some extensions like blocksite use the accessibility service API to deploy extension like features to Chrome on Android. Might be worth a look through the play store. Otherwise, Firefox is your best bet, though many extensions don't work on mobile for some reason.
https://play.google.com/store/apps/details?id=co.blocksite&hl=en_US
Just use a different browser.
Follow the steps given below to install Chrome extensions on your Android device.
Step 1: Open Google Play Store and download Yandex Browser. Install the browser on your phone.
Step 2: In the URL box of your new browser, open 'chrome.google.com/webstore’ by entering the same in the URL address.
Step 3: Look for the Chrome extension that you want and once you have it, tap on 'Add to Chrome.’
The added Chrome extension will now be automatically added to the Yandex browser.
I imagine that there are not many browsers supporting extension. Indeed, I have been interested in this question for the last year and I only found Dolphin supporting add-ons and other cool features announced few days ago. I want to test it soon.

How to use chrome extension methods in my asp.net page?

I have page where RSS icon is present. I want that when user clicks on RSS icon it will check in chrome browser that, whether that RSS reader chrome extension is installed or not
I am trying to achieve this by using chrome extension methods, mentioned here.
I tried something like this but it is not working:
var port = chrome.extension.connect("nlbjncdgjeocebhnmkbbbdekmmmcbfjd");
To use this API you need to be either an extension or a web application having the necessary permissions - normal web pages cannot access it. However, detecting whether an extension is installed in Chrome is still easy:
<script src="chrome-extension://nlbjncdgjeocebhnmkbbbdekmmmcbfjd/manifest.json"
onload="alert('installed')" onerror="alert('not installed')"></script>
This uses the fact that the extension's manifest.json file is located under a predictable URL and that web pages are allowed to load this URL. Of course, this isn't an officially documented approach but rather a loophole and a privacy issue. So be prepared for it to stop working in some future Chrome version. At the moment it works however.