sound.Vibrate kills app.

2 views
Skip to first unread message

bernhard

unread,
Feb 8, 2012, 9:38:57 PM2/8/12
to Android Programming at USF
hi,

using sound.Vibrate(1000) kills my app,

sound = new Sound(this);
sound.Source("meow.mp3");
sound.Vibrate(1000)
//crash

best
bernahrd

Kevin Moran

unread,
Feb 8, 2012, 9:40:49 PM2/8/12
to android-progr...@googlegroups.com
Could there be a limit for the vibrate method? Have you tried something smaller?

Kevin

M. Hossein Amerkashi

unread,
Feb 8, 2012, 9:43:08 PM2/8/12
to android-progr...@googlegroups.com
Couple of notes:

You need following permission in your manifest:
    <uses-permission android:name="android.permission.VIBRATE"/>

Given above, I believe it will still crash (try first). If so, do this:
in $define:
   sound = new Sound(this);

in initData:
   sound.Source("meow.mp3");  //some type of caching going on.


bernhard

unread,
Feb 8, 2012, 9:51:00 PM2/8/12
to Android Programming at USF
hi - thanks!
it's just the permission problem, now it works fine, didn't have to
change anything else.
bernhard
Reply all
Reply to author
Forward
0 new messages