You Are Here:

Community: Developer Discussion Boards

#1 Old Nokia 6600 Calendar Obj/Nullpointer issue - 2004-08-30, 21:43

Join Date: Aug 2004
Posts: 21
vics69
Offline
Registered User
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.
Reply With Quote

#2 Old 2004-08-31, 07:42

Join Date: Mar 2004
Posts: 2,077
Location: Bangalore,India
Send a message via MSN to mayankkedia Send a message via Yahoo to mayankkedia
mayankkedia's Avatar
mayankkedia
Offline
Forum Nokia Champion
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
Reply With Quote

#3 Old 2004-08-31, 15:03

Join Date: Aug 2004
Posts: 21
vics69
Offline
Registered User
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).
Reply With Quote

#4 Old 2004-08-31, 15:28

Join Date: Mar 2004
Posts: 2,077
Location: Bangalore,India
Send a message via MSN to mayankkedia Send a message via Yahoo to mayankkedia
mayankkedia's Avatar
mayankkedia
Offline
Forum Nokia Champion
oh okie..did u get any answers on the forum about the calendar thing..?
ciao
Reply With Quote

#5 Old 2004-08-31, 15:42

Join Date: Aug 2004
Posts: 21
vics69
Offline
Registered User
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.
Reply With Quote

#6 Old 2004-08-31, 15:51

Join Date: Mar 2004
Posts: 2,077
Location: Bangalore,India
Send a message via MSN to mayankkedia Send a message via Yahoo to mayankkedia
mayankkedia's Avatar
mayankkedia
Offline
Forum Nokia Champion
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
Reply With Quote

#7 Old Can you please confirm this? - 2004-09-01, 05:01

Join Date: Sep 2003
Posts: 12
rahulbessie
Offline
Registered User
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
Reply With Quote

#8 Old 2004-09-01, 05:18

Join Date: Mar 2003
Posts: 162
Location: Malaysia-Johor-Pontian Kecil
akokchai
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/
Reply With Quote

#9 Old 2004-09-01, 05:58

Join Date: Mar 2004
Posts: 2,077
Location: Bangalore,India
Send a message via MSN to mayankkedia Send a message via Yahoo to mayankkedia
mayankkedia's Avatar
mayankkedia
Offline
Forum Nokia Champion
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
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia