Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Using of OPFPushReceiver

Roman Savin edited this page Apr 10, 2015 · 1 revision

You can use BroadcastReceiver instead of EventListener for receiving push events. Just extend OPFPushReceiver and add your receiver to AndroidManifest.xml with the following intent filter:

<receiver
    android:name="[YOUR_RECEIVER_NAME]"
    android:exported="false">
    
    <intent-filter>
        <action android:name="org.onepf.opfpush.intent.NO_AVAILABLE_PROVIDER" />
        <action android:name="org.onepf.opfpush.intent.RECEIVE" />
        <action android:name="org.onepf.opfpush.intent.REGISTRATION" />
        <action android:name="org.onepf.opfpush.intent.UNREGISTRATION" />
    </intent-filter>
</receiver>

IMPORTANT You can't use EventListener and OPFPushReceiver in the same project.