search App in Market - Android App

Android examples for App:App Market

Description

search App in Market

Demo Code


import android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class Main {
  public static void searchApp(Context context, String packagename) {
    try {//from  www  . j ava2s.com
      String strUrl = "market://search?q=pname:" + packagename;
      Uri uri = Uri.parse(strUrl);
      Intent intent = new Intent(Intent.ACTION_VIEW, uri);
      context.startActivity(intent);
    } catch (Exception e) {
      e.printStackTrace();
    }

  }
}

Related Tutorials