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.