I think the developer-savvy community here could benefit greatly from a remote-controlled security service on the Pre. Imagine a server that can do whatever you need it to, should you lose your Pre. Personally, if I lose my phone, the first thing I'd want to know are its GPS coordinates. Should it be stolen, nothing would make me happier than to find the punk who took it (so I can reward him, of course). The beauty of it is that we can design the framework so that open-source developers easily add new security modules to it.
Basically, it would be a client-server TCP/IP sockets application. The server side (Pre-side) would need no front end (maybe a prefs interface if we can make it WebOS). The client side could be a web page, a standalone app, or even a web service. Initially, I'd like to have 4 services: Get GPS location, turn GPS on, turn GPS off, get GPS on/off status.
Server-side (Pre-side) Requirements- TBD: Decide if we can do this in WebOS, or if Linux OS-level is required. If Linux OS-level, decide on a language for coding the initial framework.
- TBD: Authentication (disable initially)
- Non-Functional: DDNS configured for Pre.
- App is initialized to run at startup.
- App has built in defaults, set in a config file whose values can be changed if desired.
- TCP listening port is 40404 by default (just an arbitrary number I chose).
- Request XML:
<REQUEST>
<AUTH /> (TBD)
<DATA>
<SERVICE>
<TYPE>LOCATION|GPS-ON|GPS-OFF|GPS-STATUS</TYPE>
<PARAM name="">value</PARAM> *
</SERVICE>
</DATA>
</REQUEST>
- Response XML:
<RESPONSE>
<TIMESTAMP>value</TIMESTAMP>
<STATUS>0 (if successful)|global error code number</STATUS>
<DATA>
<SERVICE>
<TYPE>LOCATION|GPS-ON|GPS-OFF|GPS-STATUS</TYPE>
<STATUS>0 (if successful)|error code number (for specific service)</STATUS>
<PARAM name="">value</PARAM> * (example: <PARAM name="latitude">37.44040301</PARAM>)
</SERVICE>
</DATA>
</RESPONSE>
Client-side Requirements- Should allow user to specify: hostname, port, service type, and any params needed for service type request.
- See "Server-side Requirements" for more details.
Imagine the possibilities... Host the client as a web page, and open an iFrame to a Google Map widget, to show the exact coordinates on a map.
Questions/Unknowns- Are there any roadblocks to implementing this as a WebOS-level daemon?
- If it needs to be implemented at the Linux OS level, will we have access to the GPS? Also, what would be the best language to implement in? Will Java work? Seems the easiest to design a framework for.
Anyone wanna take a stab at this with me? Reply, and say what you'd like to help with. I know I can at least whip up a client-side Java application/applet or web page with no problem.
Also, I'm quite open to criticism and suggestions. If you think you can make this better, please share some ideas. I'd like to build a robust framework from the ground up. So getting your suggestions in as early as possible would ensure the likelihood for their implementation.