I am working on an application which has its own URI prefix. (dchub:// in this case)
Searching all over and read a lot but I got a bit confused.
Is it possible to start my application when someone clicks on a link starting with dchub://
in the browser?
So far found a lot of examples the other way around opening the browser from your app but that's not what I'm looking for.
Update
Thanks a lot, I've figured that, now I'm a bit stuck in the next part.
Uri data = getIntent().getData();
if (data.equals(null)) { } else {
String scheme = data.getScheme();
String host = data.getHost();
int port = data.getPort();
}
I got some nullpointerexception
s if I start the app normally, it works fine if I open from the webpage. So I thought lets include some check for nullvalue but that didn't solve it. any suggestions how I can start the app just by selecting it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…