Skip to content

Instantly share code, notes, and snippets.

@programmation
Created August 27, 2015 06:00
Show Gist options
  • Save programmation/e27d54a78221b59f611e to your computer and use it in GitHub Desktop.
Save programmation/e27d54a78221b59f611e to your computer and use it in GitHub Desktop.
Android Application subclass with AltBeacon support
using System;
using AltBeaconOrg.BoundBeacon;
using AltBeaconOrg.BoundBeacon.Powersave;
using AltBeaconOrg.BoundBeacon.Startup;
using Android.App;
using Android.Runtime;
namespace CustomApp.Droid
{
[Application]
public class CustomApplication : Application, IBootstrapNotifier
{
private BackgroundPowerSaver _backgroundPowerSaver;
public MemberCentreApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}
public override void OnCreate()
{
base.OnCreate();
try
{
_backgroundPowerSaver = new BackgroundPowerSaver(this);
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
public void DidEnterRegion(Region region)
{
}
public void DidDetermineStateForRegion(int state, Region region)
{
}
public void DidExitRegion(Region region)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment