public static void setReceiver(@NonNull final AppCompatActivity activity, @NonNull final Action1<Intent> onReceive) {
        activity.getLifecycle().addObserver(new MessageCenterUpdateReceiver() {
            @Override
            public void onReceive(final Context context, final Intent intent) {
                onReceive.call(intent);
            }

            @Override
            public void onCreate(@NonNull final LifecycleOwner owner) {
                super.onCreate(owner);
                notifyIfMessagesPending();
            }
        });
    }
configures polling of message center - to be called by CGeoApplication
main/src/main/java/cgeo/geocaching/utils/MessageCenterUtils.java