Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class BackgroundService extends Service {
@Override public int onStartCommand(Intent intent, int i, int i1) {
if (observer == null) {
observer = new OrdersObserver(new Handler());
.registerContentObserver(KolGeneContract.OrderEntry.CONTENT_URI, true, observer);
@Override public void handleMessage(Message msg) {
Order order = (Order) msg.obj;
Intent intent = new Intent(context, SendOrderService.class);
intent.putExtra(SendOrderService.ORDER_ID, order.getLocalId());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.