I've been following instructions here: https://developers.arcgis.com/documentation/security-and-authentication/app-authentication/
I have a web server which has a client ID and secret using OAuth to generate a token. This token gets downloaded to an Android client which I intend to use for ArcGIS mapping. I will handle downloading fresh tokens when need be.
This exact scenario is supposedly supported according to the documentation above.
However, once I download this token to my client, there is no suitable ArcGISCredentials I can use to store it in the ArcGISCredentialStore.
I assumed PregeneratedTokenCredential would be the answer, but that requires you to use a /generateToken endpoint which is not OAuth. That endpoint uses a username and password. Therefore the token I use here is invalid.
The OAuthTokenCredentials either initiate a login flow, or use a client secret on the client. These are not suitable.
Why can't I just use the OAuth token I have downloaded to the client, which the documentation has suggested I can do?
Is there something I'm missing?