문제

I'm no Android-Developer but I need to know what happens, if two applications register the same URI schema (e.g. by using an intent-filter). Is that possible at all?

In iOS it is. Multiple apps can register for the same URI schema. It can not be predicted which app will be launched when that schema is called. To make things worse, the app that is launched "consumes the event". So no other app will be noticing anything.

Background of my question: I'm working on a "secure" concept for the implicit flow in OAuth 2.0. This flow includes a redirect (comming from the server) to a URI schema. Unfortunately, I can't use a WebView in the app, because the app mustn't have any possibility to gain access to the users credentials.

도움이 되었습니까?

해결책

Is that possible at all?

Yes, at least for activities. When something tries to start an activity matching the scheme (and rest of the <intent-filter>, the user will get a "chooser" window, showing all possible activities, from which the user can choose.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top