Xamarin: Android Widget with timer, stops when app killed
问题 I have this code: public class MyWidgetProvider : AppWidgetProvider { public override void OnUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.Debug("WIDGET", "Updating the widget"); // Open app on click RemoteViews views = new RemoteViews(context.PackageName, Resource.Layout.MyWidget); Intent launchAppIntent = new Intent(context, typeof(MainActivity)); PendingIntent launchAppPendingIntent = PendingIntent.GetActivity(context, 0, launchAppIntent,