Skip to main content
Serifaz
Known Participant
January 13, 2021
Question

Can I include an xml with my Air android app?

  • January 13, 2021
  • 2 replies
  • 342 views

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;
	}
}

 

This topic has been closed for replies.

2 replies

Serifaz
SerifazAuthor
Known Participant
February 5, 2021

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

Serifaz
SerifazAuthor
Known Participant
January 16, 2021

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