You Are Here:

Community: Developer Discussion Boards

#1 Old How to implement vibration in a game application - 2003-11-24, 03:17

Join Date: Nov 2003
Posts: 16
s01200994
Offline
Registered User
Dear everyone who knows about it,

First of all, let me introduce myself.
My name is david. I am currently developing a simple logic game application for series 60 devices(NOKIA 3650).
I wish to add on "Vibration Feature" on my game application but do not know how.

As i this J2ME is still new to me, I am often met with a lot of problems.
Through this email, any experts out there who happen to read this email, please kindly guide me along to develop the "Vibration Feature on NOKIA series60(NOKIA 3650).

Lastly, thank you very much...

regards,
david
Reply With Quote

#2 Old 2003-11-24, 04:14

Join Date: Mar 2003
Posts: 112
ossipetz
Offline
me-2-j :)
midp 2.0 has some vibra stuff in the System class.
for your 3650: i guess it supports the nokia UI api.... so

some example code:
(startVibra is what you look for i guess?)


package ch.fhso.j2me.nokia;

import javax.microedition.midlet.*;
import com.nokia.mid.ui.DeviceControl;
import javax.microedition.lcdui.*;

public class NokiaUITest extends MIDlet implements CommandListener{

private Command _cmdExit = null;
private Command _cmdVibrate = null;
private Command _cmdBacklightOn = null;
private Command _cmdBacklightOff = null;
private Command _cmdBacklightFlash = null;


private Form _mainForm = null;
private Display _display = null;

public NokiaUITest() {

_cmdExit = new Command("Schliessen", Command.EXIT, 1);
_cmdVibrate = new Command("Vibrieren", Command.SCREEN, 1);
_cmdBacklightOn = new Command("Backlight ON", Command.SCREEN, 2);
_cmdBacklightOff = new Command("Backlight OFF", Command.SCREEN, 2);
_cmdBacklightFlash = new Command("Flash Backlight", Command.SCREEN, 3);

_mainForm = new Form("Status NokiaUI Test:");
_display = Display.getDisplay(this);

_mainForm.addCommand(_cmdExit);
_mainForm.addCommand(_cmdVibrate);
_mainForm.addCommand(_cmdBacklightOn);
_mainForm.addCommand(_cmdBacklightOff);
_mainForm.addCommand(_cmdBacklightFlash);

_mainForm.setCommandListener(this);
}

protected void startApp() throws MIDletStateChangeException {
_display.setCurrent(_mainForm);
}

protected void pauseApp() { }

protected void destroyApp(boolean uc) { }

public void commandAction(Command cmd, Displayable disp) {

if(cmd == _cmdExit){
_mainForm.append("EXIT MIDlet... \n");
this.destroyApp(false);

}else if(cmd == _cmdVibrate){
_mainForm.append("Vibra for 2 Seconds (Freq:100)... \n");
DeviceControl.startVibra(100, 2000);

}else if(cmd == _cmdBacklightOn){
_mainForm.append("Turn Backlight ON \n");
DeviceControl.setLights(0, 100);

}else if(cmd == _cmdBacklightOff){
_mainForm.append("Turn Backlight OFF \n");
DeviceControl.setLights(0, 0);

}else if(cmd == _cmdBacklightFlash){
_mainForm.append("Flashing Light for 2s \n");
DeviceControl.flashLights(2000);
}


}
}
Reply With Quote

#3 Old 2003-11-24, 10:48

Join Date: Mar 2003
Posts: 143
Location: Kluang
yowchuan
Offline
Sony Ericsson Expert
I don't think the code works in Nokia Series 60 devices. It's a known issue which I don't think is fixed in any of the Series 60 devices after N7650...weird...known but not bothered to fix...
Reply With Quote

#4 Old No vibra on S60 - 2003-11-25, 00:54

Join Date: Aug 2003
Posts: 121
marcpalmer
Offline
Game writer
The Nokia APIs provide vibra support (the only Nokia MIDP 2 phone is the 6600) for Nokia handsets.

None of the Nokia S60 phones respond to vibra or backlight API calls.
Reply With Quote

#5 Old partial implementation of vibra support - 2004-04-12, 07:16

Join Date: Apr 2004
Posts: 1
deprimer
Offline
Registered User
I managed to get backlight working on a Nokia 6600 using J2ME.

I created a backlight function similar to this:

private void theFlasher() {
display.flashBacklight(100);
}

vibration is definitely broken. you can read about all these and other known issues here:

http://www.forum.nokia.com/main/1,,0...ml&fileID=4732
Reply With Quote

#6 Old Nice... - 2004-04-13, 12:10

Join Date: Aug 2003
Posts: 121
marcpalmer
Offline
Game writer
...but my post was from November 2003 when the 6600 was not available :)

Nice that the MIDP2 light stuff works.
Reply With Quote

#7 Old Re: How to implement vibration in a game application - 2006-02-26, 04:29

