src/com/handsomezhou/appsearch/util/AppUtil.java
/**
	 * start app via appinfo
	 * @param context
	 * @param appInfo
	 */
start app via appinfo
@param context
@param appInfo
start app via appinfo @param context @param appInfo
public static void startApp(Context context,AppInfo appInfo){
		if((null==context)||(null==appInfo)){
			return;
		}
		if(null!=appInfo){
			if(!appInfo.getPackageName().equals(context.getPackageName())){
				boolean startAppSuccess=AppUtil.startApp(context, appInfo.getPackageName());
				if(false==startAppSuccess){
					Toast.makeText(context, R.string.app_can_not_be_launched_directly, Toast.LENGTH_SHORT).show();
				}
			}else{
				Toast.makeText(context, R.string.the_app_has_been_launched, Toast.LENGTH_SHORT).show();
			}
		}
	}
public static void startApp ( Context context , AppInfo appInfo ) { if ( ( null == context ) || ( null == appInfo ) ) { return ; } if ( null != appInfo ) { if ( ! appInfo . getPackageName ( ) . equals ( context . getPackageName ( ) ) ) { boolean startAppSuccess = AppUtil . startApp ( context , appInfo . getPackageName ( ) ) ; if ( false == startAppSuccess ) { Toast . makeText ( context , R . string . app_can_not_be_launched_directly , Toast . LENGTH_SHORT ) . show ( ) ; } } else { Toast . makeText ( context , R . string . the_app_has_been_launched , Toast . LENGTH_SHORT ) . show ( ) ; } } }
start app via appinfo
 @param context
 @param appInfo
start app via appinfo @param context @param appInfo