Hi
1.87 version is released with the fix to click url for custom one time push notification, it is also tested using webview android code, push notification click url from this PNFPB plugin is working. When external urls are used like for example bing.com is passed, it is working in mobile app after clicking on push notification, it is redirecting to external url within webview. In your android code(below mentioned code is in Java), please verify following things, if you app is written in other than Java, please create equivalent code like below mentioned for background state and for foreground state of app
When app is in background/in off state then if you click on notification, click url needs to be received using intent by checking for key click_url
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle extras = getIntent().getExtras();
if(extras != null){
if(extras.containsKey("click_url"))
{
intentUrl = extras.getString("click_url");
}
}
mywebView.loadUrl(intentUrl);
When app is in foreground then in class public class MyFirebaseMessagingService extends FirebaseMessagingService use code like below to get click_url remoteMessage.getData().get(“click_url”);
Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody());
String notificationTitle = remoteMessage.getNotification().getTitle();
Uri notificationImage = remoteMessage.getNotification().getImageUrl();
String notificationBody = remoteMessage.getNotification().getBody();
String pnfpb_click_url = remoteMessage.getData().get("click_url");
Following are release details of 1.87 version of PNFPB plugin
1.87 version Apr 21 2024
- Updated logic to have click url in one time custom push notification and for all push notifications using httpv1 Firebase api version under data array for webview.
- Fixed problem on selecting page url from drop down list for one time push notification click url in admin settings one time push notification tab.
- Regenerated pot file for text domain to have latest text strings.