The command Put Url "http://something" into tmydata Don't wo

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

The command Put Url "http://something" into tmydata Don't wo

Post by Fasasoftware » Tue Sep 18, 2012 2:36 pm

Dear friend,

i have this problem....

the command

Code: Select all

Put Url ("http://www.google.com") into tmydata
put tmydata into fld "test"
in my app for android

don't work.......in the app for android

i have putted it into a button....

i have also tryed this

Code: Select all

on mytest
Put Url ("http://www.google.com") into tmydata
put tmydata into fld "test"
end mytest

 on mouseup
send "mytest" to me
end mouseup

i have also tryed this....

Code: Select all


get  Url ("http://www.google.com")
put it  into fld "test"
But also nothing works here.I'm workink with livecode 5.5.2 ...but the put url don't work........can you help me???where is my fault??? this is extremely important for me....thanks a lot..in advance
Lestroso :D

dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

Re: The command Put Url "http://something" into tmydata Don'

Post by dave_probertGA6e24 » Tue Sep 18, 2012 2:56 pm

Hi,
What are you trying to achieve? Are you trying to recreate the page as you would see it in a browser? Or are you just trying to get the raw html data for later processing?

I've just tested this locally (not on a device) and it puts the contents into the field - though it doesn't show the formatted html because standard fields don't display a very large subset of html - only stuff relating to text as far as I know.

Code: Select all

   put url( "http://www.google.com") into tdat
   //set the htmltext of field "htfld" to tdat
   put tdat into field "htfld"
This should work on all devices and platforms.

Cheers,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: The command Put Url "http://something" into tmydata Don'

Post by Klaus » Tue Sep 18, 2012 3:02 pm

Buongiorno Lestroso,

according to the Android release notes this:
...
put url( "http://www.google.com") into fld 1
...
SHOULD work, no idea why it doesn't work for you.

@Dave
I think what Lestroso wants to achieve does not matter at all! 8)


Best

Klaus

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: The command Put Url "http://something" into tmydata Don'

Post by sturgis » Tue Sep 18, 2012 3:59 pm

Silly question, but are you sure you have a field named test? On the same card as the button? (Think i'd confirm the name to make sure)

Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

Re: The command Put Url "http://something" into tmydata Don'

Post by Fasasoftware » Tue Sep 18, 2012 5:59 pm

thank you klaus...thank you dave,....but the field test it's only an example.....

i don't know why don't work here....do you have another examples to share???


I thank you a lot....

best regards,

lestroso

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: The command Put Url "http://something" into tmydata Don'

Post by Klaus » Tue Sep 18, 2012 6:14 pm

Hi Lestroso,

if
...
put url("http://www.google.com") into fld 1
...
does not work, then any other example wont help very much! 8)


Best

Klaus

dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

Re: The command Put Url "http://something" into tmydata Don'

Post by dave_probertGA6e24 » Tue Sep 18, 2012 7:41 pm

Hi Lestroso,

Does the example work on your desktop machine? Or is it only on the Android device?

If it's only the device then which version of Android, it the device definitely connected to the internet, is the App blocked from accessing the internet somehow?

The code looks to be correct, and the examples do work (I've tested mine - but not on a device) - so it can only be an external problem or possibly some other part of your code (though if it's the equivalent code to the examples then there is unlikely to be a problem there!)

In what way does it fail for you - is it that the field shows no results (ie remains empty), or that it shows strange data?

At this point in time the more info we have to work with the easier it will be to point you in the correct direction regarding a solution.

I hope that helps,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

Re: The command Put Url "http://something" into tmydata Don'

Post by Fasasoftware » Tue Sep 18, 2012 8:05 pm

Dave, i thank you so much helping me.

ok... i have made an desktop application called I-binaryOptionsPredictor(you can download the demo here:http://www.fasasoftware.com/?page_id=1636 ) ......and i have compiled well ok in Windows and Macintosh Universal.....These apps works fine in these environments......but when i compile for Android with the same code.....the results is that the field that i need that i grab using the....... put url ("http:google.com") into field "prova" (this is only an example....) is empty!!!.....so the command don't works well or i miss something...???

In theory i have to grab with put url command a text from internet and put it into a field....that i will work later....


Do you have any Ideas????

Thank you for your time dedicated to me.....

Lestroso :oops:

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: The command Put Url "http://something" into tmydata Don'

Post by sturgis » Tue Sep 18, 2012 10:39 pm

Have you checked the internet checkbox for android application permissions in the standalone settings?
dave_probertGA6e24 wrote:Hi Lestroso,

Does the example work on your desktop machine? Or is it only on the Android device?

If it's only the device then which version of Android, it the device definitely connected to the internet, is the App blocked from accessing the internet somehow?

Dave

Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

Re: The command Put Url "http://something" into tmydata Don'

Post by Fasasoftware » Tue Sep 18, 2012 11:04 pm

may be i have missed it......i will look...but i'm not sure....


but i'll check and i will tell you...thanks again dave.....


lestroso

Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

Re: The command Put Url "http://something" into tmydata Don'

Post by Fasasoftware » Wed Sep 19, 2012 2:21 pm

Dear sturgis.....

i have rechecked all my software in the android's preferences but it's all ok the internet button is ok, i don't know what is the problem....

can you help me please??'? i thank you so much...

any software examples???

bye,

Lestroso

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: The command Put Url "http://something" into tmydata Don'

Post by sturgis » Wed Sep 19, 2012 2:41 pm

As Klaus said,
If this doesn't work...
put url("http://www.google.com") into fld 1
Not sure what to do to help. Can you post your stack? Are you sure the URL you are trying to hit is actually returning something? You might check "the result" after that to see if there is an error..

Code: Select all

get URL("http://your.url.com")
put the result into field 1
Might be some useful info there.

Are you doing this in a simulator? Are you able to access the internet from the simulator?

If you're testing on a device, same question, can it actually hit web pages (even if you're sure, wouldn't hurt to open the devices browser to confirm)

Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

Re: The command Put Url "http://something" into tmydata Don'

Post by Fasasoftware » Wed Sep 19, 2012 9:12 pm

Dear Sturgis,

yes , i'm working with simulator..but a friend of mine has an android phone and don't work again on his phone...i'll try your code as soon as possible and i will tell you... and i'm sorry but i can't post my stack because i'm selling it again....

Bye,
Lestroso :oops:

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: The command Put Url "http://something" into tmydata Don'

Post by dave.kilroy » Wed Mar 11, 2015 1:51 am

hi all

I've just spent over an hour trying to get my app's web service working on Android - it was working fine on iOS and mac but not a sqeak on Android. Eventually started googling and came across this thread ... and sturgis's great suggestion to check the permissions checkbox for internet

I was so blind I couldn't see that it was unchecked - I made the change, installed on Android again et voila everything worked!

Thank you sturgis and goodnight

Dave
"...this is not the code you are looking for..."

Post Reply