Announcement

Collapse
No announcement yet.

Webserver AMS8 - LuaSocket HTTP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tone
    replied
    well done mate :yes

    Leave a comment:


  • Desrat
    replied
    Issue resolved - status codes are required in server responses or droid browser rejects the data

    http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

    Leave a comment:


  • Desrat
    replied
    Originally posted by Worm View Post
    Wouldn't know for sure without looking, but my guess is that the Droid web browsers are expecting a certain message from the web server when connection is accepted or attempted.
    Again anyone now how I can trace/test this theory? I really need to address this issue, without it my app is dead in the water...

    Leave a comment:


  • Desrat
    replied
    Originally posted by Tone View Post
    Have you heard of Skyfire?

    Skyfire for Android .. www.skyfire.com/product/android

    try that
    Dont get the server failed to communicate error just a web page unavailable so still no go :(
    Last edited by Desrat; 02-14-2011, 12:57 PM.

    Leave a comment:


  • Tone
    replied
    Have you heard of Skyfire?

    Skyfire for Android .. www.skyfire.com/product/android

    try that

    Nice work .74

    Leave a comment:


  • Desrat
    replied
    Originally posted by Worm View Post
    Wouldn't know for sure without looking, but my guess is that the Droid web browsers are expecting a certain message from the web server when connection is accepted or attempted.
    any ideas how I'd find that out?

    Originally posted by .74 View Post
    I wrote this fast but you can do your own modification:

    OnShow:
    Code:
    myEmail = "[email protected]" -- Your private email which you will use to send the commands from.
    strOldCmd = "";
    Page.StartTimer(60000, 1);
    OnTimer:
    Code:
    if e_ID == 1 then
    	HTTP.DownloadSecure("https://mail.google.com/gmail/feed/atom", _TempFolder.."\\email.xml", MODE_BINARY, 20, 443, nil, nil, nil);
    	XML.Load(_TempFolder.."\\email.xml");
    	strCmd = XML.GetValue("feed/entry/title");
    	strAuthor = XML.GetValue("feed/entry/email");
    	if strAuthor == myEmail then
    		if strCmd ~= strOldCmd then
    			strCmd = strOldCmd;
    			-- Commands
    			if strCmd == "testcmd" then
    				Dialog.Message("Testcmd", "You have entered testcmd");
    			elseif strCmd == "hello" then
    				Dialog.Message("Hello", "You have entered hello");
    			elseif strCmd == "alarm" then
    				Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\Alarm.mp3", true, false);
    			end
    		end
    	end
    	File.Delete(_TempFolder.."\\email.xml", false, false, false, nil);
    end
    Remember to login in gmail.com in your special account via Internet Explorer first.
    I'll definately have a little play with this.

    Leave a comment:


  • .74
    replied
    I wrote this fast but you can do your own modification:

    OnShow:
    Code:
    myEmail = "[email protected]" -- Your private email which you will use to send the commands from.
    strOldCmd = "";
    Page.StartTimer(60000, 1);
    OnTimer:
    Code:
    if e_ID == 1 then
    	HTTP.DownloadSecure("https://mail.google.com/gmail/feed/atom", _TempFolder.."\\email.xml", MODE_BINARY, 20, 443, nil, nil, nil);
    	XML.Load(_TempFolder.."\\email.xml");
    	strCmd = XML.GetValue("feed/entry/title");
    	strAuthor = XML.GetValue("feed/entry/email");
    	if strAuthor == myEmail then
    		if strCmd ~= strOldCmd then
    			strCmd = strOldCmd;
    			-- Commands
    			if strCmd == "testcmd" then
    				Dialog.Message("Testcmd", "You have entered testcmd");
    			elseif strCmd == "hello" then
    				Dialog.Message("Hello", "You have entered hello");
    			elseif strCmd == "alarm" then
    				Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\Alarm.mp3", true, false);
    			end
    		end
    	end
    	File.Delete(_TempFolder.."\\email.xml", false, false, false, nil);
    end
    Remember to login in gmail.com in your special account via Internet Explorer first.

    Leave a comment:


  • Worm
    replied
    Wouldn't know for sure without looking, but my guess is that the Droid web browsers are expecting a certain message from the web server when connection is accepted or attempted.

    Leave a comment:


  • Desrat
    replied
    Originally posted by .74 View Post
    If you want to control your computer with your ipod then this is what I did. I made a program with AMS which will check the RSS feed of a special email (@gmail) that I created just for this case.
    My requirement for this is in real time, but I'd be interested to see that implementation.

    Leave a comment:


  • .74
    replied
    If you want to control your computer with your ipod then this is what I did. I made a program with AMS which will check the RSS feed of a special email (@gmail) that I created just for this case. Then you can add a 1 minute timer which will check that RSS feed. So if you want to send a command to the program, then you just have to send an email via ipod to that special email and the program will do what ever you asked. If you want I can make an example.

    Leave a comment:


  • Desrat
    replied
    nice to see ya worm and thanks for the great example this is based off - but being as your looking anyway any idea on the android issue?

    Leave a comment:


  • Worm
    replied
    Yea... I'm more of a lurker these days than a contributor. I do check in at least a couple times a week to try to stay in the loop of AMS. I'm still here, just flying low for the time being.

    Leave a comment:


  • Desrat
    replied
    also just tried live android in vmware same issue.

    Leave a comment:


  • Desrat
    replied
    anyone have any idea why a user cant connect from android based devices - keep getting "Data connectivity problem: the server failed to communicate. Try again later" - should add the android devices are a motorola backflip and a HTC desire - tried multiple different browsers on these devices with no success however pc's, mac, linux, and iOS all work fine - just android being a pain.

    Leave a comment:


  • sim
    replied
    Originally posted by Desrat View Post
    The reason I'm working on this is for remote access to an ams app on my pc from my ipod touch, I have tried socket plugin but whilst its awesome for app to app connections I dont have the knowledge to use it in this situation need more time with it - I dont need full remote desktop access that is sluggish and unwieldy on a 320x480 display, I just want to stop/start/monitor the odd program so there should never be a requirement for more than a single user to be connected - its just that the implementation in the apz above seemed a little clunky but I'm still playing around with it..
    Hey there I added the same kind of option within a IRC bot I am playing with its able to start stop and restart my webserver and in the future restart shutdown lock the server its self and other little tricks like this nice idea Desrat

    Leave a comment:

Working...
X