-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding "default browser" inside Leon for quick "open" action #186
Comments
Hello @serrq, I don't quite understand your feature request. If you have multiple browser installed, when clicking the "open" button there should be a share dialog where you can select the desired browser. Usually you can select between "open once" or "open always" (making this browser the default). This is the standard behaviour of Android and does not have anything to do with Leon. On more modern Android OS versions there is a dedicated system setting for the default browser which Leon will stick to. Again, this is just the standard behaviour when sending an Intent to the system. |
As for the default from the OS for the system browser I chose Leon, so every time I click on a url Leon intervenes, and it places itself on "Do nothing" because I chose this action. But when I click on "open" nothing happens despite I have three browsers installed. Is it a bug or is it what you expect your app to do? |
Interesting. This is a bug. I will have a look into it. |
Android 13 |
I think it’s a logical problem. Let’s try to reason together: when the operating system asks me which browser I want it to be by default I choose Leon, but Leon never asked me which browser I want to match to the "open" button, so at most Leon can only call itself, because it is the default system browser (in my case). Do you understand the problem where is it? Leon calls itself, instead it should ask me which browser I should use on the outgoing. |
Yes, I understand the problem. I just need to think about a solution 😉 |
Being able to set Leon as the default browser would be super convenient. Leon would immediately sanitize the URL and transfer the intent to the actual browser (chosen by the user). |
Hello all, after thinking about this a bit more unfortunately I must say that this is not possible. Once Leon is set as the default browser, it's not possible to open another browser when clicking "Open". It is a (deliberate?) limitation of the Android operating system. Once a default browser is set, the system won't let you choose another browser when opening an URL, even if you explicitly ask to do so in code. The only solution you have is to copy the cleaned URL and manually paste it into your browser. I'm sorry! |
@svenjacobs Would it not work to call the chosen browser activity directly? Users could then either choose from a list of installed browsers (you can maintain a whitelist of known apps that are browsers), or manually write the full intent name. |
Querying for installed browsers is not possible as I have mentioned here. I would have to maintain a list of known browser packages. I would have to keep this list up-to-date. I would have to manually query if one or more of these browsers are installed. I would also have to build my own chooser dialog to select the desired browser where the link should open. All in all I think this is a very fragile and high-maintenance solution 😞 |
@svenjacobs Would it work if the device is rooted? |
Maybe, I don't know. |
@svenjacobs I believe this isn't correct. OLW does this very well, a certain bug notwithstanding. |
This is how they do it. The error in my case was that I used |
It needs of "exit browser" default setting. Because after I click the "open" button Leon must pass the cleaned URL to default browser.
The text was updated successfully, but these errors were encountered: