In-app URL redirection

  • Replies:2
Armand Baglin
  • 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
James Watson
  • Forum posts: 1,584

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);

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
Reply
James Watson
  • Forum posts: 1,584

Apr 14, 2018, 12:41:12 PM via Website

I found I misunderstood your question.
In your app, you need to register something like a system level hook for web browsing events.

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
Reply