08-10-2012 06:25 PM
I am exploring the viability of an idea for a BlackBerry Application. I'm a Windows Desktop Software Developer, but have zero experience of development for mobile platforms. I have some experience of java-based development and PHP.
As I am very much a newby, especially on BlackBerry technologies, please forgive me if my questions drip with naivety. I'm on a steep learning curve.
My understanding from sifting through the latest Java API and looking at some other documentation, is as follows
(1) Many network applications for BlackBerry make use of HTTP POSTs to deliver data to BlackBerry Handsets.
(2) BlackBerry push services also rely on HTTP POSTs, underneath the Push SDK
When a HTTP POST is delivered to a handset, how does the Handset direct the data to the appropriate application? Does each application use its own Port Number on the same kind of basis as TCP/IP; or does each application register itself with a central "listener" that redirects the data on arrival? Is the destination application determined from the content of headers within the HTTP POST? What is the layout of this, and how does it work? Is there a specification?
I have looked at HTTPFilters in the Java API.
If I wanted to, could I build an Application that was capable of temporarily intercepting HTTP data as it arrives on a handset, based on factors such as the source IP address, and/or the identity of the destination application?
The idea would be for my Application to function as a sort of inbound firewall/proxy. It would inspect HTTP data as it arrives on the handset, then decided either to immediately forward it on to its original destination application in a transparent fashion, or alternatively redirect it to disk. Where data is redirected to disk, it will either never reach the destination application for which it was originally intended; or it will pulled from disk at some later date and be redirected to its destination application, again transparently, but obviously subject to whatever time delay results.
Does the above scenario sound feasible? Can anyone point me toward the sections of the API and/or other documentation that may help?
It seems to me that the biggest challenge may be to find a way to make my Application "first in line" for the delivery of HTTP data, but as I am not entirely clear as to how all of this works, on a handset, I would be grateful for any advice that anyone can offer.
It may help to conceptualise my application idea as something like a Internet Compliance filter, but running on a BlackBerry handset. The idea is to inspect HTTP data as it arrives, then use rules to decide whether or not that data should actually be forwarded on to the Application for which it is intended.
08-13-2012 02:56 AM