Skip to content

Instantly share code, notes, and snippets.

View musclebananas's full-sized avatar
🎯
Focusing

musclebananas

🎯
Focusing
View GitHub Profile
@mjohnsullivan
mjohnsullivan / TimerActivity.java
Created July 9, 2015 13:15
Example of how to create a long running timer service that survives activity destruction by moving to the foreground, and back to the background when a new activity bind to it.
//
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software