Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Member
Posts: 1
Registered: ‎08-10-2012
My Device: Torch
My Carrier: TMobile

Blackberry Networking with HTTP

Good Evening

 

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.

 

Many thanks

 

Robert

 

 

 

 

 

 

 

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Blackberry Networking with HTTP

welcome to the support forums.

your first point is kind of incorrect, receiving http on your own is not really used, as most devices are in a NAT environment when connected via 2/3/4 G networks and don't expose a public IP.

the second point is correct, and the BB network infrastructure is used to work around the limitation of the first point, the push server can reach the BB directly (as RIM has infrastructure with the provider).
Depending on the version of the push API you either register your application on the push listener (since 5.0), so this system service decides where to put things, or you use a certain port and run a listener service there yourself.

in conclusion: i don't think what you plan is possible on the platform.
most network related security features are handled with the BES, for business devices this would be the point of interest.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter