Cannot start new Intent by setClassName with different package in Android

前端 未结 9 1537
独厮守ぢ
独厮守ぢ 2020-12-06 11:30

I want to start a new Intent dynamically. Therefore setClassName seems the best choice.

First, I define 3 activity in Manifest



        
9条回答
  •  爱一瞬间的悲伤
    2020-12-06 11:46

    The first param is the applicationId located in the build.gradle file

    The second param is full path to of the class with its package. for example: intentObj.setClassName("applicatioId", "com.youCompany.yourAppName.YourClassName")

提交回复
热议问题