Actually Google did deprecate that function since Google Chrome version 25
Other way to do it you can use Android Intents like this in your url :
<a href="intent://read/#Intent;scheme=magzine;package=com.magzine.nu;end"> Will open magzine app</a>
and then set the manifest like this
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="magzine" android:host="read" android:path="/"/>
</intent-filter>
For more complete reference you can take a look at Zxing manifest (which is recommended by Google)
And then for parsing part you can take a look at Intent Source Code
especially this part :
/**
* Convert this Intent into a String holding a URI representation of it.
* The returned URI string has been properly URI encoded, so it can be
* used with {@link Uri#parse Uri.parse(String)}. The URI contains the
* Intent's data as the base URI, with an additional fragment describing
* the action, categories, type, flags, package, component, and extras.
*
* <p>You can convert the returned string back to an Intent with
* {@link #getIntent}.
*
* @param flags Additional operating flags. Either 0 or
* {@link #URI_INTENT_SCHEME}.
*
* @return Returns a URI encoding URI string describing the entire contents
* of the Intent.
*/
public String toUri(int flags) {
StringBuilder uri = new StringBuilder(128);
String scheme = null;
if (mData != null) {
String data = mData.toString();
if ((flags&URI_INTENT_SCHEME) != 0) {
final int N = data.length();
for (int i=0; i<N; i++) {
char c = data.charAt(i);
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|| c == '.' || c == '-') {
continue;
}
if (c == ':' && i > 0) {
// Valid scheme.
scheme = data.substring(0, i);
uri.append("intent:");
data = data.substring(i+1);
break;
}
// No scheme.
break;
}
}
uri.append(data);
} else if ((flags&URI_INTENT_SCHEME) != 0) {
uri.append("intent:");
}
uri.append("#Intent;");
toUriInner(uri, scheme, flags);
if (mSelector != null) {
uri.append("SEL;");
// Note that for now we are not going to try to handle the
// data part; not clear how to represent this as a URI, and
// not much utility in it.
mSelector.toUriInner(uri, null, flags);
}
uri.append("end");
return uri.toString();
}