当前位置: 首页>>代码示例>>Java>>正文


Java SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS属性代码示例

本文整理汇总了Java中com.google.samples.apps.iosched.service.SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS属性的典型用法代码示例。如果您正苦于以下问题:Java SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS属性的具体用法?Java SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS怎么用?Java SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.google.samples.apps.iosched.service.SessionAlarmService的用法示例。


在下文中一共展示了SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doUserDataSync

/**
 * Checks if there are changes on User's Data to sync with/from remote AppData folder.
 *
 * @return Whether or not data was changed.
 * @throws IOException if there is a problem uploading the data.
 */
private boolean doUserDataSync(String accountName) throws IOException {
    if (!isOnline()) {
        LOGD(TAG, "Not attempting userdata sync because device is OFFLINE");
        return false;
    }

    LOGD(TAG, "Starting user data sync.");

    AbstractUserDataSyncHelper helper = UserDataSyncHelperFactory.buildSyncHelper(
            mContext, accountName);
    boolean modified = helper.sync();
    if (modified) {
        // Schedule notifications for the starred sessions.
        Intent scheduleIntent = new Intent(
                SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS,
                null, mContext, SessionAlarmService.class);
        mContext.startService(scheduleIntent);
    }
    return modified;
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:26,代码来源:SyncHelper.java

示例2: doUserScheduleSync

/**
 * Checks if there are changes on MySchedule to sync with/from remote AppData folder.
 *
 * @return Whether or not data was changed.
 * @throws IOException if there is a problem uploading the data.
 */
private boolean doUserScheduleSync(String accountName) throws IOException {
    if (!isOnline()) {
        LOGD(TAG, "Not attempting myschedule sync because device is OFFLINE");
        return false;
    }

    LOGD(TAG, "Starting user data (myschedule) sync.");

    AbstractUserDataSyncHelper helper = UserDataSyncHelperFactory.buildSyncHelper(
            mContext, accountName);
    boolean modified = helper.sync();
    if (modified) {
        // schedule notifications for the starred sessions
        Intent scheduleIntent = new Intent(
                SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS,
                null, mContext, SessionAlarmService.class);
        mContext.startService(scheduleIntent);
    }
    return modified;
}
 
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:26,代码来源:SyncHelper.java

示例3: onReceive

@Override
public void onReceive(Context context, Intent intent) {
    Intent scheduleIntent = new Intent(
            SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS,
            null, context, SessionAlarmService.class);
    context.startService(scheduleIntent);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:7,代码来源:SessionAlarmReceiver.java

示例4: run

@Override
public void run(Context context, Callback callback) {
    Intent intent = new Intent(
            SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS,
            null, context, SessionAlarmService.class);
    context.startService(intent);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:7,代码来源:ScheduleStarredSessionAlarmsAction.java

示例5: onReceive

@Override
public void onReceive(Context context, Intent intent) {
    final String action = intent.getAction();
    if (SessionCalendarService.ACTION_UPDATE_ALL_SESSIONS_CALENDAR_COMPLETED.equals(action)
            || Intent.ACTION_BOOT_COMPLETED.equals(action)) {
        Intent scheduleIntent = new Intent(
                SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS,
                null, context, SessionAlarmService.class);
        context.startService(scheduleIntent);
    }
}
 
开发者ID:google,项目名称:iosched,代码行数:11,代码来源:SessionAlarmReceiver.java

示例6: doUserDataSync

/**
 * Checks if there are changes on User's Data to sync with/from remote AppData folder.
 *
 * @return Whether or not data was changed.
 * @throws IOException if there is a problem uploading the data.
 */
private boolean doUserDataSync(SyncResult syncResult) throws IOException {
    if (!ConnectivityUtils.isConnected(mContext)) {
        LOGD(TAG, "Not attempting userdata sync because device is OFFLINE");
        return false;
    }

    String accountName = AccountUtils.getActiveAccountName(mContext);
    if (TextUtils.isEmpty(accountName)) {
        LOGD(TAG, "Not attempting userdata sync because user is not signed in");
        return false;
    }

    LOGD(TAG, "Starting user data sync.");

    AbstractUserDataSyncHelper helper = UserDataSyncHelperFactory.buildSyncHelper(
            mContext, accountName);
    boolean modified = helper.sync();

    if (modified) {
        // Schedule notifications for the starred sessions.
        Intent scheduleIntent = new Intent(
                SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS,
                null, mContext, SessionAlarmService.class);
        mContext.startService(scheduleIntent);
    }
    syncResult.stats.numIoExceptions += helper.getIoExcpetions();
    return modified;
}
 
开发者ID:google,项目名称:iosched,代码行数:34,代码来源:SyncHelper.java


注:本文中的com.google.samples.apps.iosched.service.SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。