Skip to content

Instantly share code, notes, and snippets.

View shyamgarud's full-sized avatar

Shyamkumar Garud shyamgarud

View GitHub Profile
@shyamgarud
shyamgarud / TimerActivity.java
Created September 5, 2016 13:13 — forked from mjohnsullivan/TimerActivity.java
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