Raj
Raj

Reputation: 163

Adding intent to activity dynamically

I've got an activity for which I've defined an intent filter statically in AndroidManifest.xml. I'd like to register additional intents dynamically to that same intent filter in the activity's onStart() method. Is this possible? I'm trying to avoid having to implement a separate intent receiver class.

Upvotes: 3

Views: 1140

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007624

Is this possible?

No, sorry.

I'm trying to avoid having to implement a separate intent receiver class.

You have no choice -- an Intent used with sendBroadcast() is not going to be received by an activity any other way. Do not confuse startActivity() Intents with sendBroadcast() Intents.

Upvotes: 2

Related Questions