質問

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.

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top