Android Open Source - berlinclock-android-widget Berlin Clock Widget






From Project

Back to project page berlinclock-android-widget.

License

The source code is released under:

MIT License

If you think the Android project berlinclock-android-widget 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

package ch.crisi.berlinclock_widget;
// w ww.ja  v a2  s .c o m
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;

public class BerlinClockWidget extends AppWidgetProvider {

    @Override
    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
        final Intent intent = new Intent(context, UpdateService.class);
        context.startService(intent);
    }

    @Override
    public void onDisabled(Context context) {
        final Intent intent = new Intent(context, UpdateService.class);
        context.stopService(intent);
    }

}




Java Source Code List

ch.crisi.berlinclock_widget.ApplicationTest.java
ch.crisi.berlinclock_widget.BerlinClockWidget.java
ch.crisi.berlinclock_widget.TimeActionsReceiver.java
ch.crisi.berlinclock_widget.UpdateService.java