0

I have to send Push Notification through java server, how can I detect the device is android or iOS?

jh314
  • 27,144
  • 16
  • 62
  • 82

2 Answers2

1

There is no magic to know device type by token. You have to send device_type while registering for push notification or login service . USE "ios" or "android" strings hardcoded for iphone and android against against device_type. Thats how you know which token is against which device. Send ios notifications via APNs or GCM to ios or android devices respectively

Muhammad Adnan
  • 2,668
  • 15
  • 27
0

I have to send Push Notification through java server, how can I detect the device is android or iOS?

Well the implementation of push notifications in every platform is completely different! in both you don´t need to know the platform.

Jorgesys
  • 124,308
  • 23
  • 334
  • 268