Join Date: Nov 2004
Posts: 8
Viggy
Offline
Registered User
Hi!

I tried the method vibrate(millis) in class Display of MIDP, but my devico don't vibrate. Does this function works or not?

Thanks in advance.
Reply With Quote

#8 Old Smile Re: How to implement vibration in a game application - 2006-02-27, 09:17

Join Date: Jun 2005
Posts: 26
sharma_durg
Offline
Registered User
Hello
The MIDP 2.0 provide us the vibration and Backlight support. u can get those methods on Display class , Display.vibrate() , Display.flashBackLight() and I think these fucntion should work on all MIDP 2.0 dvices , if device have Vibration and BackLight support .
Reply With Quote

#9 Old Re: How to implement vibration in a game application - 2006-03-05, 19:25

Join Date: Aug 2004
Posts: 21
vics69
Offline
Registered User
The MIDP display.vibrate(...) DOES NOT work and has not for the last two years. It has been a known issue that Nokia just does not care about or deem important enough to fix. Sadly, I've had to dissolve my company because it was based on having a phone application vibrate the phone under specific conditions. Too bad Nokia/Symbian did not release a patch to fix this because they were sloppy in implementing the MIDP standards when they released their series 60 and other products.
Reply With Quote

#10 Old Question Re: How to implement vibration in a game application - 2006-03-14, 07:56

Join Date: Mar 2006
Posts: 76
sachinwarang
Offline
Regular Contributor
Hi,
I'm building application to develop vibration in Nokia 6600.And i've also read the "Known_Issues_In_The_Nokia_6600_v1_7_en" where the specify that if the device has support of MIDP 2.0 then java's vibration APIs are preferable instead of Nokia UI API.
But this doesn't vibrate while using the API "display.vibrate(duration);" even it supports MIDP 2.0.(Which works fine in other series 60 devices.)
Should i use Nokia UI API instead of j2me's standard vibration API.or Is there any other option available.

Regrads,
Sachin Warang.
Reply With Quote

#11 Old Re: How to implement vibration in a game application - 2006-03-15, 04:11

Join Date: Aug 2004
Posts: 21
vics69
Offline
Registered User
Sorry, but like I said, there is no way to vibrate the phone either via Nokia API's or the J2ME/MIDP 2.0 API's. Nokia (and Symbian) screwed up very badly on this. The worse part is, after hearing numerous complaints, they still don't care enough to release a patch for this.

So, to answer your question, aside from playing sounds - the MIDP 2.0 devices DO NOT VIBRATE NO MATTER WHICH API YOU USE.
Reply With Quote

#12 Old Re: How to implement vibration in a game application - 2006-03-15, 17:58

Join Date: Jan 2006
Posts: 3,171
Location: Michigan
Nokia Ron's Avatar
Nokia Ron
Offline
Forum Nokia Expert
Quote:
Originally Posted by vics69
Sorry, but like I said, there is no way to vibrate the phone either via Nokia API's or the J2ME/MIDP 2.0 API's. Nokia (and Symbian) screwed up very badly on this. The worse part is, after hearing numerous complaints, they still don't care enough to release a patch for this.

So, to answer your question, aside from playing sounds - the MIDP 2.0 devices DO NOT VIBRATE NO MATTER WHICH API YOU USE.
This might be something you'd like to list on the new Feedback discusssion group for the Tools and SDK's area. While our primary interest is for developer's needs and feature we can funnel product support to the proper people as well.

Ron


Ron Liechty
Manager Forum Nokia Online Community
ron.liechty@nokia.com
Reply With Quote

#13 Old Question Re: How to implement vibration in a game application - 2006-03-17, 14:29

Join Date: Mar 2006
Posts: 76
sachinwarang
Offline
Regular Contributor
Hi,
Still i'm not abel to build vibration on Nokia 6600 either by j2me standard api or by Nokia UI API's.
But in "Known_Issues_In_The_Nokia_6600_v1_7_en" they have specified that
The MIDP 2.0 methods should be used. In software versions 3.42.1 and 4.09.1, only backlight is supported.

In Nokia 6600 you can get version number by pressing "*#0000#".The device in which i'm building application is having version "5.53.0" with support of MIDP 2.0.
But any how the application not enable the vibration.
As specified in this thread that in the latest version there are guys who are abel to vibrate the Nokia 6600.

Can anyone resolve this issue?
Can i know which are the latest version in which i'm abel develop this application?
Does my version is also the one in which Nokia 6600 not vibrates?

Regards,

Sachin Warang.
Last edited by sachinwarang : 2006-03-17 at 14:34. Reason: garamatical mistakes
Reply With Quote

#14 Old Re: How to implement vibration in a game application - 2008-03-09, 16:35

Join Date: Dec 2003
Posts: 19
shmulikm29
Offline
Registered User
Hi,
I am trying vebration on 3220. it sometimes vibrate and sometimes dosen't.
I am using Display.vibrate(700);

Anyone have a solution for this?
Shmulik
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

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