美文网首页
在应用中启动第三方app

在应用中启动第三方app

作者: 听风1413 | 来源:发表于2018-11-14 15:00 被阅读0次

最近在项目中,遇到这样一个需求,要在自己的应用中启动第三方的 app,具体方法如下:

/*需要知道第三方软件的包名和类名
     */
    private fun lauchThirdApp(){
        val intent = Intent()
        val comp = ComponentName(Constants.THIRD_PACKAGENAME,"com.izis.yzext.ServiceActivity")
        intent.setComponent(comp);
        intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
        startActivity(intent)
    }

相关文章

网友评论

      本文标题:在应用中启动第三方app

      本文链接:https://www.haomeiwen.com/subject/utljfqtx.html