Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.net.Uri;
import android.util.Log;

public class Main {
    public static String buildBackDropPath(String backdrop_path) {
        Uri.Builder builder = new Uri.Builder();
        try {
            backdrop_path = backdrop_path.substring(1);
            Uri poster_uri = builder.scheme("https").authority("image.tmdb.org").appendPath("t").appendPath("p")
                    .appendPath("w1000").appendPath(backdrop_path).build();
            return poster_uri.toString();
        } catch (Exception e) {
            Log.i("Letswatch", "An error occurred " + e);
        }
        return null;
    }
}