You Are Here:

Community: Developer Discussion Boards

#1 Old How to know if a device is MIDP 1.0 or MIDP 2.0? - 2006-06-23, 17:23

Join Date: Sep 2005
Posts: 119
Pepper_91
Offline
Regular Contributor
Hello:

I need to know, in execution time, if the device is MIDP 1.0 or MIDP 2.0, to show the canvas in full screen or not.

Thank you
Reply With Quote

#2 Old Re: How to know if a device is MIDP 1.0 or MIDP 2.0? - 2006-06-23, 17:34

Join Date: Mar 2006
Posts: 518
wang_shui
Offline
Super Contributor
Hi ,

You can get it using systemproperty.

ie;String val= System.getProperty("microedition.profiles"));
val = MIDP-1.0 for midp1.0 phones and val = MIDP-2.0 for midp 2.0 phones.

For more help check the following links

http://www.forum.nokia.com/info/sw.n..._2_en.zip.html

http://developers.sun.com/techtopics...ies/index.html

Wang
Reply With Quote

#3 Old Re: How to know if a device is MIDP 1.0 or MIDP 2.0? - 2006-06-26, 12:35

Join Date: Sep 2005
Posts: 119
Pepper_91
Offline
Regular Contributor
Thank you!!
Reply With Quote

#4 Old Re: How to know if a device is MIDP 1.0 or MIDP 2.0? - 2006-06-26, 13:06

Join Date: Sep 2005
Posts: 119
Pepper_91
Offline
Regular Contributor
Glups! :( I have a new problem:

What I want to do is show a presentation logo, in full screen if is possible. This is only available since MIDP 2.0. If the phone is MIDP 1.0 I want show the logo not in full screen mode:

if (System.getProperty("microedition.profiles").equals("MIDP-2.0")){

this.setFullScreenMode(true); //Disponible a partir de MIDP 2.0 !!!
}

//
display.setCurrent(this);

But the command "setFullScreenMode" is only available since MIDP 2.0, so If I try to compile my application to MIDP 1.0 terminals, that line show an error, and if I try to compile my package por MIDP 2.0 terminals, when I send the .jar to the phone, it show an "incompatible file" error :(

I'm using Netbeans 5.0.

Thanks
Reply With Quote

#5 Old Re: How to know if a device is MIDP 1.0 or MIDP 2.0? - 2006-06-26, 13:56

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
Offline
Super Contributor
hi,

could it be solved simply by using two different configuration and pre-processor block in your project?
http://www.netbeans.org/kb/articles/...tation-40.html
regards,
Peter
Reply With Quote

#6 Old Re: How to know if a device is MIDP 1.0 or MIDP 2.0? - 2006-06-26, 14:50

Join Date: Mar 2005
Posts: 499
Location: Paris
njzk2
Offline
Regular Contributor
i'm afraid you can't make the switch between midp 1 and 2 at runtime, since there is no (or so few) introspection in j2me.
you'll have to pre-process and, worst of all for a java program, have different jar files for different platforms

however, midp 1 is rather disappearing, so you may want to consider that it won't be a target
Reply With Quote

#7 Old Re: How to know if a device is MIDP 1.0 or MIDP 2.0? - 2006-06-26, 19:03

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
Offline
Super Contributor
hi,

that's exactly what configuration/pre-processor blocks are in NetBeans for,
regarding to splash screen in full screen,
can he simply use currently deprecated Nokia's FullCanvas from *.ui extension for MIPD1.0 devices (works fine in MIDP1.0) and use preprocessor to have standard FullCanvas in MIDP2.0?

regards,
peter
Reply With Quote

#8 Old Re: How to know if a device is MIDP 1.0 or MIDP 2.0? - 2006-06-27, 16:23

Join Date: Sep 2005
Posts: 119
Pepper_91
Offline
Regular Contributor
thank you all. I decide implement MIDP 2.0 code. I can't create two .jar 'cos I need distribute only one file. I'm sorry for the MIDP 1.0 terminals.

See you!
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
Similar Threads
Thread Thread Starter Forum Replies Last Post
Series 60 MIDP 1.0 SDK w/ MMAPI jritchey Mobile Java General 2 2004-08-26 23:28
S90 MIDP SDK 1.0 Beta MMAPI Problem kfalck Mobile Java Tools & SDKs 0 2004-06-21 20:44
MIDP 1.0 to MIDP 2.0 Devices Compatibility elata Mobile Java General 7 2003-12-16 16:29
3650 Whit Midp 1.0 But How I Can Run Midp 2.0 ???? rosarioz Mobile Java General 1 2003-09-01 13:20
MIDP 2.0 games.* package on MIDP 1.0 app? baegsi Mobile Java General 2 2003-08-03 15:25

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