• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Authentication in Adobe Air for Android

New Here ,
Jun 08, 2015 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

227

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
community guidelines
New Here ,
Jun 08, 2015 Jun 08, 2015

Copy link to clipboard

Copied

LATEST

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.

Votes

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
community guidelines