Skip to content

Instantly share code, notes, and snippets.

@JonDouglas
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonDouglas/a4137976c051e6a88ee9 to your computer and use it in GitHub Desktop.
Save JonDouglas/a4137976c051e6a88ee9 to your computer and use it in GitHub Desktop.
MyReceiver
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace NewCameraBroadcast
{
[BroadcastReceiver(Enabled = true)]
[IntentFilter(new[] { Android.Hardware.Camera.ActionNewPicture, "com.android.camera.NEW_PICTURE" }, DataMimeType = "image/*")]
public class MyReceiver : BroadcastReceiver
{
public override void OnReceive(Context context, Intent intent)
{
Toast.MakeText(context, "Received intent!", ToastLength.Short).Show();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment