Since you know the contents and particularities of your string, do so
Split the string into two:
String [] separada = url.split(";");
this separates the url string into a string array "separate" that will contain 2 items, done this, or Voce separates each of these items into two new ones using split and picking up the part that needs it or Voce can pick up the sub string of each of these items, something like this:
String link = separada[0].split("//")[1];
String pack = separada[1].split("=")[1];
or
String link = separada[0].substring(8,separada[0].lenght());
String pack = separada[1].substring(7,separada[1].lenght());
I think this is, remembering that the value 8 of the first case, is the value that starts counting the string from 0 to "/', that is, takes the string after them until the end and the value 7 takes the string from 7 to the end, in case "=", I believe that the first case, using split is the most succinct.
If there’s a problem, let me know.
Is the java tag correct? Shouldn’t it be [tag:android] instead?
– Florida
@Florida no, I don’t know if there is any different API on Android, but Java is ok and I believe it is enough, can even add another option.
– Maniero
@Florida android can be programmed using other languages, in this case java is correct.
– user28595
one
url.replace("intent://", "").split("/#Intent;package=");
would not solve?– Christian Beregula