@Override public void onReceive(final Context context, final Intent intent) {
		Log.i(TAG, "API request: " + intent.toUri(0));
		if ((intent.getFlags() & FLAG_RECEIVER_FOREGROUND) == 0) Log.w(TAG, "Add Intent.FLAG_RECEIVER_FOREGROUND to API intent for less delay.");

		String result = ApiDispatcher.verifyCaller(context, intent, null, -1);
		if (result != null) {
			setResultIfOrdered(Api.latest.RESULT_UNVERIFIED_IDENTITY, result);
			Log.w(TAG, "Caller verification failure: " + result);
			return;
		}
		result = ApiDispatcher.dispatch(context, intent);
		if (result == null) {
			setResultIfOrdered(Activity.RESULT_OK, null);
			Log.i(TAG, "API result: Success");
		} else {
			setResultIfOrdered(Activity.RESULT_CANCELED, result);
			Log.i(TAG, "API result: " + result);
		}
	}
Broadcast API invocation handler. Result will be delivered as broadcast result in ordered broadcast.

Created by Oasis on 2017/9/18.
engine/src/main/java/com/oasisfeng/island/api/ApiReceiver.java