Setting default browser on Xiaomi MIUI phones - android

I am building a browser for Android and cant get set default browser to work for Xiaomi MIUI phones.
I realised that no other browsers made this work either. The default dialog pops up and I select my browser and tap always, but it fails to set it correctly and falls back to OS default browser.
Since other browsers cant do this either I gave up the idea and now thinking on sending the user to the right settings menu instead for manually setting it. (There is a settings menu for setting default browser in MIUI thats works when doing this manually)
Does someone know the intent for opening this menu from my app?
I cant find a complete lists of extra intents available.
What I found is the following list but it does not have anything for default browser settings menu.
https://github.com/ChameleonOS/miui_framework/blob/master/java/miui/content/ExtraIntent.java

Related

How to customize Android 10 (Samsung A10) Chrome Share menu (from mobile Chrome0?

I used to be able to override a flag in Chrome to hide the default share screen, thus giving direct/one-tap access to all the apps on my phone, but the option appears to be done now with Android 10.
I guess it could be sharing from any app on my phone, not just Chrome.
Any other way to do this?
Thanks.

WebAPK ignores display:standalone flag for PWA running on local network

I am developing a PWA for which I want to have "add to home screen" (a2hs) functionality in standalone display mode.
During development, my PWA is running on a server which is accessible from within my local network only (not from outer internet).
When testing a2hs on Chrome for Android, I encounter the following strange behavior.
Simple add to home screen
When my PWA is added to the home screen as a normal shortcut, then everything works fine. Clicking on the shortcut will open the PWA in standalone display mode (without Chrome UI visible).
Advanced add to home screen (WebAPK)
When the PWA is added to the home screen as a WebAPK shortcut, then the standalone flag in my web manifest is ignored. Clicking on the shortcut will open the PWA within a browser tab (with Chrome UI visible).
What could be the reason of this incorrect behavior? My guess is that Google's servers need to be able to access my PWA's manifest in order to properly assemble the WebAPK. Since my manifest is not accessible from internet, the WebAPK is not correctly assembled. This is just guessing though. Can someone confirm or describe the reason for this strange behavior?
If you are using a custom port, try using the default port.
Others have reported the same odd behaviour.
This issue was fixed by using the default port.
PWA deployed in node.js running in Standalone mode on Android and iOS
Your PWA can be in complete private network(we have one) and still work as an installable (WebAPK) PWA.
Only reason you would be seeing the Chrome UI is, one of the PWA criteria is not met.
Run lighthouse report and make sure everything under PWA is passed. Post your audit report if you need help with it.

Android Samsung clear default app opening

I have an app which open urls via app links. In some cases I need to open external browser, because I cannot resolve link.
If user select always open my app and I need to open external browser - I clear app defaults by this:
activity.getPackageManager().clearPackagePreferredActivities(MyPackageUtils.getPackageName(MyApplication.getContext()));
This causes, that chooser dialog open again.
I test it on 5 devices, on 4 everything is OK.
But on Samsung Galaxy S6 with android 6.0.1, dialog don't appear.
And in app detail I see "Go to supported URLs" -> "Via this app".
If I install app, default settings is "Always Ask".
And clear defaults button always has clickable set to false.
Is there any way to set "Go to supported URLs" back to "Always ask"?

Disable default Android browser

Is there a basic example showing how to disable the default Android browser on a Samsung Galaxy S6, MDM or otherwise, without root permissions? I’ve already tried the basic profile example; however, it does not encompass what I need.
If you go to
settings>apps>(all tab)>Browser>Click "Disable"
you won't have to ever answer if you want a link or anything to open in Browser or Chrome. It will act like Browser isn't on your phone and default to Chrome.

Appium: Home page is always set to default on android default browser

When I open default browser using Appium, instead of given url, it opens default home page. Never mind if I set the home page to blank page, or something else. It works fine when opening browser manually, but when appium opens it, it is again set to default page.
I tested 2 devices with Android 4.1 and I always get the same issue on both.
This issue does not happen with Chrome browser.
Has anyone had this problem?
If you want to work with the stock Android browser using Appium, i suggest you run your tests on an emulator instead of the real real device.
Appium is compatible with Chrome on real Android devices but you can run the tests on the Stock Android browser if you use an Emulated device.
I have tried it out and it works.
Cheers

Categories

Resources