Skip to content

Instantly share code, notes, and snippets.

@Foovanadil
Last active August 29, 2015 14:07
Show Gist options
  • Save Foovanadil/eb5d722bfce6d555faf6 to your computer and use it in GitHub Desktop.
Save Foovanadil/eb5d722bfce6d555faf6 to your computer and use it in GitHub Desktop.
Xamarin Android Main Activity example for starting an IntentService.
using System.IO;
using Android.App;
using Android.Content;
using Android.Widget;
using Android.OS;
using TIG.Todo.Common;
using Android.Content.PM;
using TIG.Todo.Common.SQLite;
namespace TIG.Todo.AndroidApp
{
[Activity (Label = "TIG.Todo.Android", MainLauncher = true, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize)]
public class MainActivity : Activity
{
private TaskManager taskManager;
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
//Intent intent = new Intent (this, typeof(GeofencingHelper));
StartService(new Intent("com.sdtig.Todo.START_LOCATION"));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment