Opera Mobile on Android doesn't open apps (doesn't respect intent-filter)
Asked Answered
G

1

7

I'm building a custom piece of software on Android for a customer who needs to integrate it with Opera Mobile specifically (not another browser). One of the requirements is that specific links opened within the browser are handled by our custom software. I know more than I ever cared to know about intent filters, that's not the question.

The problem is that Opera Mobile seems to be extremely stubborn about allowing the OS to handle links that Opera can handle itself. For instance, use any well-behaved browser (the default Android browser, Chrome, whatever) to search for "Google Play" on Google; now click on the first result (the Google Play website): depending on your extant settings, either you get prompted about which app to use, or the Google Play app is opened directly. Now try the same in Opera Mobile: Opera just opens the Google Play website itself -- this is obviously not desirable, since now you can't install apps, you can only browse the catalog.

Does anybody know any way to convince Opera Mobile to behave properly in this regard? I'm testing with Opera Mobile version 12.10.

Griffy answered 8/11, 2013 at 18:2 Comment(3)
I know it's a long time since but have you found a solution? I'm using Opera (V.43 already) but it still doesn't seem to respect the intents.Radiopaque
I'm not sure I remember exactly how I sorted it out, but I think I had to go down Ugly Way (tm) – I used a custom protocol; that it does respect, because it doesn't know how to handle it e.g. instead of registering foo.com and opening foo.com, I registered protocol myprotocol and asked it to open myprotocol://foo.com/. HTH. I now notice I had answered this same question back in 2015 – see my comment to the only answer below. This seems to pop up every other year, at least as far as I'm concerned. Interestingly, tomorrow will be 4 years to the day since I asked the original question.Important
Hah, at least I'm not alone with this. Thanks for your help!Radiopaque
R
0

Try to use intent urls instead default urls. Example:

default - "http://myhost.com/test"
intent - "intent://myhost.com/test#Intent;action=android.intent.action.VIEW;scheme=http;end;"

for more details see:

chrome intents

intent filters

Reider answered 15/5, 2015 at 13:40 Comment(1)
I didn't know about intents – but they're effectively identical to declaring your own protocol (e.g. gutza://myhost.com/test), in that it breaks standards and it doesn't degrade gracefully (think cross-platform). When I had this problem in 2013 I ended up declaring a protocol, because I couldn't find any way around (the customer really needed Opera). IMHO intent URLs are just as inelegant, with the only advantage that you can write intent URLs independently from the app (which would've been irrelevant for me at the time). Still, thanks for taking the time to answer, I did learn something new!Important

© 2022 - 2024 — McMap. All rights reserved.