示例#1
0
  /** Helper function to broadcast that the service has errored out */
  protected int broadcastErrorAndStop() {
    Log.e(TAG, "broadcasting error");
    Bundle extra = new Bundle();
    extra.putBoolean(ServiceMessageProtocol.SERVICE_ERROR, true);
    ServiceMessageProtocol.broadcastFromBt(this, extra);

    // Stop self and return the no-restart flag
    stopSelf();
    return START_NOT_STICKY;
  }
示例#2
0
 protected void broadcastUpdate() {
   Bundle extra = new Bundle();
   extra.putBoolean(ServiceMessageProtocol.DATA_CHANGED, true);
   ServiceMessageProtocol.broadcastFromBt(this, extra);
 }