09-09-2008 03:23 AM
I need to use push registry to register connections in my blackberry applications; my solution works perfectly in every j2me device you can find in the market which supports push registry but...not in blackberry; The problems and the facts :
- Ive read EVERY post about push registry and Ive tried everything without success; problems? when I push the required lines in the jad my application does not download, the blackberry tells me : error downloading; if I take it out, it works.
The line I refer is :
MIDlet-Push-1: sms://:50001, myTestRegistry,*
- Ive got a port , the 50001 to register connections, but if I dont specify the port in the jad the messages come to the inbox so....it does not work.
Ive read about push registry in the forum, about to register dynamically and Ive tried the examples with no success either.
The running of my applications is simple :
- The application has to wake up when the sms comes and make some operations with the characters the sms has.
- If the application is waken up, the application makes the proper operations as if it was closed.
When I receive an sms, I make some operations using the net, the question is, how to use push registry to wake up an application and how to use push registry to work with a waken up application.
Please, can anyone tell me some idea about it ? Thx in advance Kind regards
09-09-2008 11:15 AM
Have you tried these samples?
How To - Create an auto-start MIDlet using the PushRegistry
Article Number: DB-00385
How To - Register a MIDlet with the PushRegistry
Article Number: DB-00390
What version of the BlackBerry JDE are you using? What BlackBerry model and handheld software version are you testing with? You can find this under Options, About on the BlackBerry. What is the exact error you get when the download fails? Are you using the BlackBerry Browser, Internet Browser or WAP Browser? You can see your default browser setting under Options, Advanced Options, Browser.
09-10-2008 02:57 AM
Hi MSohm! (and thx for your reply)
Ive seen the two solutions you have offered to me; Ive some questions, Must I to use both examples to use an auto start midlet and a registered midlet? How would Ive to make it? Im working with the blackberry pearl 8100 version 220.127.116.11.
The browser Im using is the emocion browser which comes with the blackberry, I dont really know how to difference the blackberry browsers; I can only see this one to browse the web; When I go go Options > Advanced Options > Browser I can only select "emocion" in both options at the screen. Could you tell me what is the problem?
Just ont thing more, about the security options, why can´t I download the midlet when I put the Midlet-Push-1 option in the jad? the download tells me everytime error, please could you tell me what´s wrong?
Thx in advance MSohm , seriously, thx
09-10-2008 11:07 AM
Typically the samples are not intermixed and you use one or the other. However, there is an issue in BlackBerry handheld software version 4.2.2 and lower where an auto start PushRegistry application stops notifying of incoming data after the application is launched by the user (by clicking on the icon on the home screen). The work around to this is to programmatically register with the PushRegistry when the application is launched by the user. This is fixed in version 4.3.0 and higher.
What is the error you are receiving? The BlackBerry Browser is available if you are on a BlackBerry Enterprise Server. The Internet Browser is available if you are using the BlackBerry Internet Service. Are either of these available to you?
The third option is the carrier's WAP browser (name varies based on the carrier), which sounds like it is the one you are using.
09-11-2008 05:55 AM
Hi again MSohm!
Thx for your reply!, so Im using the third option because Im not using any blackberry solution enterprise browser you are telling to me; so, where can it be the problem? Im going to try to register the connection so and I´ll tell you what´s happening!
Thx in advance kind regards.
09-22-2008 05:47 AM - edited 09-22-2008 06:45 AM
Ive been working the last weeks trying to make the push registry in a proper way in a 8100 pearl 4.2.X firmware edition with no success...
1 ) the application receives the message yes....but it receives it just when the application is woken up.....when the application is not woken up
it does not open
2 ) when the application is not woken up, it received the message....but it does not open so I cant make any operation so the application does not work in a proper way
Please help, Ive read everything about push registry in blackberry with no success....
Other prob :
- When I try to download the application OTA and I put the Midlet-push line....it does not work so it´s impossible to know if it works; Why does NOT the application download?? --> it gives me NO ERROR I mean, it just tells, the download is not possible and just this
UPDATED : the error when I try to download the application is "911 Push registration failure"
UPDATED2 : the error downloading has been fixed with success, the problem has been solved by putting all the path in the Midlet-push attribute, I mean, if you deal with : package1.package2.class and you just put class it will give 911 Push registration failure, you will have to put package1.package2.class to dont throw this kind of error.
The problem about auto starting is still happening; Ive found, with the application closed, the sms arrives but the application does not open, when you try to open it again, it closes so....where is the problem?
Please, Im crazy with the blackberry programming, I need help
Thx in advance
09-22-2008 04:24 PM
Are you able to run the auto start PushRegistry sample I linked to above? This will eliminate either a problem with the BlackBerry you are testing on (possible security restriction in place) or your application.
09-23-2008 08:21 AM
Ive upgraded the firmware to the 4.5 and Im getting the same error....Ive put some debug outputs and there is no chance about receiving anything; the question is, the first time you open the application, you can use http and it´s working fine; it´s alright....when you close the application and open the app again, you can not make any http operation, the device communicates and when it finishes their operations, which are done in a right way, the app closed itself with no sense.....and this only happens when you put the line :
If you take out this line, the application works in a proper way; please could you tell me what can be happening??? Im really crazy about it....either in 4.5 the application works in a proper way; why does it happen this problem when I put the MIDlet-push line??? why? why then the http operations, when they finish make the application close? why?
Thx in advance
09-23-2008 01:38 PM
I'm not sure what you mean here:
when you close the application and open the app again, you can not make any http operation, the device communicates and when it finishes their operations, which are done in a right way, the app closed itself with no sense.....and this only happens when you put the line :
If you take out this line, the application works in a proper way;
Can you clarify your problem. Are you unable to make HTTP connections at a certain point? If so, what happens when you try? Or are you having problems receiving connections via the push registry? What, if any exceptions are thrown? What line(s) of code are triggering them?
09-24-2008 07:19 AM
Ive tried everything of everything, Push registry is not implemented in a proper way in blackberry, that´s my conclusion; Ive used the solutions youve posted to me, the solutions about dealing with AMS; in a nokia device for example, my application, which is the same Im using at blackberry is working perfectly, no errors, no problems, no nothing. The problem rightnow....is that when I receive a push message, the application opens ok, the application starts to make an http operation which I need because when I receive a push message, in these moments my midlet changes of state, following the MIDlet architecture defined by SUN, and goes to state in which the midlet has to launch an http operation; it begins and the MIDlet goes then to destroy state with no reason; Ive tried to debug step by step the application with no success, it´s like the MIDlet minimizes in background and finish the operations, but I cant see it has written the rms because I need too so when I open the application again, the data is not correct, the application does not work and everything really sucks.
So, I dont know what to do, merge the two blackberry examples? Ive tried with no success, a lot of security exceptions and nothing to do; Im not sure push registry works either in firmware 4.5, it´s what Ive seen, why the JVM does not work like in another mobile phone? for example a sony? is it so difficult? I dont really know why....
So, summarizing, the application works without push registry but I dont really know what happens with the MIDlet states. The last try has been using the great example about auto-register with a try fo merge it with the dynamic register.... I receive the message in a proper way but.....the phone communicates with my server, makes the operation right...and before to tell to me the operation has been made with success the application just closes....so there is no rms write, so the data saved is not the correct data I really need, so I cant work with that; Please MShom, do you have msn? whatever to talk with you about it?? I would be so pleased, Ive spent 2 weeks working every day 10 hours every day and nothing has worked....with a lot of probes, debug, etc.... if you have some idea about what can be happening....I dont really know; the fact is you open the application, everything works....when you close the application and just open again....the application closes when I make an http operation...but the application makes the operation in a proper way because I can see it in my web service....so....where is the problem? is it about focus the MIDlet?.....Why does the midlet lose the focus? Why when I take out the push registry operations the midlet works perfectly?
Sorry for my desesperation, thx in advance, regards