
I think this is possible and has been discussed, but I can not find it. Is there a format to execute scripts or commands using an application that can send HTTP GET or POST commands but not be using a web browser, either with the HTTP Server or HTTP Server (custom).
I don't think I can do it with the HTTP Custom because it uses AJAX and I don't know how I would format a request (and unfortunately, the documentation is fairly minimal) but I thought someone was already doing this with the simple HTTP server, embedding the user name and hte request in the URL of the GET.
I also know I can do this with Telnet using the TCP Clients object, and I may use that for my solution, but it is a little more limiting.
I'll explain my goal in case it provides any other thought.
I want to be able to drive my robot from my Android phone or an Android Wear smartwatch. I don't want to use the mobile interface, I want to have an embedded computer running ARC performing a number of tasks, the remote interface just to give additional commands.
I have two applications that can easily send HTTP Get or Post requests and allow me to build custom interfaces. Anymote smart remote, and Tasker. With a Tasker plugin I can also send Telnet requests, and I may wind up going in that direction if I am wrong that this can't be done with one of the web servers, but that isn't really the direction I wanted to go. (I think I could also do it using Eventghost to receive the HTTP requests and then send telnet requests to ARC, and I am sure I could write a plugin or do something with the SDK once my C# skills are up to speed, but I could swear this is existing functionality and I just can't find the right nomenclature for the command).
Alan
C# sounds intimidating because it has the letter C in it. The only reason for the C is the inspired syntax. But I assure you, that c# is the best programming language since basic on my Apple ][
The great thing about visual studio is syntax completion. Every time you press the . button after a namespace/class/method, there is a popup of optional children. And then once you select the child, you can scroll through overrides (different uses of the command). It's amazing how self documenting C# is because of that intellisense.
Another great feature of C# is that it's very "basic-like". Meaning, basic has become more complicated than C# to do anything at all. When i read about people using VB.Net, i shake my head at how frustrated they must be to get anything done. If they just used the energy to learn C# rather than be frustrated, life would be grand.
The flexibility of C# is really where it helps programmers like me. Obviously I have quite the range of programming environment ability, as the ez-robot products demonstrate. From assembler, to C to C++ to C# to HTML to Javascript etc etc etc... The language i prefer is C#. This is because you can start small, such as the plugin tutorial demonstrates. And once you really get the language, you can start digging deep into direct memory access (which is called unsafe in C#). You can even use pinvokes to execute C/C++ unmanaged code. And if you're a C++ programmer, you can (i don't know why anyone would) use CLR.
There's a pile of benchmarks out there - and if you look, it's interesting to notice the performance benefits of C# as well. This is because unlike native code, the .net runtime can perform ahead of time pre-compiling and re-using object memory. I can go on for ever about how great the performance is and why...
Lastly, say good bye to buffer overflows with C#! Unless you're using unsafe{}, but that's for experienced C++ programmers that want access to memory via pointers.
So, visit the plugin tutorial and try it out. It's not hard!
@Alan,
1) a web http frontend app (some buttons) is not enough ?
2) expose a http rest API and create an android widget, i never tried to build one, does the watch support widgets ?
That's a good question, ptp. You can easily create a plugin that hosts a webservice. That is a built-in feature of .Net which is super easy to create. If the watch has an app that can send/receive webservice based on a wsdl (or what ever xml template), the ARC skill plugin can accommodate.
@DJ yes that is available and .net make the life easy,
the other side (watch) is the unknown part, trying to understand what could be used or Alan's idea.
not related with the initial question, since the first consumer smartphone (iphone) i stopped using a watch, i had the feeling that the watch concept was dead (excluding the apparel reasons), i m always with a phone near by me, so i still struggle to find a need for a smartwatch but if i had a car like the Knight Rider could make sense to talk to the watch....
it's interesting apple and others trying to bring the concept back ...
ptp, have you seen the ez-robot apple watch app? It's the only reason i have an apple watch. Soon you will be able to customize the apple watch app just like the ARC mobile interface. It's on the list, just haven't had time to finish it yet...
I am not aware of any Android apps, let alone Android Wear apps that allow you to call the web service of your choice. Certainly many of them use web services (all of the weather apps certainly do).
Interestingly, one of the reasons I haven't buckled down and taken on C# yet is that I also want to write some Android apps, and they has typically been done in Java in Eclipse. However, I just installed Visual Studio 2015 Community this weekend and see that it has Android App development, so it looks like I can potentially just learn C# and kill two birds with one stone (I haven't really looked to see if the Android development is actually done in C# or something else in the same IDE).
I have some other web service stuff I want to do as well, so that might be the direction I follow, and the EZ-B control app would just be 5 buttons with web service requests behind them, and maybe a settings screen to define the URL where the services are hosted, so should be pretty simple to write in any language.
Lots of food for thought.
Alan
it's Xamarin - which Microsoft has teamed up with for cross platform development on mobile. It's also what EZ-Robot uses for mobile.
It uses C# and "converts" the binary output to the native language. For example, on Android, the C# is binded to Java methods. On iOS the C# is compiled native to it's objective c.
The only down fall is the price. Xamarin is a few thousand dollars for a year subscription. As a corporation, it makes sense for us. This is also why the Android and iOS version of ARC Mobile is identify. They both share about 40% of the same code. That 40% of code relates to hundres of man hours per year, which justifies the cost.
However, Xamarin has so many bugs and poor implementation that 10% of development cycles are used to circumvent stuff they over looked. Implementing RoboScratch on Mobile, for example, was an absolute nitemare! You have no idea the number of GUI issues i suffered with, and their responses are never helpful. You have to learn to accept that they're doing anything about it
Hmm. I'll have to see how the licensing works in the Community Edition of VS. I suspect it will let me build apps for personal use but not distribute them.
Alan