code: public static BroadcastReceiver registerDataLogReceiver(final Context context,
                                                              final PebbleDataLogReceiver receiver) {
          IntentFilter filter = new IntentFilter();
          filter.addAction(INTENT_DL_RECEIVE_DATA);
          filter.addAction(INTENT_DL_FINISH_SESSION);
          context.registerReceiver(receiver, filter);
  
          return receiver;
      }
docs: A convenience function to assist in programatically registering a broadcast receiver for the 'DATA_AVAILABLE'
  intent.
  
  To avoid leaking memory, activities registering BroadcastReceivers <em>must</em> unregister them in the
  Activity's {@link android.app.Activity#onPause()} method.
  
  @param context
  The context in which to register the BroadcastReceiver.
  @param receiver
  The receiver to be registered.
  
  @return The registered receiver.
  
  @see Constants#INTENT_DL_RECEIVE_DATA