Highlighted

Authentication in Adobe Air for Android

New Here ,
Jun 08, 2015

Copy link to clipboard

Copied

I have a stagewebview that displays a page in my Air for Android app. I am aware that authentication dialog ui wont show up when running the apk on a device (i's not supported atm) so does anyone know a workaround for this? can i set the username and password using URLRequestDefaults.setLoginCredentialsForHost? I have tried doing this before loading the page in the stageview but it doesn't seem to work.

TOPICS
Development

Views

177

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Authentication in Adobe Air for Android

New Here ,
Jun 08, 2015

Copy link to clipboard

Copied

I have a stagewebview that displays a page in my Air for Android app. I am aware that authentication dialog ui wont show up when running the apk on a device (i's not supported atm) so does anyone know a workaround for this? can i set the username and password using URLRequestDefaults.setLoginCredentialsForHost? I have tried doing this before loading the page in the stageview but it doesn't seem to work.

TOPICS
Development

Views

178

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 08, 2015 0
New Here ,
Jun 08, 2015

Copy link to clipboard

Copied

I have also tried to do the authentication in the header like this :

  

    var encodedUsrPassword:String = Base64.encode( loginID + ":" + loginPasswd);

    var urlStream0:URLStream = new URLStream();

    var urlRequest_HTTPBasic:URLRequest = new URLRequest(url);

    urlRequest_HTTPBasic.authenticate = false;

    var urlRequestHeader1:URLRequestHeader = new URLRequestHeader("Authorization", "Basic " + encodedUsrPassword );

    urlRequest_HTTPBasic.requestHeaders.push(urlRequestHeader1);

    urlStream0.load(urlRequest_HTTPBasic);

    webView.loadURL(urlRequestHeader1);

But i get the error :

error loading page: The protocol is not supported.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 08, 2015 0