search Content using web search via Intent - Android android.content

Android examples for android.content:Intent

Description

search Content using web search via Intent

Demo Code

import android.app.SearchManager;
import android.content.Context;
import android.content.Intent;

public class Main{

    public static void searchContent(Context context, String content) {
        Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
        intent.putExtra(SearchManager.QUERY, content);
        context.startActivity(intent);//from   w w w  . j  a v  a  2  s  . c  o  m
    }

}

Related Tutorials