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 Developer
Saravanak8
Posts: 2
Registered: ‎07-28-2008
My Device: Not Specified

Push Registry Midlet in Blackberry

[ Edited ]

Hi,

 

We have developed a Midlet (SMS Send, Receive) implementing Push Registry (Dynamic Registeration).  The Midlet needs to open/run, once the SMS is received on that particular port. The Midlet is working fine in Nokia, Sony Ericson and other leading devices.

 

I have installed the Midlet (Jar file) in Blackberry 8100. (I haven't converted the same into .cod)

 

On Blackberry 8100, the Midlet receives the SMS in the port if the Application is open and running. If the Application is in the closed state it displays the message "Complete" whenever a message comes on that respective Port, but doesn't opens the Application.

 

I want the Applicaton(Midlet) to open up once the Message is received.

 

Kindly advice on how to solve the above issue.

 

Thanks in advance.

Message Edited by Saravanak8 on 07-28-2008 06:57 AM
Please use plain text.
Administrator
MSohm
Posts: 14,268
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Push Registry Midlet in Blackberry

Please compare your application to the implementation in our samples here:

 

How To - Register a MIDlet with the PushRegistry
Article Number: DB-00390 
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800429/How_To_...

 

How To - Create an auto-start MIDlet using the PushRegistry
Article Number: DB-00385

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800429/How_To_...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
cougarbay
Posts: 2
Registered: ‎08-19-2008
My Device: Not Specified

Re: Push Registry Midlet in Blackberry

hi,

 

i have the same problem with my midlet on my 8310 device. i implemented the dynamic auto start as given in the documents you postet. but the application will only receive sms when it is already running.

 

when starting the application manually, it asks 3 times for permission to access javax.io.connector.sms (2 times) and javax.wireless.messaging.sms.receive. when a new message arrives, the running application asks a forth time to allow sms.receive before it will receive the message. i have set all application permissions to "allow".

 

the application has been installed as a cod/alx file from pc.

 

i build the app with sun wireless toolkit and then convert it into a cod file with rapc.

 

will signing the application help to avoid all the asking for permisson?

 

is there any difference in behavior if i install the application ota? (i just learned that static push registry will cause the application not to receive sms when startet manually)

 

do i have to set any permission options in the wtk before compiling? i tried all the options but found no difference in behavior

 

thanks for help

Please use plain text.
Administrator
MSohm
Posts: 14,268
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Push Registry Midlet in Blackberry

Please have a look at the thread below that describes the 2 types of security prompts implemented on BlackBerry.

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=320&query.id=1055...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
cougarbay
Posts: 2
Registered: ‎08-19-2008
My Device: Not Specified

Re: Push Registry Midlet in Blackberry

hi mark,

 

thank you for quick response.

 

so it seems like the promts for connector.sms and sms.receive are operator specific, because there ist no option to remember the setting nor do the application security settings have any influence on the app behaviour.

do i have to sign my app with the blackberry certificate or with a verisign/thawte to get rid of these operator prompts?

 

now i have rebuild the app with a static push registry and have the folloing strange behaviour:

- app prompts for auto start permission upon installation (with option to rememer this setting)

- app starts on incoming sms, prompts but does not receive/display the sms

- app receives sms after prompting 3 times while it is running and displays them correctly, but after closing the app, autostart is no longer working.

 

with dynamic push registry, autostart is not working at all.

 

has blackberry signing any influence on autostart?

 

thank you for help,

 

olaf wessler

Please use plain text.
Administrator
MSohm
Posts: 14,268
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Push Registry Midlet in Blackberry

It is expected that the dynamic push registry sample does not auto start (this sample is not designed to).

 

There is an issue that can prevent auto start PushRegistry clients from receiving notifications after the application has been opened.  This has been fixed in BlackBerry handheld software version 4.5.0.  The work around is to merge the two samples together.  Meaning that you create an application based on the auto start sample that also dynamically registers the same URL when it is opened.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
sudhagupta2003
Posts: 20
Registered: ‎10-29-2008
My Device: Not Specified

Re: Push Registry Midlet in Blackberry

Hello Mark,

 

I am also facing the same problem for blackberry(8330 curve), I want Midlet, to run, once the SMS is received on that particular port .

Can you plz explain what exactly (work around)has to be done for this.

 

Thanks

Sudha

Please use plain text.
New Developer
sskaradi
Posts: 6
Registered: ‎02-05-2009
My Device: Not Specified

Re: Push Registry Midlet in Blackberry

I have different problem with the push registry in blackberry 8100.

I have a midlet (A) which registers another midlet (B) before closing using registerAarm to start it after 30 min. This works fine in the J2ME tool kit simulator. but when i deploy the application on 8100 this does not start the second midlet

Below is the code used for registering

 

     

 

long time = PushRegistry.registerAlarm("PushAlarm", new Date().getTime() +30*60*1000);

 

 

 

 

 

If I push the same midlet (A)  to be invoked after 30 min, that works fine. But i want to start the another Midlet "B" instead

 

Please advise

 

Thanks,

SSKaradi

Please use plain text.
Administrator
MSohm
Posts: 14,268
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Push Registry Midlet in Blackberry

Are both applications part of the same MIDlet suite?  Registering a MIDlet from outside of the registering MIDlet's suite is not supported on BlackBerry handhelds.

 

Or you could use the code below to invoke the second application.  You can use ApplicationManager.scheduleApplication to set a future time for the application to run.

 

How To - Launch a third-party application from another third-party application
Article Number: DB-00455

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800620/How_To_...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
sskaradi
Posts: 6
Registered: ‎02-05-2009
My Device: Not Specified

Re: Push Registry Midlet in Blackberry

Both of my midlets are from the same suite. Below is the jad file entries. Is there any problem with this?

 

 

MIDlet-1: AlarmMe, AlarmMe.png, AlarmMe MIDlet-2: PushAlarm, AlarmMe.png, PushAlarm MIDlet-Description: MIDlet-Icon: AlarmMe.png MIDlet-Jar-Size: 228043 MIDlet-Jar-URL: AlarmMe.jar MIDlet-Name: AlarmMe MIDlet-Permissions: javax.microedition.io.PushRegistry MIDlet-Vendor: Shivalingesh Karadi MIDlet-Version: 1.0 MicroEdition-Configuration: CLDC-1.1 MicroEdition-Profile: MIDP-2.0

 

 

 

Thanks,

SSkaradi

 

Please use plain text.