09-04-2009 11:43 AM
Thank for your time,
Strangely it's seem that my problem is "ClObjConnexion.instance().GetOutput().flush()". I remove this line and now I can talk with server back and forth with the same local adresse and port. The problem now reside in my socket service on my server. It grab the communication, return the OK response and after the first one, do nothing...
07-16-2010 10:16 AM
i am also facing the same issue.
I want to have persistent socket connection for longer period of time.
have you got the above code working ???
please elaborate more how u find your final destination and also help me out....
thanks in advance....
07-16-2010 01:17 PM
Here de solution, it doesn't work at all !
My only advice is : Don't use socket, BB Doesn't know to manage it correctly.
Use http, mail or pin message to bypass this.
Hope it will anwser to your question.
07-16-2010 01:45 PM
I don't completely agree with the statement:
"Don't use socket, BB Doesn't know to manage it correctly."
I do agree with is that the BlackBerry device does not manage a persistent socket connection over wireless connections well - though to be honest I'm not sure if that is a function of the wireless network of the device itself. But anyway, typically a persistent connection is a bad idea and of little value. Unless you are exchanging data, you are better using push as a notification method.
07-16-2010 01:55 PM
I blame BB you blame de method but who let using the method ?
Push method is a good method for RSS kind but for another level of development you need to communicate with the application to know what's going on the cellphone.
When you need to ensure if the cellphone is ok you need an answer and the BB can answer correctly by pin, mail and http in this order of efficacity. If you have another perseption in the communication between a server and un group of cellphone, i'll glad to learn more.
08-05-2010 10:33 AM
i search over the forums again and again but didn't find any useful solution for my prob
I am using persistent socket connection by opening input stream open for infinite time and for this reason battery drains out pretty quickly which i want to avoid.....
plz give some kind of solution since coz of my requirements can not use push APIs...
thanks in advance....
08-05-2010 10:39 AM
Here my workaround (not the best, not the worst)
Stop using persistent socket connection, for multiple reason, and use http connection with a web service that can handle request and response. In this way you will be able to make a connection back and forth.
I don't know if your requirements autorize http but if your exigences tell to use socket, I think you will need to leave up your chair and tell to your client, or boss, he goes on the wrong way...
Only my opinion, but what I'm sure is not all roads lead to rome...
01-03-2011 10:53 AM - edited 01-03-2011 10:54 AM
I still not getting success either with persistent socket connection or with BlackBerry Push Service.
During searching this stuff , was wondering how chat applications in BB work like Btalk ?? Can anybody have clear focus on this one ...
I want to listen for my data on one socket provided by server.
Suggestions welcome !!!!!
01-04-2011 08:22 AM
Sorry I have not reviewed all the preceding discussion.
A persistent socket connection is one that is open all the time. You do not use a persistent socket connection with the Push service.
Instead you have a Listener that waits for a PUSH request from the Server. This is what the push service does, so you have a Thread that uses
This will get notified and can get some data when the Server pushes it.
I recommend that you should investigate the PUSH service rather than attempting to continue doing what you are currently doing.
There is sample code provided for this service and many forum entries that discuss it.