Android Open Source - rfid_front_door Door Open Widget

From Project

Back to project page rfid_front_door.


The source code is released under:

GNU General Public License

If you think the Android project rfid_front_door listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*from   w ww  .ja  v  a2s  . c om*/
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.RemoteViews;

public class DoorOpenWidget extends AppWidgetProvider {

    private static final String TAG = DoorOpenWidget.class.getSimpleName();

    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
        final RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.widget);

        rv.setOnClickPendingIntent(, getOpenIntent(context));

        Log.d(TAG, "onclick intent has been set");

        appWidgetManager.updateAppWidget(appWidgetIds, rv);

    public static PendingIntent getOpenIntent(Context context) {
        return PendingIntent.getBroadcast(context, 0, new Intent(OpenReceiver.ACTION_OPEN_DOOR),

Java Source Code List