Problems with Push Notifications using Wordpress+OneSignal+Android

Hi there,

How do I open Push Notificstions sent from my Wordpress Blog via OneSignal in the Android App and not in the browser?
This topic keeps me busy but I cannot seem to find the correct solution.

I came across this code here but its not working either

import android.content.Intent;
import android.util.Log;
import com.onesignal.OSNotificationAction;
import com.onesignal.OSNotificationOpenResult;
import com.onesignal.OSNotification;
import com.onesignal.OSNotificationPayload;
import com.onesignal.OneSignal;
import org.json.JSONObject;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class Activity1 extends AppCompatActivity {

    protected void onCreate(Bundle savedInstanceState) {

        WebView webview = (WebView) findViewById(;

                .setNotificationOpenedHandler(new ExampleNotificationOpenedHandler())
    private class ExampleNotificationOpenedHandler implements OneSignal.NotificationOpenedHandler {
        public void notificationOpened(String message, JSONObject additionalData, boolean isActive) {
            if (additionalData != null && additionalData.has(""))

Open in new window

The error message is
Error:(31, 13) error: Activity1.ExampleNotificationOpenedHandler is not abstract and does not override abstract method notificationOpened(OSNotificationOpenResult) in NotificationOpenedHandler
Error:(34, 17) error: cannot find symbol variable webView
Who is Participating?
All Courses

From novice to tech pro — start learning today.