/// <summary>
 /// Get the AppWidgetManager instance to use for the supplied
 /// <see cref="android.content.Context">Context</see>
 /// object.
 /// </summary>
 public static android.appwidget.AppWidgetManager getInstance(android.content.Context
                                                              context)
 {
     lock (sManagerCache)
     {
         if (sService == null)
         {
             android.os.IBinder b = android.os.ServiceManager.getService(android.content.Context
                                                                         .APPWIDGET_SERVICE);
             sService = android.appwidget.@internal.IAppWidgetServiceClass.Stub.asInterface(b);
         }
         [email protected] <android.appwidget.AppWidgetManager> @ref = sManagerCache
                                                                                  .get(context);
         android.appwidget.AppWidgetManager result = null;
         if (@ref != null)
         {
             result = @ref.get();
         }
         if (result == null)
         {
             result = new android.appwidget.AppWidgetManager(context);
             sManagerCache.put(context, new [email protected] <android.appwidget.AppWidgetManager
                                                                          >(result));
         }
         return(result);
     }
 }
Beispiel #2
0
 public virtual void onUpdate(android.content.Context arg0, android.appwidget.AppWidgetManager arg1, int[] arg2)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.appwidget.AppWidgetProvider._onUpdate990, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.appwidget.AppWidgetProvider.staticClass, global::android.appwidget.AppWidgetProvider._onUpdate990, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     }
 }
Beispiel #3
0
		/// <summary>
		/// Get the AppWidgetManager instance to use for the supplied
		/// <see cref="android.content.Context">Context</see>
		/// object.
		/// </summary>
		public static android.appwidget.AppWidgetManager getInstance(android.content.Context
			 context)
		{
			lock (sManagerCache)
			{
				if (sService == null)
				{
					android.os.IBinder b = android.os.ServiceManager.getService(android.content.Context
						.APPWIDGET_SERVICE);
					sService = android.appwidget.@internal.IAppWidgetServiceClass.Stub.asInterface(b);
				}
				[email protected]<android.appwidget.AppWidgetManager> @ref = sManagerCache
					.get(context);
				android.appwidget.AppWidgetManager result = null;
				if (@ref != null)
				{
					result = @ref.get();
				}
				if (result == null)
				{
					result = new android.appwidget.AppWidgetManager(context);
					sManagerCache.put(context, new [email protected]<android.appwidget.AppWidgetManager
						>(result));
				}
				return result;
			}
		}
Beispiel #4
0
 // END_INCLUDE(onReceive)
 /// <summary>
 /// Called in response to the
 /// <see cref="AppWidgetManager.ACTION_APPWIDGET_UPDATE">AppWidgetManager.ACTION_APPWIDGET_UPDATE
 ///     </see>
 /// broadcast when
 /// this AppWidget provider is being asked to provide
 /// <see cref="android.widget.RemoteViews">RemoteViews</see>
 /// for a set of AppWidgets.  Override this method to implement your own AppWidget functionality.
 /// <more></more>
 /// </summary>
 /// <param name="context">
 /// The
 /// <see cref="android.content.Context">Context</see>
 /// in which this receiver is
 /// running.
 /// </param>
 /// <param name="appWidgetManager">
 /// A
 /// <see cref="AppWidgetManager">AppWidgetManager</see>
 /// object you can call
 /// <see cref="AppWidgetManager.updateAppWidget(int[], android.widget.RemoteViews)">AppWidgetManager.updateAppWidget(int[], android.widget.RemoteViews)
 ///     </see>
 /// on.
 /// </param>
 /// <param name="appWidgetIds">
 /// The appWidgetIds for which an update is needed.  Note that this
 /// may be all of the AppWidget instances for this provider, or just
 /// a subset of them.
 /// </param>
 /// <seealso cref="AppWidgetManager.ACTION_APPWIDGET_UPDATE">AppWidgetManager.ACTION_APPWIDGET_UPDATE
 ///     </seealso>
 public virtual void onUpdate(android.content.Context context, android.appwidget.AppWidgetManager
                              appWidgetManager, int[] appWidgetIds)
 {
 }