2

I know 2 ways

  • send KEY and parameters from server to client; generate notification body on client
  • send notification body from server to client

What approach is better in multilanguage application and why?

Romper
  • 2,009
  • 3
  • 24
  • 43

1 Answers1

0

The first approach requires a re-deploy of you application if you like to change text or add new notification types but uses less bandwidth. The second approach is more flexible in this regard. Though there is a size limit of the notification body... Not 100% sure but I think 2K for iOS and 4K for Android... but it usually should be enough. Also the benefit is that failing to send language selection after it changes

The second is easier to do, when user language is stored on server side. The language must be send when user is changing language in application, and if server response with failure the language in application should not be changed, because in this case languages in application and server will be unsynchronized.

Romper
  • 2,009
  • 3
  • 24
  • 43