A crutch…or even an impediment, IMO. When I first became interested in Android development I gave this a try, and it was confusing and not very useful. For me, the best approach was to just dive into full fledged development in eclipse. The first week was pretty painful, especially since I didn’t know Java, but now it’s a breeze. There is a ton of info for when you get stuck in java/android development. That’s where you’re going to end up…might as well start there?
There’s probably a better approach to Android development for beginners than Eclipse, but I don’t think this is it.
I’ve tried Eclipse but for me as a dummy, it’s a pain. This one is a bit limited, but very well and clear documented with a lot of tutorials.
For the Imp, when you mostly use a couple of buttons and/or sliders, it is a good way to start.
I’m always open for better suggestions…
It didn’t work for what I wanted to do, but if you’ve got it to work with Imp without hassle, you should post some code/instructions! If it works easily for basic purposes with the Imp, it should be praised.
I’m working my way trough the documentation at the moment.
But what I noticed in the docs made me optimistic:
Web
Non-visible component that provides functions for HTTP GET and POST requests.
Properties
AllowCookies
Whether the cookies from a response should be saved and used in subsequent requests. Cookies are only supported on Android version 2.3 or greater.
RequestHeaders
The request headers, as a list of two-element sublists. The first element of each sublist represents the request header field name. The second element of each sublist represents the request header field values, either a single value or a list containing multiple values.
ResponseFileName
The name of the file where the response should be saved. If SaveResponse is true and ResponseFileName is empty, then a new file name will be generated.
SaveResponse
Whether the response should be saved in a file.
Url
The URL for the web request.
Events
GotFile(text url, number responseCode, text responseType, text fileName)
Event indicating that a request has finished.
GotText(text url, number responseCode, text responseType, text responseContent)
Event indicating that a request has finished.
Methods
text BuildPostData(list list)
Converts a list of two-element sublists, representing name and value pairs, to a string formatted as application/x-www-form-urlencoded media type, suitable to pass to PostText.
ClearCookies()
Clears all cookies for this Web component.
Get()
Performs an HTTP GET request using the Url property and retrieves the response.
If the SaveResponse property is true, the response will be saved in a file and the GotFile event will be triggered. The ResponseFileName property can be used to specify the name of the file.
If the SaveResponse property is false, the GotText event will be triggered.
text HtmlTextDecode(text htmlText)
Decodes the given HTML text value. HTML character entities such as &, <, >, ', and " are changed to &, <, >, ', and ". Entities such as &#xhhhh, and &#nnnn are changed to the appropriate characters.
text JsonTextDecode(text jsonText)
Decodes the given JSON text value. If the given JSON text is surrounded by quotes, the quotes will be removed.
PostFile(text path)
Performs an HTTP POST request using the Url property and data from the specified file.
If the SaveResponse property is true, the response will be saved in a file and the GotFile event will be triggered. The ResponseFileName property can be used to specify the name of the file.
If the SaveResponse property is false, the GotText event will be triggered.
PostText(text text)
Performs an HTTP POST request using the Url property and the specified text.
The characters of the text are encoded using UTF-8 encoding.
If the SaveResponse property is true, the response will be saved in a file and the GotFile event will be triggered. The responseFileName property can be used to specify the name of the file.
If the SaveResponse property is false, the GotText event will be triggered.
PostTextWithEncoding(text text, text encoding)
Performs an HTTP POST request using the Url property and the specified text.
The characters of the text are encoded using the given encoding.
If the SaveResponse property is true, the response will be saved in a file and the GotFile event will be triggered. The ResponseFileName property can be used to specify the name of the file.
If the SaveResponse property is false, the GotText event will be triggered.
text UriEncode(text text)
Encodes the given text value so that it can be used in a URL.
Is there a simple andriod “toolkit” app available? Something that reads the status
and writes “button presses” to a selected IMP’s IO pins? I played with the toggle app, but finding a way to get a simple on/off/pulse status back from an IO pin (that is set by an external sensor) has eluded me. Something like this would simplify “garage door opener (momentary) with open closed status” or a “door bell (pulse) / activate buzzer pulse)” application.