Question for dev_id usage.
iskorum opened this issue · comments
Yasin YILMAZ commented
In model why dev_id
is unique but reg_id
is not? And what is dev_id
for?
And reg_id
is TextField
, why?
Adam Bogdał commented
Hi @iskorum.
Good point. reg_id
should be unique and have the same field type as dev_id
.
dev_id
gives us information about which device we want to register/unregister (particularly useful when we have multiple devices).
Osman Saral commented
This is how you get dev_id
on Android side @iskorum :
import android.provider.Settings.Secure;
...
String deviceID = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);
Yasin YILMAZ commented
Adam Bogdał commented
Yeah, I agree with you @iskorum.
btw. I didn't find any information about the maximum length for reg_id
in the google documentation. I think it's better to leave the field type as now.