B benji Active Member Licensed User Longtime User Dec 4, 2016 #1 hi, i have a problem with this sentence... if i use this in android 4.2, i don't have problems, but if i use this in 2.3.7, down execution... any idea? Code: Job2.Initialize("Job2",Me) Job2.Download("http://www.avalon.cl:8080/gprmc/Data?acct=estampa&dev=PDA01&gprmc=" & AuxSentence) thanks in advance
hi, i have a problem with this sentence... if i use this in android 4.2, i don't have problems, but if i use this in 2.3.7, down execution... any idea? Code: Job2.Initialize("Job2",Me) Job2.Download("http://www.avalon.cl:8080/gprmc/Data?acct=estampa&dev=PDA01&gprmc=" & AuxSentence) thanks in advance
KMatle Expert Licensed User Longtime User Dec 5, 2016 #2 Do you use the NEW okHttpUtils libraries? They replace the old ones. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 5, 2016 #3 Which error do you get? OkHttpUtils2 should be supported by Android 2.3+. Upvote 0
B benji Active Member Licensed User Longtime User Dec 5, 2016 #4 Erel said: Which error do you get? OkHttpUtils2 should be supported by Android 2.3+. Click to expand... this is ... i was looking okhttputils2, i prefer don't change any, may be i need to change the device jajaja Upvote 0
Erel said: Which error do you get? OkHttpUtils2 should be supported by Android 2.3+. Click to expand... this is ... i was looking okhttputils2, i prefer don't change any, may be i need to change the device jajaja
KMatle Expert Licensed User Longtime User Dec 5, 2016 #5 As it says: You use illegal characters. Use Download2 instead of Download as it converts the string. By the way: Where are those commata from? ",,,,,,,,,N*53" ? Upvote 0
As it says: You use illegal characters. Use Download2 instead of Download as it converts the string. By the way: Where are those commata from? ",,,,,,,,,N*53" ?
B benji Active Member Licensed User Longtime User Dec 5, 2016 #6 KMatle said: As it says: You use illegal characters. Use Download2 instead of Download as it converts the string. By the way: Where are those commata from? ",,,,,,,,,N*53" ? Click to expand... yes, i see "illegal characters", but in other device with android 4.2 i don't have it. is GPS data, in this case, is gprmc format Upvote 0
KMatle said: As it says: You use illegal characters. Use Download2 instead of Download as it converts the string. By the way: Where are those commata from? ",,,,,,,,,N*53" ? Click to expand... yes, i see "illegal characters", but in other device with android 4.2 i don't have it. is GPS data, in this case, is gprmc format
Pendrush Well-Known Member Licensed User Longtime User Dec 5, 2016 #7 Try to encode URL https://www.b4x.com/android/forum/threads/httputils2-problems-during-update.37229/#post-219540 Upvote 0
Try to encode URL https://www.b4x.com/android/forum/threads/httputils2-problems-during-update.37229/#post-219540
Erel B4X founder Staff member Licensed User Longtime User Dec 5, 2016 #8 You should use Job.Download2 to encode the parameters. Upvote 0
B benji Active Member Licensed User Longtime User Dec 5, 2016 #9 ok, i try this... but, why works in 4.2 and not in 2.3.7? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 5, 2016 #10 Hard to say. The $ character should be escaped. Upvote 0
KMatle Expert Licensed User Longtime User Dec 5, 2016 #11 benji said: ok, i try this... but, why works in 4.2 and not in 2.3.7? Click to expand... They added more comfort for the lazy developers like me However: Be careful not to use "special characters" non-escaped. It's a delight for hackers (see f.e. SQL-injection). If this is your site, you MUST check the data you get. Otherwise it is very easy to hack you site! Upvote 0
benji said: ok, i try this... but, why works in 4.2 and not in 2.3.7? Click to expand... They added more comfort for the lazy developers like me However: Be careful not to use "special characters" non-escaped. It's a delight for hackers (see f.e. SQL-injection). If this is your site, you MUST check the data you get. Otherwise it is very easy to hack you site!
B benji Active Member Licensed User Longtime User Dec 5, 2016 #12 Pendrush said: Try to encode URL https://www.b4x.com/android/forum/threads/httputils2-problems-during-update.37229/#post-219540 Click to expand... thanks, encode url works fine... Upvote 0
Pendrush said: Try to encode URL https://www.b4x.com/android/forum/threads/httputils2-problems-during-update.37229/#post-219540 Click to expand... thanks, encode url works fine...
B benji Active Member Licensed User Longtime User Dec 5, 2016 #13 KMatle said: However: Be careful not to use "special characters" non-escaped. Click to expand... i don't know that... what's mean non-escaped? Upvote 0
KMatle said: However: Be careful not to use "special characters" non-escaped. Click to expand... i don't know that... what's mean non-escaped?
KMatle Expert Licensed User Longtime User Dec 5, 2016 #14 This happened to you. You have sent characters which function as control chars or just produce false values. You send a message like this Code: "http://www.avalon.cl:8080/gprmc/Data?acct=estampa&dev=PDA01&gprmc=" & AuxSentence If I put a & in AuxSentence, how would the complete string look like? Code: "http://www.avalon.cl:8080/gprmc/Data?acct=estampa&dev=PDA01&gprmc=& Here the call would not work because & is a control value to seperate the values. Escaping means to replace that & to chars which are harmless (here %26). The new call looks like this Code: "http://www.avalon.cl:8080/gprmc/Data?acct=estampa&dev=PDA01&gprmc=%26 This is what URLENCODE in Download2 does automatic. See here for examples: http://www.w3schools.com/tags/ref_urlencode.asp Upvote 0
This happened to you. You have sent characters which function as control chars or just produce false values. You send a message like this Code: "http://www.avalon.cl:8080/gprmc/Data?acct=estampa&dev=PDA01&gprmc=" & AuxSentence If I put a & in AuxSentence, how would the complete string look like? Code: "http://www.avalon.cl:8080/gprmc/Data?acct=estampa&dev=PDA01&gprmc=& Here the call would not work because & is a control value to seperate the values. Escaping means to replace that & to chars which are harmless (here %26). The new call looks like this Code: "http://www.avalon.cl:8080/gprmc/Data?acct=estampa&dev=PDA01&gprmc=%26 This is what URLENCODE in Download2 does automatic. See here for examples: http://www.w3schools.com/tags/ref_urlencode.asp