Tuesday, 16 December 2014

Intent.FLAG_ACTIVITY_NEW_TASK in Xamarin C# Android

While trying to StartActivity from a list adapter I got this warning:
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
The way to overcome this in Java:
The not-so-well-documented way to acheive this using Xamarin:

1 comment:

  1. Thank you! This helped me quickly!
    I expected to find this inside the Intent Object.


Comments are moderated, so you'll have to wait a little bit before they appear!