Can I include an xml with my Air android app?

New Here ,
Jan 12, 2021 Jan 12, 2021

Copy link to clipboard

Copied

I am trying to include an xml that will be installed with the android app so that my user can save their username in the xml. is there a way to achieve this. I tried including the xml in the publish settings but android is not reading the xml.

This is my xml load function if needed.

var File1:String = File.applicationDirectory.nativePath;
var xmlLoader = new URLLoader();
xmlLoader.load(new URLRequest(File1.split("/").join("\\") + "\\config.xml"));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);

function xmlLoaded(e:Event):void{
	loginPanel.rememberMe.enabled = true;
	myXML = new XML(e.target.data);
	if(parseInt(StringUtils.between(myXML.toString(),"<Saved>","</Saved>")) == 1)
	{
		loginPanel.rememberMe.selected = true;
		var User:String = StringUtils.between(myXML.toString(),"<User>","</User>");
		loginPanel.username.Input.text = User;
	}
}

 

TOPICS
ActionScript, Code, Tablet

Views

133

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

correct answers 1 Correct Answer

Engaged , Jan 13, 2021 Jan 13, 2021
There is no need to include an xml file in the app to do this. The easiest way is to use a shared object.https://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d80.html#WSc3ff6d0ea7785946-5718d4e1205d835fd0-7ff7

Likes

Translate

Translate
Engaged ,
Jan 13, 2021 Jan 13, 2021

Copy link to clipboard

Copied

There is no need to include an xml file in the app to do this.
The easiest way is to use a shared object.

https://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d80.html#WSc3ff6d0ea77859...

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
community guidelines
New Here ,
Jan 16, 2021 Jan 16, 2021

Copy link to clipboard

Copied

Thank you Ill try you're suggestion and post back soon.

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
community guidelines
New Here ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

LATEST

this ended up working perfect I just got it implemented last night thank you again

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