I'm trying to get the Android Vibrator to pulse once when the user has held down an image for a second or so.
I've added the permission for it in my manifest file.
I think the problem is that I'm not calling the code from inside the activity, I'm creating a game so the code is running from within the onTouch function.
I've tried (As well as some combinations of the below):
Vibrator v = (Vibrator) Context.getSystemService(VIBRATOR_SERVICE);
That says that it can't cast from String to Vibrator class, which I don't understand why! I assume that it's something to do with the code being called outside of the Activity - Bonus points for explaining why that's an issue!
Thanks.