Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.app.SearchManager;

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

public class Main {
    public static void showGoogleSearchIntent(Context context, String query) {
        Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
        intent.putExtra(SearchManager.QUERY, query); // query contains search string
        context.startActivity(intent);
    }
}