Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top