Android POST Command Fails

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
ddupont
Posts: 10
Joined: Tue Aug 06, 2013 6:14 pm

Android POST Command Fails

Post by ddupont » Tue Oct 08, 2013 10:36 pm

I think the internet library is not being generated. No DLL's in the directory where the apk is created when saving for Android. I have looked for anything labeled internet in the LiveCode folders, hoping to find the library and manually include it with my build. No luck. I have tried on three versions, with the last version being LC 6.1.2 (rc 1).

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Android POST Command Fails

Post by Simon » Tue Oct 08, 2013 11:53 pm

Hi ddupont,
All needed libraries will be inside the apk not a separate file (that is if they are even called libraries at that point).
Make sure you have "Internet" selected in the standalone builder and any other controls you need.

No manual copying of files is needed. When you have the app setup correctly everything will be inside the single apk. Even all your "Copy Files".

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ddupont
Posts: 10
Joined: Tue Aug 06, 2013 6:14 pm

Re: Android POST Command Fails

Post by ddupont » Wed Oct 09, 2013 12:17 am

I have used the "Search for " automatic function and have done the manual method of clicking on Internet, etc. The post command does nothing. The app has the results of the post command going to a field. Nothing shows up in the field. Works great running the app in LiveCode on my Windows machine and as a Windows Stand-alone app (where the revsecurity.dll is created in the same folder as the stand-alone Windows app). But making it for Android results in nothing happening in the app.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Android POST Command Fails

Post by Simon » Wed Oct 09, 2013 12:20 am

"Internet" is in the Android standalone settings not in "General" tab.
Do you have that selected?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Android POST Command Fails

Post by LCNeil » Wed Oct 09, 2013 10:33 am

Hi ddupont,

The DLLs that you mention are specific to the Windows platform so will not be included in the Android APK.

The POST command is available to use on the Android platform even though the libURL internet library is not supported on the mobile platform.

As Simon has mentioned, you must ensure that "Internet" is enabled in the Android standalone settings. Please see the attached picture that shows this setting.

If this is the cause of the issue, enabling "Internet" should allow the POST command to function as expected.

Kind Regards,

Neil Roger

--
RunRev Support Team ~ http://www.runrev.com
--
Attachments
Screen Shot 2013-10-09 at 10.30.49.png

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Fri Aug 15, 2008 7:15 am

Re: Android POST Command Fails

Post by bangkok » Wed Oct 09, 2013 10:37 am

And to complete the last answer : be careful with the POST bug.

See :

http://forums.runrev.com/viewtopic.php?f=66&t=16195

You'll have to rePOST, if you receive the "java.io.EOFException" error message.

ddupont
Posts: 10
Joined: Tue Aug 06, 2013 6:14 pm

Re: Android POST Command Fails

Post by ddupont » Wed Oct 09, 2013 4:10 pm

Yes, Internet is selected on the Android tab as well as on the general tab.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Android POST Command Fails

Post by LCNeil » Thu Oct 10, 2013 10:02 am

Hi ddupont,

Could you upload a sample stack that shows that shows how you are executing the POST command? This will allow us to investigate the issue and try to track down what coud be causing it.

Kind Regards,

Neil Roger

--
RunRev Support Team ~ http://www.runrev.com
--

ddupont
Posts: 10
Joined: Tue Aug 06, 2013 6:14 pm

Re: Android POST Command Fails

Post by ddupont » Thu Oct 10, 2013 4:50 pm

I am using another person's stack, which I have attached.
Attachments
AndroidGCM-for-Android.zip
(4.67 KiB) Downloaded 118 times

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Android POST Command Fails

Post by LCNeil » Thu Oct 10, 2013 5:23 pm

Hi ddupont,

thank you for supplying the sample stack

On the card script of the supplied stack, libUrlSetSSLVerification is being set to false. As this command is not yet compatible on mobile it will cause a silent break in your Application with no script following it being executed.

You can see a more visual representation of this by commenting out the libUrlSetSSLVerification line and then simply answering tNotification.

e.g.

Code: Select all

   # had a couple of errors that were resolved by setting/resetting this flag  :/
   --libUrlSetSSLVerification false
   
   # send the notification
   answer tNotification
   --post tNotification to url "https://android.googleapis.com/gcm/send"
   --return it
With the libUrlSetSSLVerification command commented out, the POST command should function.

With that being said, if the libURLSetSSLVerification command is required for this stack to operate, then there is the possiblity it will not run on the mobile platforms. I would recommend discussing this with the author of the stack if this is the case.

Kind Regards,

Neil Roger

--
RunRev Support Team ~ http://www.runrev.com
--

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Android POST Command Fails

Post by Simon » Thu Oct 10, 2013 5:30 pm

Hi ddupont,
This stack wasn't made to run on Android, but to send push notifications to Android.
That "libUrlSetSSLVerification" does not work with Android.

Can it be made to run on Android? Probably.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ddupont
Posts: 10
Joined: Tue Aug 06, 2013 6:14 pm

Re: Android POST Command Fails

Post by ddupont » Fri Oct 11, 2013 4:31 pm

Removing the libUrlSetSSLVerification setting did the trick. There is still hope for me as I have learned something. :D

Thank you for your assistance. LiveCode is very friendly but it still takes time to understand it all. Especially for me since I am a beginner.

Thank you!

Post Reply

Return to “Android Deployment”