Skip to content

Json stored in Plugin.LocalNotification.RETURN_REQUEST has Geofence.Center.Latitude set to "NaN" and cause error when trying to deserialize to NotificationRequest #538

@peterwy222

Description

@peterwy222

Describe the bug
Json stored in Plugin.LocalNotification.RETURN_REQUEST has Geofence.Center.Latitude set to "NaN" and cause error when trying to deserialize to NotificationRequest

To Reproduce
Steps to reproduce the behavior:

  1. Trigger notification without geofence feature
  2. Fetch the json by using Intent.Extras.GetString("Plugin.LocalNotification.RETURN_REQUEST") in MainActivity.OnCreate when the notification is tapped
  3. Deserialize it to NotificationRequest object
  4. throws error: android.runtime.JavaProxyThrowable: [System.Text.Json.JsonException]: The JSON value could not be converted to System.Double. Path: $.Geofence.Center.Latitude

Expected behavior
The json should be able to be deserialized to NotificationRequest in any settings

Screenshots

Image

Platform (please complete the following information):
Android

Smartphone (please complete the following information):
Android

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions