I'm experiencing an issue with TokenCredentials.create() when my app is cold started without Internet connection, but regains Internet connection after some seconds. After my app regains Internet connection, and we retry to authenticate, TokenCredentials.create() will immediately fail with UnknownHostException, even though the device has Internet connection.
Please take a look into my test project on GitHub where there is also a video demonstrating the problem.
https://github.com/erlingfjelstad/esri-auth-to-map/tree/master