On 2/23/07, Horace Ho <[EMAIL PROTECTED]> wrote:
Installed the IBM Java VM with the Golf MIDlet sample, the following
code failed to launcher the MIDlet programmatically (returns a "Launch Error"):

UInt16 card_no = 0;
LocalID db_id = 0;
DmSearchStateType search_state;
Err err = DmGetNextDatabaseByTypeCreator(true, &search_state, 'JMid', 'j9pa', true, 
&card_no, &db_id);
if (err == errNone) {
 SysUIAppSwitch(card_no, db_id, sysAppLaunchCmdNormalLaunch, NULL);
}

Any help?

you cannot send launch commands to non-palmos applications.

your database; 'JMid'/'j9pa' is obviously the java midlet - i would bet
this isn't a valid palmos application :) most applications are of type 'appl'.
what you need to do it find out what application launches the midlets.

then:

a) launch the midlet launcher
b) pass information telling it to launch your midlet

now; this may only be possible if the midlet launcher has the ability
to launch midlets programmatically. i would be betting that chances
are, there isn't support for it.

what would be nice; is if when you converted your midlet to a palm
pdb; it created a appl database; that had the code to launch the
midlet interpreter and startup. that way; your midlet would be an icon
by itself within the launcher.

i did this with our gameboy emulator (liberty) when it was ported to
the vtech helio - worked out quite well; but, we never did the same on
palmos; would have been nice.

--
// Aaron Ardiri

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to