Skip to content

This repository contains a tool to navigate deep into an URL redirection and capture the last redirection URL and operate with It

License

Notifications You must be signed in to change notification settings

pubnative/url-driller-android

Repository files navigation

driller icon

Circle CI

url-driller

This repository contains a tool to navigate deep into an URL redirection and open it in background.

Install

###jCenter

Add the following line to your build.gradle file

compile "net.pubnative:url_driller:1.3.3"

###Manual

You can always download this repository and include it as a module in your project

Usage

Create your driller and drill the url with it

URLDriller driller = new URLDriller();
driller.drill(context, "<URL>");

Advanced

If you want to follow the driller behaviour, set up a valid listener before drilling and it will callback with the drilling steps.

driller.setListener(new URLDriller.Listener() {

    @Override
    public void onURLDrillerStart(String url) {
        // Callback when drilling starts            
    }

    @Override
    public void onURLDrillerRedirect(String url) {
        // Callback when drilling followed a redirect
    }

    @Override
    public void onURLDrillerFinish(String url) {
        // Callback when drilling is over
    }

    @Override
    public void onURLDrillerFail(String url, Exception exception) {
        // Callback when drilling fails
    }
});

About

This repository contains a tool to navigate deep into an URL redirection and capture the last redirection URL and operate with It

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages