Android Open Source - Timetable Event Broadcast Sender






From Project

Back to project page Timetable.

License

The source code is released under:

GNU General Public License

If you think the Android project Timetable 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 com.timetable.android;
/*from  w  ww  .j  a  v  a  2 s .  co  m*/
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

/*
 * Class, that can send all main broadcasts.
 */
public class EventBroadcastSender {
  
  public static void sendEventAddedBroadcast(Context context, Event event) {
    Intent intent = new Intent(BroadcastActions.ACTION_EVENT_ADDED);
    intent.putExtras(event.convert());
    context.sendBroadcast(intent);
    Logger.log("EventBroadcastSender.sendEventAddedBroadcast: broadcast is sent");
  }
  
  public static void sendEventUpdatedBroadcast(Context context, Event event) {
    Intent intent = new Intent(BroadcastActions.ACTION_EVENT_UPDATED);
    intent.putExtras(event.convert());
    context.sendBroadcast(intent);
    Logger.log("EventBroadcastSender.sendEventUpdatedBroadcast: broadcast is sent");
  }
  
  public static void sendEventDeletedBroadcast(Context context, Event event) {
    Intent intent = new Intent(BroadcastActions.ACTION_EVENT_DELETED);
    intent.putExtras(event.convert());
    context.sendBroadcast(intent);
    Logger.log("EventBroadcastSender.sendEventDeletedBroadcast: broadcast is sent");
  }
  
  public static void sendEventEndedBroadcast(Context context, Event event) {
    sendEventEndedBroadcast(context, event.convert());
  }
  
  public static void sendEventEndedBroadcast(Context context, Bundle eventData) {
    Intent intent = new Intent(BroadcastActions.ACTION_EVENT_ENDED);
    intent.putExtras(eventData);
    context.sendBroadcast(intent);
    Logger.log("EventBroadcastSender.sendEventEndedBroadcast: broadcast is sent");
  }
}




Java Source Code List

com.timetable.android.AlarmSoundPreference.java
com.timetable.android.BroadcastActions.java
com.timetable.android.DeviceMuteService.java
com.timetable.android.EventBroadcastSender.java
com.timetable.android.EventChecker.java
com.timetable.android.EventController.java
com.timetable.android.EventPager.java
com.timetable.android.EventPeriod.java
com.timetable.android.EventService.java
com.timetable.android.EventViewProvider.java
com.timetable.android.EventView.java
com.timetable.android.Event.java
com.timetable.android.IllegalEventDataException.java
com.timetable.android.Logger.java
com.timetable.android.ServiceStarter.java
com.timetable.android.TimetableApp.java
com.timetable.android.TimetableDatabase.java
com.timetable.android.activities.EventAddActivity.java
com.timetable.android.activities.EventCopyActivity.java
com.timetable.android.activities.EventDayViewActivity.java
com.timetable.android.activities.EventEditActivity.java
com.timetable.android.activities.SettingsActivity.java
com.timetable.android.alarm.AlarmDialogActivity.java
com.timetable.android.alarm.AlarmService.java
com.timetable.android.alarm.EventAlarm.java
com.timetable.android.uitests.AlarmDialogActivityTestCase.java
com.timetable.android.uitests.EventAddActivityTestCase.java
com.timetable.android.uitests.TimetableUiTestCase.java
com.timetable.android.utils.DateFormatFactory.java
com.timetable.android.utils.DateUtils.java
com.timetable.android.utils.FakeTimeProvider.java
com.timetable.android.utils.SimpleTimeProvider.java
com.timetable.android.utils.TestAlarmStarter.java
com.timetable.android.utils.TimeProvider.java
com.timetable.android.utils.Utils.java