On Aug 13, 2011, at 2:16 AM, emalamisura wrote:
> I would like to have my starting intent no load an activity if this is
> possible, I need it to check some values and then decide which activity to
> load.
I think you're confused about what an Intent is. An Intent is a message, sent
to (one or more) destinations. It can have a very specific destination ("this
specific class"), or a general destination ("something that handles http://
URLs").
> I currently am doing this by loading a main activity and the very
> first thing I do is check, and then switch activities.
If you control the Intent, what you can do is add additional IntentFilters to
your activities, and use the intent-matching support. For example, if your
application provides a number of activities, they could all have an
<intent-filter/> with the same action, but different categories, Then whatever
is sending the Intent can change the categories which are added to the intent,
thus controlling which class is loaded.
(This would require some amount of control over the code sending the intent,
though, and if you have that degree of control, then why not just select a
different class to send the intent to?)
See also:
http://developer.android.com/guide/topics/intents/intents-filters.html
http://docs.mono-android.net/Android.App.IntentFilterAttribute
http://developer.android.com/guide/topics/manifest/intent-filter-element.html
- Jon
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid