Override OpenExternalUrlAction

Is there any way to override OpenExternalUrlAction and handle open the URL in the App itself.

 

I tried to get the URL from OnNotificationOpened.

but I can't control the default action to open the browser

 

 

 

protected override bool OnNotificationOpened(Context context, AirshipReceiver.NotificationInfo notificationInfo)
{
Log.Info(TAG, "Notification opened. Alert: " + notificationInfo.Message.Alert + ". Notification ID: " + notificationInfo.NotificationId);

// Return false here to allow Urban Airship to auto launch the launcher
// activity for foreground notification action buttons
if (notificationInfo.Message != null && notificationInfo.Message.Actions != null)
{
var actions = notificationInfo.Message.Actions;
foreach (var item in actions)
{
if (item.Key == "^u")
{
Helper.IsFromNotification = true;
Helper.NotificationUrl = item.Value.String;
if(Helper.IsPageLoaded)
{
}
}
}
return false;
}
else
{
return true;
}
}

 

Didn't find what you were looking for?

New post

Comments

1 comment

  • Manikandan,

    There is a way to override this method, but before we get to that, could you give me a little more detail about what use case you're trying to solve for?

    0

Please sign in to leave a comment.