安卓:我可以启用/禁用编程活动的意图过滤器?过滤器、意图

2023-09-04 23:25:05 作者:是缘还是劫

我需要隐藏或显示,具体取决于某些运行时信息发射器我的应用程序的图标。我想还是可以通过明确的意图来运行活动,因此,禁用该活动是不是一个好的选择(我甚至不知道是否它会工作,我还没有尝试过,但我想这会)。所以,我可以禁用意图过滤器?

I need to hide or show my app's icon in the launcher depending on some runtime information. I'd like to still be able to run the activity by an explicit intent, so disabling the activity isn't a good option (I don't even know for sure if it will work, I haven't tried it yet, but I guess it will). So, can I disable an intent filter?

推荐答案

您可以直接这样做,但是你可以创建一个的