// 调出手机market并搜索出相应的APK
Uri uri = Uri.parse("market://search?q=pname:"
+ SCAN_PACKAGE);
Intent scanintent = new Intent(Intent.ACTION_VIEW, uri);
try
{
startActivity(scanintent);
}
catch (ActivityNotFoundException anfe)
{
Log.w(TAG,
"Android Market is not installed; cannot install Barcode Scanner");
}
// 调至系统联系人界面,选择联系人,并返回数据
Intent intent = new Intent();
intent.setAction(Intent.ACTION_PICK);
intent.setData(ContactsContract.Contacts.CONTENT_URI);
try
{
startActivityForResult(intent, FLAG_RESULT_SYS_CONTACTS);
}
catch (ActivityNotFoundException e1)
{
e1.printStackTrace();
Log.w(TAG, "No contacts pick...");
}