What do I need to send a push notification for android (like iOS I need a device udid to send a simple push)?
And if I need to get the registration id of my device how can i get it?
Thank you.
An ID generated by the FCM SDK for each client app instance. Required for single device and device group messaging. Note that registration tokens must be kept secret.
To register a new device: Tap the menu icon. Tap anywhere in the section containing your name and profile picture. Tap DEVICES. Tap on Register Device.
Do you need this?
public static String getDeviceID(Context context) {
final TelephonyManager tm = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
final String tmDevice, tmSerial, tmPhone, androidId;
tmDevice = "" + tm.getDeviceId();
tmSerial = "";// + tm.getSimSerialNumber();
androidId = ""
+ android.provider.Settings.Secure.getString(
context.getContentResolver(),
android.provider.Settings.Secure.ANDROID_ID);
UUID deviceUuid = new UUID(androidId.hashCode(),
((long) tmDevice.hashCode() << 32) | tmSerial.hashCode());
String deviceId = deviceUuid.toString();
return deviceId;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With