?
Solved

J2ME PushRegistry in WTK22

Posted on 2004-08-11
5
Medium Priority
?
665 Views
Last Modified: 2008-02-01

Hi dears,

I am trying to use the PushRegistry.registerAlarm method, using WTK22, should it be only in the destryApp() ? ;

any way, I put it in destroyApp() and the emulator asks me "is it OK to receive automatic updates"

when I press "yes", it doesn't do any thing, just hangs !!!, it seems a bug or something,

I tried with normal RUN and also OTA


Thanks for the help

0
Comment
Question by:khamouda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
jimmack earned 100 total points
ID: 11791289
I haven't tried 2.2 for a couple of reasons.  Primarily, it's only beta and it only works on Windows (and I do my development on Linux ;-))

It could be that it's a beta issue, I recall seeing something similar when requesting network connections in the 2.0 (or 2.1?) emulator.

This is another one of the many reasons that I do my testing on real devices.  The emulators are OK for basic functionality, but there are so many bugs/defects/"features" on the real handsets that it's the only reliable way to test.
0
 
LVL 1

Author Comment

by:khamouda
ID: 11791559
Yes you are write, but I don't have midp 2 device, emulators bugs are many, and it exhausts the RAM also !

even wtk21 has a problem when OTA it doesn't complete the downloading , it just hangs ?!

for push registry, do I have to put the registerAlarm in the destroyApp() abstract ?

thanks
0
 
LVL 9

Assisted Solution

by:OBCT
OBCT earned 100 total points
ID: 11792141
It doesn't say anything in the documentation about needing to use this method in destroyApp.
It would probably be a better idea to do this when the application starts rather than when it's about to exit.
The destroyApp method should be used to cleanup the MIDlets resources.

Try calling registerAlarm in the abstract method 'startApp' or at least not as the application is not being destroyed.

Just wait for Jimmack to confirm this incase I'm incorrect ;-)
0
 
LVL 1

Author Comment

by:khamouda
ID: 11792821

I think jim will not agree with you ;)
0
 
LVL 15

Expert Comment

by:jimmack
ID: 11808217
I don't think it really matters where you set up the alarm.  destroyApp() may be a good place to do this, since you know that it's the last thing that will be executed before the application is terminated.

It may also depend on whether you want to use the return result from registerAlarm().  This information *may* be more useful during startApp() - just a thought ;-)
0

Featured Post

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hopefully this article will help someone who's had the same issues I had. I have a Dell Wireless 1390 WLAN Mini-Card and Windows 7, and for the past couple of days I was beyond frustrated because my wireless laptop was not able to access the Inte…
This subject  of securing wireless devices conjures up visions of your PC or mobile phone connecting to the Internet through some hotspot at Starbucks. But it is so much more than that. Let’s look at the facts: devices#sthash.eoFY7dic.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question