Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

Getting emulator number in J2ME

Thread view: 
reena_nagdev@rediffmail.com - 18 Mar 2006 18:09 GMT
I want to know if there is any API to get the emulator number in
J2ME.If i run emulator it has number 5550000.At the same time if i run
another emulator it has number 5550001 and so on.
need to access this number.Welcome to any suggestion.
Rhino - 18 Mar 2006 19:44 GMT
>I want to know if there is any API to get the emulator number in
> J2ME.If i run emulator it has number 5550000.At the same time if i run
> another emulator it has number 5550001 and so on.
> need to access this number.Welcome to any suggestion.

You'll find the answer in the documentation for the Wireless Tool Kit (WTK).

I have a copy of WTK 2.2 beta and the document is called UserGuide.pdf; it
is in my D:\WTK22\docs directory. In this version of the document, your
question is answered in Chapter 7.1.

You are probably running a different version of the WTK so these instruction
may not work for you but I'm pasting them anyway, just in case you have
trouble finding the document. Please note that the screen shot of the panel
where you change the phone number couldn't be copied and the formatting was
also mangled by the copy so I've reformatted it a bit to make it more
readable:

7.1 Setting Emulator Phone Numbers

Each running instance of the emulator has a simulated phone number that is
shown in the title bar of the emulator window. The phone numbers are
important because they are used as addresses for WMA messages. By default,
the first emulator instance has a phone number of +555000. Subsequent
instances of the emulator will have unique numbers in ascending order:
+5550001, +5550002, +5550003, etc.

You can affect the assigned phone numbers by choosing Edit > Preferences...
from the KToolbar menu and clicking on the WMA tab.

FIGURE 29 Setting WMA preferences

The Phone Number of Next Emulator field is just what it sounds like. If you
fill in a number for this field, the next emulator instance will have that
number.

If the Phone Number of Next Emulator is already in use, or if the field is
blank, then the First Assigned Phone Number is used for the next emulator
instance.

Subsequent instances count up.

For example, suppose you fill in +6269333 for the Phone Number of Next
Emulator and +5550000 for the First Assigned Phone Number. If you launch
four emulator instances, their numbers will be +6269333, +5550000, +5550001,
and +5550002.

--

Rhino
Darryl L. Pierce - 22 Mar 2006 16:56 GMT
> I want to know if there is any API to get the emulator number in
> J2ME.If i run emulator it has number 5550000.At the same time if i run
> another emulator it has number 5550001 and so on.
> need to access this number.Welcome to any suggestion.

There is no standard means for this in the MIDP.

Signature

Darryl L. Pierce <mcpierce@gmail.com>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.