Copy link to clipboard
Copied
Hi,
I am testing an app for iOS and later on also for Android. I am using an XML from PHP with and also without a MySQL database.
In one case I only use the current date to be published in the app in a textfield. Problem is that to get all ML connected textfields updated even when the XML allready is updated I have to completely restart the iPod Touch which I use to test on. Is there a way that the user is able to push a button to manually update the app without closing down the device? In addition, is there away that the app automaticaly refreshes its content?
Any help is greatly appreciated.
i don't understand your issue.
but, if you're trying to reload your xml and it's being retrieved from a cache, you can prevent that by appending a changing query string to the url. for example, instead of:
var url:URLRequest=new URLRequest("php/getXML.php");
use:
var url:URLRequest=new URLRequest("php/getXML.php?rannum="+Math.random());
Copy link to clipboard
Copied
what happens that updates your textfield when your app starts and that does not happen when you try to manually update?
Copy link to clipboard
Copied
Thanks for responding. I don't understand what you mean but it might be a good idea to see what happens if (if possible) I import the xml when hitting a button. At this moment the code is executed when the app starts. It seems that the external-xml is stored in memory until the device is restarted. Which is not allways a disadvantage.
Thanks for bringing up idea of it that what you meant.
Copy link to clipboard
Copied
i don't understand your issue.
but, if you're trying to reload your xml and it's being retrieved from a cache, you can prevent that by appending a changing query string to the url. for example, instead of:
var url:URLRequest=new URLRequest("php/getXML.php");
use:
var url:URLRequest=new URLRequest("php/getXML.php?rannum="+Math.random());
Copy link to clipboard
Copied
Thanks a lot. I will try that out.
Copy link to clipboard
Copied
sounds good.
Copy link to clipboard
Copied
Took me some time to find out why I didn't succeed.
I finally succeeded in the way kglad suggested.
Problem was that when you close the app and later on open it the information for example a date/time through php/xml doesnot change.
That is untill you click something.
So my test with just the date didnot seem to change anything.
But when I hit a button to another frame and send it back
The date/time are updated.
Thanks kglad for pointing me in the right direction.
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now