show UC Browser via Intent - Android Intent

Android examples for Intent:Browser Intent

Description

show UC Browser via Intent

Demo Code


//package com.book2s;

import android.content.Context;
import android.content.Intent;

import android.net.Uri;

public class Main {

    public static void showUCBrowser(Context context, String visitUrl) {
        Intent intent = new Intent();
        intent.setClassName("com.uc.browser",
                "com.uc.browser.ActivityUpdate");
        intent.setAction(Intent.ACTION_VIEW);
        intent.addCategory(Intent.CATEGORY_DEFAULT);
        intent.setData(Uri.parse(visitUrl));
        context.startActivity(intent);/*w  w  w .  j ava  2s  .c o  m*/
    }
}

Related Tutorials