Hi All
I would like the Android screen to buzz/vibrate when it is tapped. I've looked on line without success.
Any ideas
Thanks Roy
Buzz
Re: Buzz
Just to be clear, when you say the "screen" to buzz, I presume you mean that you want to be able to make the device vibrate in the same way as it would when (for example) an incoming telephone call arrives while set to 'silent' (this isn't connected with the screen, as such).
The most important thing to say is that making an Android device vibrate requires an explicit app permission (android.permission.VIBRATE) which BBC BASIC does not request, so this is impossible with a program running under control of the 'IDE'. You could only achieve it by building an app using the BBC2APK tool, and specifying this in the 'Custom manifest' box:
Code: Select all
<manifest><uses-permission android:name="android.permission.VIBRATE"/>
Code: Select all
// Get instance of Vibrator from current Context
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
// Vibrate for 400 milliseconds
v.vibrate(400);
Richard.