[mono-android] how to access an activity from broadcast receiver

Jonathan Pryor jonp at xamarin.com
Tue Feb 21 21:46:06 UTC 2012


In general, when Java code has `SomeType.class`, the equivalent C# is `typeof(SomeClass)`.

Thus:

On Feb 19, 2012, at 2:50 PM, tweaver60 wrote:
>                // Create an Intent to launch ExampleActivity
>                Intent intent = new Intent(context,* Activity1*);  //Java

	var intent = new Intent(context, typeof(Activity1));

 - Jon



More information about the Monodroid mailing list