Porting mobile game for SGH-I601

Forum for discussion on Game porting for mobile phones and j2me supported devices including device information.

Porting mobile game for SGH-I601

Postby prkshsngh » Thu Aug 09, 2007 4:13 am

8) How can use all alphabets in canvas for Mobile SGH-I601. or I see some keys are not react through keyPressed(int keyCode) method.
null
prkshsngh
 
Posts: 4
Joined: Thu Aug 09, 2007 4:00 am
Location: Mumbai

Postby DevelopmentTeam » Thu Aug 09, 2007 5:11 am

Code: Select all
         protected void keyPressed(int keyCode) {
           if (keyCode > 0) {
             System.out.println("keyPressed " +((char)keyCode));
           } else {
             System.out.println("keyPressed action " +getGameAction(keyCode));
           }                 
         }

         protected void keyReleased(int keyCode) {
           if (keyCode > 0) {
             System.out.println("keyReleased " +((char)keyCode));
           } else {
             System.out.println("keyReleased action " +getGameAction(keyCode));
           }
         }


try displaying the keycode with this simple code and if it doesnt display anything please let me know so that I can test on the device.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Postby DevelopmentTeam » Thu Aug 09, 2007 5:24 am

There are some Samsung handsets (x495, x497, E365, E335, etc...) on which u cannot read the softkeys. They are not supported through the keypressed event. Your only solution is to use the command listener, and then when you get a softkey command pass it to the keypressed event. If your phone lies in the same family you need to use this idea.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

I need of emulator for SGH-I601

Postby prkshsngh » Thu Aug 09, 2007 5:28 am

Hi,
I need of emulator for SGH-I601.Is available or not?
How check it on device through System.out.println
protected void keyPressed(int keyCode) {
if (keyCode > 0) {
System.out.println("keyPressed " +((char)keyCode));
} else {
System.out.println("keyPressed action " +getGameAction(keyCode));
}
}

protected void keyReleased(int keyCode) {
if (keyCode > 0) {
System.out.println("keyReleased " +((char)keyCode));
} else {
System.out.println("keyReleased action " +getGameAction(keyCode));
}
}
null
prkshsngh
 
Posts: 4
Joined: Thu Aug 09, 2007 4:00 am
Location: Mumbai

Postby DevelopmentTeam » Thu Aug 09, 2007 6:32 am

Please try printing the string using g.drawstring() function. and check if it works.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Postby DevelopmentTeam » Thu Aug 09, 2007 7:03 am

please checkout the code posted in this topic
Samsung Keycode for softkeys using commandlistener
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India


Return to Mobile Game Porting and Testing

Who is online

Users browsing this forum: No registered users and 2 guests

cron