1. Download our Official Android App: Forums for Android!

In-app URL redirection

Discussion in 'Android Development' started by Armand Baglin, Apr 13, 2018.

  1. Armand Baglin

    Armand Baglin Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    14
    Joined:
    Apr 13, 2018

    Apr 13, 2018
    14
    0
    15
    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.
     

    Advertisement

  2. v777779

    v777779 Well-Known Member
    Rank:
    None
    Points:
    68
    Posts:
    126
    Joined:
    Mar 24, 2018

    Mar 24, 2018
    126
    20
    68
    You should have your own proxy that captures all request from the device to network.
    Like Charles https://stackoverflow.com/questions...-http-requests-with-non-rooted-android-device
    I think it's not a trivial task.

    In the case of Chrome or Facebook https://security.stackexchange.com/...u-capture-all-the-traffic-from-an-android-app
    You should have certificates for HTTPS that you don't have. Without certificates you will get encoded HTTPS requests, where the site name is visible only. All other information looks like garbage.
    If you can capture and read SSL traffic from any application, like Facebook, without certificates, you have access to all Play Store application's secret keys and unlimited access to any private site or store.
    So you are going to compromise all the Internet security. Good luck :)
     
    #2 v777779, Apr 13, 2018
    Last edited: Apr 13, 2018
  3. Armand Baglin

    Armand Baglin Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    14
    Joined:
    Apr 13, 2018

    Apr 13, 2018
    14
    0
    15
    Thanks for your answer !
    About Charles, this applicaiton seems to do what I want to do but I don't want to capture on a PC, but in the application that I am currently working on...
     
  4. Armand Baglin

    Armand Baglin Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    14
    Joined:
    Apr 13, 2018

    Apr 13, 2018
    14
    0
    15
    I want my android app to "listen" on the web browser in order to capture Url's that are entered
     
  5. v777779

    v777779 Well-Known Member
    Rank:
    None
    Points:
    68
    Posts:
    126
    Joined:
    Mar 24, 2018

    Mar 24, 2018
    126
    20
    68
    If you are the author of application and want to capture URL that was entered inside the app, yes you can do it easily.
    If you are working with Web View, the URL is under your control and again you can do it easily.
    if you call Chrome from your application with the entered URL, yes, you can replace URL with new one and call Chrome with modified URL.
    But when Chrome is started and you enter URL in Chrome address tab, it's impossible to capture that request, Chrome is independent application, no matter how you have launched it.
    I'm not sure for last sentence, but I think yes it's impossible with simple tools.
    May be the way is to replace something on system level of Android. So you are going to hack Android :)
     
  6. Armand Baglin

    Armand Baglin Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    14
    Joined:
    Apr 13, 2018

    Apr 13, 2018
    14
    0
    15
    Ok so I think that this is not possible...
    I want to recover Url that I enter (in the navigation browser default app of my phone) in my app (the one i'm working on) so it's totally independent as you said...
     
  7. ColinWithMothras

    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Apr 24, 2018

    Apr 24, 2018
    2
    0
    5
    You can probably do this by making a browser extension/add on that just injects javascript to the page that does the redirection. Or use something like tapermonkey which injects javascript. An app would not be the right approach in my opinion.
     

Share This Page

Loading...