I know this question has been asked before, however, what has not been answered yet is, an sms is sent to your cellphone and WhatsApp automatically reads the token/authentication code from the sms, without requiring the user to enter the authentication code, then WhatsApp automatically enters the authentication code in the EditText area and then the installation of the App starts automatically.
Similarly, how can my App automatically read the authentication code from the message and enters this authentication code in the EditText area automatically followed by the installation of the App automatically. Any help or guidance regarding this would be highly appreciated.
WhatsApp reads your inbox and finds the message sent from it only, After that Whatsapp fetches the authentication code and display it to the view.
To implement such feature you need to write a Broadcast received which get the details when any SMS received and then you can filter that message to fetch your authentication code.
Refer this article. http://androidexample.com/Incomming_SMS_Broadcast_Receiver_-_Android_Example/index.php?view=article_discription&aid=62&aaid=87