Code example for AndroidHttpClient

Methods: getParams

0
    private final AndroidHttpClient mHttpClient;
 
    public OpenSearchSearchEngine(Context context, SearchEngineInfo searchEngineInfo) {
        mSearchEngineInfo = searchEngineInfo;
        mHttpClient = AndroidHttpClient.newInstance(USER_AGENT);
        HttpParams params = mHttpClient.getParams();
        params.setLongParameter(HTTP_TIMEOUT, HTTP_TIMEOUT_MS);
    } 
 
    public String getName() {
        return mSearchEngineInfo.getName();
    } 
 
    public CharSequence getLabel() {
        return mSearchEngineInfo.getLabel();
    } 
 
    public void startSearch(Context context, String query, Bundle appData, String extraData) {
        String uri = mSearchEngineInfo.getSearchUriForQuery(query);
        if (uri == null) {
            Log.e(TAG, "Unable to get search URI for " + mSearchEngineInfo);