Solved

J2ME PushRegistry in WTK22

Posted on 2004-08-11
5
612 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
  • 2
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
jimmack earned 25 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 25 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

With the purchase of CloudCommand by Comcast customers are left in a bind as subscriptions expire and render the AP's disabled. The following will explain how to flash your Ubiquiti AP's with CloudCommand firmware back to Ubiquiti firmware. HOWTO…
Working settings for French ISP Orange "Prêt à Surfer" SIM cards for data connections only. Can't be found anywhere else !
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now