Hi all I have the follow code:
Linkify.addLinks(tv, Pattern.compile("http://www.abc.com"),"http://www.abc.com?m=signup");
Problem is I keep getting directed to the “http://www.abc.com” page instead of the sign-up page, anyone knows why?
Solution:
Thanks for the hint Noel, was able to solve it doing this.
TransformFilter transformFilter = new TransformFilter() {
public final String transformUrl(final Matcher match, String url) {
return "";
}
};
Linkify.addLinks(tv, Pattern.compile("http://www.abc.com"),
"http://www.abc.com/?m=signup",null ,transformFilter);
Update your tv content to contain the full link instead of just abc.com. In your
addLinks()call, the last argument is the scheme which is usually something likehttp://, it’s not the address that the links will go to.See the doc for more details. They also have an explanation at the top of what is expected.