f2prateek / dart

Extras binding and intent builders for Android apps.
Apache License 2.0
1.19k stars 88 forks source link

Dealing with implicit intent #144

Open jorgebo10 opened 7 years ago

jorgebo10 commented 7 years ago

Hi, is it possible to use builder to build implicit intents? It could be a nice feature. Thanks

stephanenicolas commented 7 years ago

How could that work ?

2016-12-31 23:51 GMT+01:00 Jorge Bo notifications@github.com:

Hi, is it possible to use builder to build implicit intents? It could be a nice feature. Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/f2prateek/dart/issues/144, or mute the thread https://github.com/notifications/unsubscribe-auth/ABv33fMud1T2TRqDob4zA6WwnsjkHscLks5rNtx8gaJpZM4LYoeX .

dlemures commented 7 years ago

Hi @jorgebo10 ,

Thanks for the nice question.

It is not possible to use a builder generated at compile time to build implicit intents.

The reasons is that implicit intents are resolved at runtime by the system. So we cannot know which component will be the target one.

We could discuss about custom data defined just for one activity inside the manifest, but:

  1. we are using annotation processing
  2. I don't think that it is the way to go (we might end up having a 1-many relationship). Why not to use explicit intents for this case?

@jorgebo10 do you want to provide some context or your case?