Created
April 24, 2015 11:05
-
-
Save kmdupr33/84a4a4c92affc3910536 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onStop() { | |
super.onStop(); | |
if (mInitStarred != mStarred) { | |
if (UIUtils.getCurrentTime(this) < mSessionStart) { | |
// Update Calendar event through the Calendar API on Android 4.0 or new versions. | |
Intent intent = null; | |
if (mStarred) { | |
// Service launcher sets up intent to add session to Calendar | |
mServiceLauncher.launchSessionCalendarService(SessionCalendarService.ACTION_ADD_SESSION_CALENDAR, mSessionUri, | |
mSessionStart, mSessionEnd, mRoomName, mTitleString); | |
} else { | |
// Set up intent to remove session from Calendar, if exists. | |
mServiceLauncher.launchSessionCalendarService(SessionCalendarService.ACTION_REMOVE_SESSION_CALENDAR, mSessionUri, | |
mSessionStart, mSessionEnd, mTitleString); | |
} | |
if (mStarred) { | |
setupNotification(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment