Hi,
I have a field on a card that holds a URL e.g. http://123.345.67.890/output.txt I am using the following line to download the datafile output.txt .
I then process the data which is now in my variable. This works fine on the desktop (Mac) but when the application is loaded on to an Android Tablet or the emulator the line fails to get any data.
I have tried building the app with and without the "Internet" script library - the dictionary is a little ambiguous on if its needed and I confirm that the internet permission is ticked on the android build page.
try: put URL (field "fldMyUrl") into tBcnData --parens force evaluation of the field first.
Also make sure to put the space between field and "fldMyUrl" (was probably a typo but thought i'd point it out anyway.)
Simon Knight wrote:Hi,
I have a field on a card that holds a URL e.g. http://123.345.67.890/output.txt I am using the following line to download the datafile output.txt .
I then process the data which is now in my variable. This works fine on the desktop (Mac) but when the application is loaded on to an Android Tablet or the emulator the line fails to get any data.
I have tried building the app with and without the "Internet" script library - the dictionary is a little ambiguous on if its needed and I confirm that the internet permission is ticked on the android build page.
Some updates: the "result" is empty on both desktop and Android. The blank answer dialog is displayed before the file is down loaded (on desktop), on Android no file is downloaded.
The problem stems from my field which includes some text style: I have added a second default style field dragged in from the pallet and any URL text entered here is accessed correctly on both desktop and Android. The field that is causing the problem has text set to Arial 24 point and is colour blue. I have compared the text from this field with hard coded text and they pass an If statement it seems that the style information is getting through to the URL command and causing it to fail.
Hmm on windows 7, have tried everything I can think of to make it fail and can't with the exception that if I put quotes around the url string in the field then it will fail. Is it possible there is a hidden char, or some issue with the url or a single quote, or extra lines that you can't see that have data that might cause issues?
Maybe an extraneous space somewhere in the url in the non-working field that isn't in your new test field?
Hi,
I've discovered that the first field that fails on Android had a LF tacked on to the end of the text in the field. This did not cause a problem on desktop but stopped it working on Android. I don't know how the character was added or why the string comparisons I used to debug equated to true when one side of the test had an extra character.
Thanks for all your efforts and inputs, I will be more careful in future
It goes without saying that I am now unable to break the code by adding the LF back in.
Dear simon, i'm interested in your idea....can you explain me more precisely?? I don't have understood very well your solution to the problem....I have the same problem... put url don't go in android...
I'm sorry again can you tell me step by step your solution???