| Reply | « Previous Thread | Next Thread » |
|
Hello,
Can anyone tell me why on my Nokia 6600, line #4 below throws a nullpointer exception? 1. Calendar recordStoreDate = Calendar.getInstance(); 2. Date exprdDtObj = new Date(expireDate.getLastModified()); 3. System.out.println(exprdDtObj.getTime()); 4. recordStoreDate.setTime(exprdDtObj); This works fine in the emualtor...just not on the actual phone (again, a 6600) which scares me as I rely on the emulator to pinpoint all bugs. Thanks in advance. |
|
System.out.println() wont work on the device..to display something on the device u would have to use the canvas class and the drawstring() of the same...see if this helps..also if there is a problem with the calendar instance search the forum as i remember there were some posts discussing this issue sometime back
ciao |
| mayankkedia |
| View Public Profile |
| Find all posts by mayankkedia |
|
Thanks for the info.
I placed System.out.println(..) on line three just as an example that the value being used to set the Calendar object was not null and was a valid value (as displayed by the standard output). |
|
oh okie..did u get any answers on the forum about the calendar thing..?
ciao |
| mayankkedia |
| View Public Profile |
| Find all posts by mayankkedia |
|
I have a work around for this. My intent with the overall code was that when a user downloads an application to the phone for the first time, a recordstore would be saved to the device. Each time the application is run, I wanted to check today's date against the recordstore's save date so that I can expire the application after say a month, and force them to renew (and charge an additional monthly fee).
Instead of saving a date object into the record store, I'm just going to save the MM/DD/YYYY into the recordstore as a string (when the recordstore is saved), and parse it out for comparison to the current date instead of using the Calendar object. Actually, after combing through the forum here - I am deeply disappointed that all series 60 phones (the ones that support JSR-82 which are the only ones I code for) do not support vibration or ringing of the phone programmatically.....I need a solution for this which I will start a seperate thread for. Thanks for your assistance. |
|
if J2ME doesnt let u do that..then the recourse would be Symbian which allows u to do almost whatever u want to do with the application on the phone..in any case post a new thread maybe some positive answers may come in.
ciao |
| mayankkedia |
| View Public Profile |
| Find all posts by mayankkedia |
|
Iam using Nokia 6600 J2ME and found that System.currenttimemillis has a bug i.e. the app refuse to start with the currenttimemillis ... is it true? if yes how you are retrieving the current date
|
| rahulbessie |
| View Public Profile |
| Find all posts by rahulbessie |
|
Join Date: Mar 2003
Posts: 162
Location: Malaysia-Johor-Pontian Kecil
Offline
Regular Contributor
|
|
Hi,
You are not the first one to ask this question. http://discussion.forum.nokia.com/fo...ar+positive%2A I still can't solve this problem and waiting for solutions. :( http://www.geocities.com/akokchai/ |
|
yes the currecttimemillis() has some issues it doesnt really match to the exact..there is some lag between what one expects and what one gets...dont really know how to handle it..any clues anyone?
ciao |
| mayankkedia |
| View Public Profile |
| Find all posts by mayankkedia |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|