open_local_app

/**
* 根据包名 打开本地应用程序
*
* @param String packageName
* @return void
* @throws
* @since TianTian
*/
public void openApp(String packageName)
{
try
{
PackageManager manager = getPackageManager();
PackageInfo pi = manager.getPackageInfo(packageName, 0);

Intent resolveIntent = new Intent(Intent.ACTION_MAIN, null);
resolveIntent.addCategory(Intent.CATEGORY_LAUNCHER);
resolveIntent.setPackage(pi.packageName);

List<ResolveInfo> apps = manager.queryIntentActivities(resolveIntent, 0);

if (CommonUtil.isNotEmpty(apps))
{
ResolveInfo info = apps.iterator().next();
if (null != info)
{
packageName = info.activityInfo.packageName;
String className = info.activityInfo.name;

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);

ComponentName component = new ComponentName(packageName, className);

intent.setComponent(component);
startActivity(intent);
}
}
}catch (NameNotFoundException e){
e.printStackTrace();
}
}


2: PackageManager packageManager = Start_RemoveSoftActivity.this.getPackageManager();
Intent intent=new Intent();
try {
intent =packageManager.getLaunchIntentForPackage("要调用应用的包名");
} catch (NameNotFoundException e) {
Log.i(TAG, e.toString());
}
startActivity(intent);
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
C:\Users\TXN>CD C:// C:\>Python "C:\Program Files (x86)\Intel\openvino_2021.4.752\deployment_tools\open_model_zoo\demos\human_pose_estimation_demo\python\human_pose_estimation_demo.py" -at openpose -d CPU -i 0 -m D:\model\fall_detection_zpp\intel\human-pose-estimation-0001\FP16\human-pose-estimation-0001.xml [ INFO ] Initializing Inference Engine... [ INFO ] Loading network... [ INFO ] Reading network from IR... Traceback (most recent call last): File "C:\Program Files (x86)\Intel\openvino_2021.4.752\deployment_tools\open_model_zoo\demos\human_pose_estimation_demo\python\human_pose_estimation_demo.py", line 283, in <module> sys.exit(main() or 0) File "C:\Program Files (x86)\Intel\openvino_2021.4.752\deployment_tools\open_model_zoo\demos\human_pose_estimation_demo\python\human_pose_estimation_demo.py", line 184, in main model = get_model(ie, args, frame.shape[1] / frame.shape[0]) File "C:\Program Files (x86)\Intel\openvino_2021.4.752\deployment_tools\open_model_zoo\demos\human_pose_estimation_demo\python\human_pose_estimation_demo.py", line 111, in get_model prob_threshold=args.prob_threshold) File "C:\Program Files (x86)\Intel\openvino_2021.4.752\deployment_tools\open_model_zoo\demos\common\python\models\open_pose.py", line 62, in __init__ strides=(1, 1), name=self.pooled_heatmaps_blob_name) File "C:\Users\TXN\AppData\Local\Programs\Python\Python37\lib\site-packages\ngraph\utils\decorators.py", line 22, in wrapper node = node_factory_function(*args, **kwargs) TypeError: max_pool() missing 1 required positional argument: 'dilations'
05-30

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值