universal-tools / UTNotificationsFeedback

7 stars 0 forks source link

Android Crash when push is receive (app open or background) #116

Closed pkapfer77 closed 4 years ago

pkapfer77 commented 4 years ago

I have looked at the manual and at the issue: https://github.com/universal-tools/UTNotificationsFeedback/issues/11 That sounds that my json is wrong defined on the server side (to send to FCM), but I write it this way (like asked in your doc): string json = "{\"to\": \"" + deviceToken + "\", \"data\": { \"title\":\"" + title + "\",\"text\":\"" + body + "\",\"id\":"+idMsg + " } }";  So the sent JSON result look like this: --> { "to": "ezOoZe-uiX0:APA91bFHqLbwPBB_...…." , "data" : { "title":"test2" , "text":"Supercool","id":100 } } I have as well tried to reach the support using email, but no answer yet. Have some one an idea how to solve that ?

yuriy-universal-ivanov commented 4 years ago

Hi @Bob-pk77 ,

Your json is alright, besides UTNotifications shouldn't crash on misformatted messages anymore anyway (please note though that your code is unreliable as in case title or body contain some special characters, f.e. such as " the sending will fail due invalid json).

So the issue is caused by something else. There is a number of potentials reasons, most likely it's either a missing (unresolved) system library in your project or a conflict with a 3rd party library / asset). I'll need some more details from you to help with that:

  1. Please show me the list of all files and folders in your Assets/Plugins/Android.
  2. Please tell me what exception is being logged in Android LogCat when your app crashes.

Best regards, Yuriy, Universal Tools team.

pkapfer77 commented 4 years ago

Hi, I have corrected the Probem in changing in the Build settings, use Custom Gradle Template and disabled Jetifier under Go to Assets > Play Services Resolver > Android Resolver > Settings