May be you can call the url from a web view. Then catch the response from the server after login, store response in a shared preference, and check the shared preference when logging in again.
Open open url on default browser with Basic Authentication
-
10-10-2022 - |
Question
I trying to open a web version from the app but I wanted to allow the user to avoid to have to login again. Is there a way that I can send the user's credentials or send a http header on the intent. The page I'm trying to open uses basic authentication.
so far what i have:
String url = "https://" + userManagementPageURL;
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
activity.startActivity(i);
I don't control the server that i'm trying to access so i can't make/request any modification to it.
Is what i'm trying possible? Is there any possible alternative? Thanks for any help, this is driving me insane.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow