In-app URL redirection

  • Replies:2
  • OpenNot stickiedUnanswered
  • Forum posts: 3

Apr 13, 2018, 2:02:05 PM via Website

Hello,

I want to create an android application that redirect a URL to an other (for example, if I go to google.com, the application redirect to yahoo.fr).
It must works with default android browser or Chrome, firefox or event the in-app browser of facebook.

I don't really know how it works and I don't have a lot of references in this particular domain of android programming.

Another constraint is that it could work without rooting the phone. Is this possible ? If yes, do you have some hints or references to give me ?
(I've already search a bit on Proxy server or VPN but noting concret yet).

Thanks.

Reply
  • Forum posts: 906

Apr 14, 2018, 8:55:48 AM via Website

Surely, you can do thus in your app.

Some codes as below for your reference.

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://play.google.com/store/apps/details?id=xadave.SmartUnitConverterFree_Google"));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
startActivity(intent);

Size 0.07 MB? Google Play - https://goo.gl/ws42fN
Google Blog - https://okblackcoffee.blogspot.com

Helpful?
Reply

Recommended articles