Highlighted

loading html file from ipad's application storage directory in AirforIOS

Participant ,
Mar 01, 2020

Copy link to clipboard

Copied

Dear Friends,


iam creating an app with AirforIOS, it has online and offline mode. iam trying to load html file in stagewebview, it loading in online mode. but in offline mode its not. iam loading my html file from application storage directory.
var webView: StageWebView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle(0, 20, stage.stageWidth, stage.stageHeight+10);

var loadLocation:String = "";
if(onlineMode){
loadLocation = downloadSite;
}else{
loadLocation = new File(File.applicationStorageDirectory.resolvePath(currentModuleLocation+"/Lessons/"+currentLessonLocation+"/index.html").nativePath).url;
}

webView.loadURL(loadLocation+"?aa=" + webLesVal + "&bb=" + tokenType + " " + accessToken + "&cc=" + deviceID);

stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey);
trace(StageWebView.isSupported);

Thanks in advance,

Syed Abdul Rahim

TOPICS
Air beta, Development

Views

263

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

loading html file from ipad's application storage directory in AirforIOS

Participant ,
Mar 01, 2020

Copy link to clipboard

Copied

Dear Friends,


iam creating an app with AirforIOS, it has online and offline mode. iam trying to load html file in stagewebview, it loading in online mode. but in offline mode its not. iam loading my html file from application storage directory.
var webView: StageWebView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle(0, 20, stage.stageWidth, stage.stageHeight+10);

var loadLocation:String = "";
if(onlineMode){
loadLocation = downloadSite;
}else{
loadLocation = new File(File.applicationStorageDirectory.resolvePath(currentModuleLocation+"/Lessons/"+currentLessonLocation+"/index.html").nativePath).url;
}

webView.loadURL(loadLocation+"?aa=" + webLesVal + "&bb=" + tokenType + " " + accessToken + "&cc=" + deviceID);

stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey);
trace(StageWebView.isSupported);

Thanks in advance,

Syed Abdul Rahim

TOPICS
Air beta, Development

Views

264

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
Mar 01, 2020 0
Participant ,
Mar 01, 2020

Copy link to clipboard

Copied

iam using Air SDK 32.0.0.116 Air for IOS. Please help me to find a solution my friend... i got struck up...

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...
Mar 01, 2020 0