I'm working with several applications. To log in we uses Oauth2 with customtabs using chrome.
The "mother" application performs a login then send an intent to every application to say "perform login a preload your data in background"
From there each application opens a customtab and close it, then do its other tasks in background.
yes I know, this is ugly, 6 customtabs are being opened and closed, but it is what was asked, no other solution is wanted.
To do that I made an activity without UI.
The activity receive the intent, launch the customtabs, retrieve the authorisation_code, get the tokens, then call a service to preload data and close itself (the invisible activity close itself)
Is that bad?
I did this because it's impossible to add an intent filter to an intent service, and my chrome customtabs send a intent when it's done. so only an activity can grab it.
Thanks.