Hallo Robin,
In NCReceiver you try to access Extension.mainActivity .. it is null!
// Intent notificationIntent = new Intent(context, Extension.mainActivity.getClass());
// PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);
Replace above with this:
PendingIntent contentIntent= PendingIntent.getActivity(context.getApplicationContext(), 0, new Intent(), 0);
So we create a new Intent.
Rest works fine!
For the iOS I needed to change something as well to make it work on < iOS 8 … Everything works nicely on iOS 8.1.2 but failed on my older devices.
// [self setNotificationTypesAllowed];
And to let the <ios8 do actually something I assume allowNotif so I commented out those things:
//if (allowNotif)
//{
…
//}
So now I can try to connect to my server and display messages that I need to say to the user.
On Android/Java I think I can manage to not raise the notification but keep it repeating.
Do you have a trick I could use to do the same in iOS?
What I want is to check on notification for something on a server and depending on
the result raise the actual notification or omit the notification and check the server in the repeated - setting.
Best regards/
Vriendelijke groet!
M.E.