我想测试应用程序中是否存在名为" test“的活动。可能在调用startActivity之前或在其catch块中使用清单文件执行以下操作:
Starting an Activity with Intent and SetClassName
所以说:
if(test.exists){
Activity is registered and start it
}
else{
create Activity and add it in manifset programmatically, as this would be a dynamic Activity
}发布于 2012-04-12 19:58:19
我们不能以编程方式在manifeast文件中添加活动,即使您从JSON响应中获得它。
如果你正在启动原生活动,我们通常根本不会将它们添加到manifeast文件中,但对于某些事情,我们需要添加权限才能在我们的应用程序中使用它们。
https://stackoverflow.com/questions/10122470
复制相似问题