Android: Dynamically asscociating data type with an activity

前端 未结 1 867
青春惊慌失措
青春惊慌失措 2020-12-16 07:58

I have a use case in my application, where after certain point, I need to associate an data with an activity. So whenever an intent with an action and the data type is fired

相关标签:
1条回答
  • 2020-12-16 08:23

    Is it possible to register the data type for an activity dynamically and programatically ?

    No.

    If the <intent-filter> you want is known in advance, but you only want to enable it after a certain point, you may be able to achieve this via <activity-alias> (have it disabled at the outset and enable it programmatically via PackageManager). Alas, <intent-filter> does not appear to be something you can enable or disable, at least based on what I see in the manifest documentation.

    0 讨论(0)
提交回复
热议问题