The most simplest method to authenticates a device by any application is by using sms based authentication is wherein, we send an sms from the device to the same device and if the sms is received in the same, the device is authenticated. I guess, whatsapp in android still uses the above technique to perform device authentication.
Now, is it possible to mask the name of the sender while using the android sdk to send sms ? Or, is it carrier dependent ? Then, if it is not possible, how does whatsapp does device authentication using the above method while we recieve the sms as from 'DM_WHTSAPP' or something like that or does it use a standard sms gateway ?
There is no way to set the OA (originator address) via the Android SDK. If you wanted to send an SMS and include an alphanumeric OA you would need to use an SMS provider.
However, you should note that not all carriers will honour an alphanumeric OA and may either reject the message or alternately substitute the OA with an address it has linked back to the SMS provider.
If WhatsApp are delivering alphanumeric OAs in SMS they may have engaged directly with carriers to honour that.