Questions tagged [android-vibration]

The Android framework includes support for Vibration available on devices, allowing you to control the device's vibrations from your application. Questions regarding practical and advanced use of Vibrations must fall under this tag.

202 questions
0
votes
2 answers

Toast Message show on Another phone and vibration

I would like to ask if it is possible through the use of android codes, to send a request(or data) from one android device to another and having the receiver's android device to display a toast message saying that data/request is received and…
CodeNewbie
  • 35
  • 7
0
votes
1 answer

How to Vibrate while typing but not when pressing the backspace key

I have the following code: @SuppressWarnings("unchecked") @Override protected void publishResults(CharSequence constraint, FilterResults results) { data = (ArrayList)results.values; EditText etS =…
Si8
  • 9,141
  • 22
  • 109
  • 221
0
votes
1 answer

Show Alertdialog and use vibrator

I'm having a class that implements RecognitionListener like this: public class listener implements RecognitionListener I wanted to show a alertdialog and use the vibrator but this isn't possible because I need to provide a context what I don't…
user1007522
  • 7,858
  • 17
  • 69
  • 113
0
votes
0 answers

simulating phone call in Android app for a wristband

I have an Android app that receives tasks from the server, but the environment that it will be used is noisy and vibration does not always work and the device is on user's belt. So I thought that I could use those "smart" wristbands that vibrate or…
0
votes
1 answer

setRingerMode(AudioManager.RINGER_MODE_VIBRATE) is not working as expected

public class ProximityService extends Service implements SensorEventListener{ boolean hasproximity=false; SensorManager mSensorManager; AudioManager am; Sensor psensor; public ProximityService() { } @Override …
user990967
  • 444
  • 1
  • 6
  • 20
0
votes
3 answers

Vibrate device on long button press

I want the device to vibrate as long as the user clicks the button. If the user press the button for a long period of time the device is to vibrate as long as the user clicks and holds. here is what I implemented but it works for a particular period…
user2491565
  • 3
  • 1
  • 3
0
votes
2 answers

Android vibrations settings - red line under else?

I have put this section of code in my Setting Activity, so if the vibration box in the xml file which is working is checked, vibrators will be turned on and if not they will be cancelled. However, there seems to be a problem with the else that won't…
user2229066
  • 143
  • 3
  • 13
0
votes
2 answers

Vibrate from OnLongClickListener

Maybe someone can explain me, how to vibrate from OnLongClickListener properly. In method below the vibration is very short. If I set return false; vibration lasts for 5000ms as expected, BUT OnClickListener is fired. How should I vibrate from…
Datenshi
  • 1,191
  • 5
  • 18
  • 56
0
votes
2 answers

Android 4.2.1 / 4.2.2 Notifications vibrate in silent mode

Prior to Android 4.2.1 the following code worked just fine notification.audioStreamType = AudioManager.STREAM_RING; notification.flags = notification.flags | Notification.FLAG_INSISTENT |…
0
votes
2 answers

Stop vibrating onDestroy

I have an activity that vibrates the phone for 9 seconds after it starts. I want the vibration action to be canceled when the activity leaves the foreground. Here is my current code: Handler handler = new Handler(); handler.postDelayed(new…
A.Jouni
  • 377
  • 2
  • 4
  • 14
0
votes
1 answer

Varying vibration intensity: how does the VIBE app do it?

I understand that, given how vibration is achieved, the only way to vary the intensity would be a way to control the RPM of the motor. I can see the Vibrator Class does not allow for this, and yet, the VIBE app (see this video) appears to be…
FFiloseta
  • 33
  • 7
0
votes
1 answer

Android vibrator service error

Does anyone know why my vibrate service is having an error when I click the Buttons? It says "....... force close". Here's my code: final Vibrator mVibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); public void onClick(View v) { …
Jerome
  • 139
  • 10
0
votes
1 answer

Enable/disable vibration function in android?

I have implemented vibration using vibrator .In my application, when the user press the button, vibration works.For some users wont like vibration in app so i had a toggle button as vibration on/off. i just need to know how to implement the …
KMI
  • 496
  • 4
  • 24
-1
votes
1 answer

How to change vibration pattern of android app?

I have root. I use Blackberry Hub on my phone, but it vibrates too strong when notifying new mail. So how can I change that?
-1
votes
1 answer

Android onTouch and Vibration Class Combining

First , my English is not so good. Please use a plain language if you give answers. I'm trying to make an app that vibrates when the user touches the screen, and stops vibrating when they remove their fingers. But the vibration class takes a value…
1 2 3
13
14