Vibrator device simualtion in the emulator

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Vibrator device simualtion in the emulator

Postby prem thilagar » Tue Mar 17, 2009 3:54 am

Hi I am trying to actually simulate a vibrator device inside the simulator .A timed_output driver for the vibrator was created and the node 'THE_DEVICE' at /sys/class/timed_output/vibrator/enable that is used in the vibrator.c file in the code was brought up using that.The driver has been proven to work from the kernel below.

I ran into some issue while trying to invoke the driver from a user level app.I just added these two lines and created an app.

vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
vibrator.vibrate(10000);

when i created an .apk and ran it i could see the following messages in Logcat

I/ActivityManager( 589): Starting activity: Intent
{ action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} flags=0x10200000
comp={com.uiactivity.ui/com.uiactivity.ui.uiSimpleWidet} }
I/ActivityManager( 589): Start proc com.uiactivity.ui for activity
com.uiactivity.ui/.uiSimpleWidet: pid=791 uid=10023 gids={}
:
: A bunch of Dalvik messages
:
:
V/ActivityThread( 791): Resuming ActivityRecord{436b6288token=android.os.Binde
rProxy@436b5e50 {com.uiactivity.ui/com.uiactivity.ui.uiSimpleWidet}} with isForward=true
I/ActivityManager( 589): Displayed activity com.uiactivity.ui/.uiSimpleWidet: 1203 ms


After this nothing happens , i was hoping for the hardwareservice to kick in and take control ,

is it guaranteed that VIBRATOR_SERVICE will automatically be binded when i do this
vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
because i dont really see a error there.

Could some on suggest a way out ?

Is there a way i can verify VIBRATOR_SERVICE is actually runnign in the emulator ( i made sure the libhardware.so and libhardware_legacy.so are there and the service hardware is running .



Thanks in advance

Prem
prem thilagar
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Mar 17, 2009 3:41 am

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: Exabot [Bot] and 3 guests