首页 > 移动平台 > 详细

Android 开启第三方APP

时间:2019-04-02 14:55:14      阅读:125      评论:0      收藏:0      [点我收藏+]
   int mfingerId=mUpdateMonitor.fingerId;
   Log.d("from keyguard","id is "+mfingerId);

   int myid=Settings.Global.getInt(mContext.getContentResolver(),"my_FINGER_ID",-1);
   Log.d("from Global", "fingerid is " +myid);

  if(ifFingerprint&&mfingerId==myid)
    {
        PackageManager mPackageManager = mContext.getPackageManager();
        mPackageManager.setApplicationLockState("com.jrdcom.privatezone", 2);
        Intent intent = new Intent(Intent.ACTION_MAIN);
        intent.addCategory(Intent.CATEGORY_LAUNCHER);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
   //组建名,下面的代码很关键,参数(包名,目标Activity名) ComponentName comp = new ComponentName("com.jrdcom.privatezone", "com.jrdcom.filemanager.activity.ApplicationLockActivity"); intent.setComponent(comp);
mContext.startActivity(intent); ifFingerprint=false; }

Android 开启第三方APP

原文:https://www.cnblogs.com/chsigu/p/10642288.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!