BroadcastReceiver for push notification with android O

I’m switching my target-sdk to 26 (android O) and due to the new background execution limits my broadcast receiver is not working anymore. According to Google documentation

Broadcasts that require a signature permission are exempted from this >restriction, since these broadcasts are only sent to apps that are signed >with the same certificate, not to all the apps on the device.

So I added a custom permission in my manifest. It’s working when I trigger the broadcast programmatically sendBroadcast(intent, “my.permission”) but I can’t find a way to make it work on an action button on a push notification because I don’t know how to specify the permission

notificationBuilder.addAction(drawable, "title", pendingIntent);

and my pendingIntent is setup like this

Intent acceptIntent = new Intent();

pendingIntent = PendingIntent.getBroadcast(context,PENDING_INTENT_ACCEPT_REQUEST_CODE, acceptIntent,

My Manifest:

<permission android:name="my.permission" android:label="my_permission"
<uses-permission android:name="my.permission"/>
            <action android:name="android.intent.action.ACCEPT_ACTION"/>

I cannot register the receiver programmatically in my activity, because it’s not linked to an activity. I cannot use a JobScheduler because it’s not relevant for my usecase. Do you have an idea?