I'm struggling to get specific behavior for OAuth authorization using the ubiquitous callback using a special scheme -> the aim_filter method.
My application registers for SEND actions and, when called, start the service, which, in turn, checks whether the user is already authorized and, if not, generates an activity (OAuthActivity) to request a login.
Keep in mind that there can be any front activity right before that. Then the action launches the VIEW intention to open the authorization page in the browser; the latter calls the processed callback (with the user schema defined in the manifest) and wakes up OAuthActivity.
OAuthActivity currently has launchMode="singleTask" , but this has nothing to do with the perspectives of the stack (it comes back from the top when called).
Is there a way to clear the activity stack and return to what the user is doing, rather than getting him to click back on browser activity? (Then I will show a notification when the content was successfully sent in the background)
Does anyone have pointers? Thanks for reading
Utaal source share