Chris HG
Chris HG

Reputation: 1492

Xamarin - ‘Android.Content.IntentFilter' is not an attribute class

I’ve created an Android class library that includes an implementation of a broadcast receiver:

[IntentFilter(new string[] { "com.google.android.gcm.intent.RETRY" }, Categories = new string[] { "@PACKAGE_NAME@"})]
public class GcmBroadcastReceiver : BroadcastReceiver
{
    public GcmBroadcastReceiver ()
    {

    }
}

When I try to build I’m getting the message “‘Android.Content.IntentFilter' is not an attribute class”

What do I need to do to make this build?

Upvotes: 4

Views: 541

Answers (1)

Adam Diament
Adam Diament

Reputation: 4840

You need to add using statements for both Android.Content and Android.App

Upvotes: 13

Related Questions