android Programming Glossary: vibrator
How to unlock screen programmatically? http://stackoverflow.com/questions/14352648/how-to-unlock-screen-programmatically SCREEN OFF LOGIC System.out.println Enterd Service final Vibrator vibe Vibrator getSystemService Context.VIBRATOR_SERVICE mShaker.. System.out.println Enterd Service final Vibrator vibe Vibrator getSystemService Context.VIBRATOR_SERVICE mShaker new ShakeListener..
Countdowntimer in minutes and seconds http://stackoverflow.com/questions/17620641/countdowntimer-in-minutes-and-seconds 60 60 int hours int milliseconds 1000 60 60 24 To vibrate Vibrator v Vibrator getSystemService Context.VIBRATOR_SERVICE Vibrate.. hours int milliseconds 1000 60 60 24 To vibrate Vibrator v Vibrator getSystemService Context.VIBRATOR_SERVICE Vibrate for 500 milliseconds.. TimeUnit.MILLISECONDS.toMinutes millisUntilFinished 55 Vibrator v Vibrator getSystemService Context.VIBRATOR_SERVICE Vibrate..
How to enable haptic feedback on button view http://stackoverflow.com/questions/2228151/how-to-enable-haptic-feedback-on-button-view implementation import android.view.View import android.os.Vibrator public class Main extends Activity implements OnClickListener.. implements OnClickListener private View myView private Vibrator myVib @Override protected void onCreate Bundle savedInstanceState.. super.onCreate savedInstanceState myVib Vibrator this.getSystemService VIBRATOR_SERVICE myView can be any type..
How to use a custom typeface in a widget? http://stackoverflow.com/questions/4318572/how-to-use-a-custom-typeface-in-a-widget import android.os.IBinder import android.os.Vibrator import android.text.format.DateFormat import android.widget.RemoteViews.. .equals android.tristan.widget.digiclock.CLICK Vibrator vibrator Vibrator context.getSystemService Context.VIBRATOR_SERVICE.. android.tristan.widget.digiclock.CLICK Vibrator vibrator Vibrator context.getSystemService Context.VIBRATOR_SERVICE vibrator.vibrate..
AppWidget PendingIntent not working after Launcher restart http://stackoverflow.com/questions/4909886/appwidget-pendingintent-not-working-after-launcher-restart LOGTAG Error vendor does not exist if foundClockImpl Vibrator vibrator Vibrator context.getSystemService Context.VIBRATOR_SERVICE.. does not exist if foundClockImpl Vibrator vibrator Vibrator context.getSystemService Context.VIBRATOR_SERVICE vibrator.vibrate..
Wake the device up when app prompts user http://stackoverflow.com/questions/6445844/wake-the-device-up-when-app-prompts-user public void onReceive Context context Intent intent Vibrator v Vibrator getSystemService Context.VIBRATOR_SERVICE v.vibrate.. void onReceive Context context Intent intent Vibrator v Vibrator getSystemService Context.VIBRATOR_SERVICE v.vibrate 300 PowerManager..
Android accessibility service http://stackoverflow.com/questions/9675611/android-accessibility-service Got event from evt.getPackageName Toast.LENGTH_SHORT .show Vibrator v Vibrator getSystemService VIBRATOR_SERVICE v.vibrate new long.. evt.getPackageName Toast.LENGTH_SHORT .show Vibrator v Vibrator getSystemService VIBRATOR_SERVICE v.vibrate new long 0 250 250..
How to unlock screen programmatically? http://stackoverflow.com/questions/14352648/how-to-unlock-screen-programmatically super.onCreate REGISTER RECEIVER THAT HANDLES SCREEN ON AND SCREEN OFF LOGIC System.out.println Enterd Service final Vibrator vibe Vibrator getSystemService Context.VIBRATOR_SERVICE mShaker new ShakeListener this mShaker.setOnShakeListener new ShakeListener.OnShakeListener.. REGISTER RECEIVER THAT HANDLES SCREEN ON AND SCREEN OFF LOGIC System.out.println Enterd Service final Vibrator vibe Vibrator getSystemService Context.VIBRATOR_SERVICE mShaker new ShakeListener this mShaker.setOnShakeListener new ShakeListener.OnShakeListener..
Countdowntimer in minutes and seconds http://stackoverflow.com/questions/17620641/countdowntimer-in-minutes-and-seconds int milliseconds 1000 60 int minutes int milliseconds 1000 60 60 int hours int milliseconds 1000 60 60 24 To vibrate Vibrator v Vibrator getSystemService Context.VIBRATOR_SERVICE Vibrate for 500 milliseconds v.vibrate 500 uses permission android.. 1000 60 int minutes int milliseconds 1000 60 60 int hours int milliseconds 1000 60 60 24 To vibrate Vibrator v Vibrator getSystemService Context.VIBRATOR_SERVICE Vibrate for 500 milliseconds v.vibrate 500 uses permission android name android.permission.VIBRATE.. millisUntilFinished TimeUnit.MINUTES.toSeconds TimeUnit.MILLISECONDS.toMinutes millisUntilFinished 55 Vibrator v Vibrator getSystemService Context.VIBRATOR_SERVICE Vibrate for 500 milliseconds v.vibrate 500 share improve this answer..
How to enable haptic feedback on button view http://stackoverflow.com/questions/2228151/how-to-enable-haptic-feedback-on-button-view question Here is an answer though it might not be the best implementation import android.view.View import android.os.Vibrator public class Main extends Activity implements OnClickListener private View myView private Vibrator myVib @Override protected.. import android.os.Vibrator public class Main extends Activity implements OnClickListener private View myView private Vibrator myVib @Override protected void onCreate Bundle savedInstanceState super.onCreate savedInstanceState myVib Vibrator this.getSystemService.. Vibrator myVib @Override protected void onCreate Bundle savedInstanceState super.onCreate savedInstanceState myVib Vibrator this.getSystemService VIBRATOR_SERVICE myView can be any type of view button etc. myView View this.findViewById R.id.myView..
How to use a custom typeface in a widget? http://stackoverflow.com/questions/4318572/how-to-use-a-custom-typeface-in-a-widget import android.content.Intent import android.content.IntentFilter import android.os.IBinder import android.os.Vibrator import android.text.format.DateFormat import android.widget.RemoteViews public class DigiClock extends AppWidgetProvider.. Intent intent super.onReceive context intent if intent.getAction .equals android.tristan.widget.digiclock.CLICK Vibrator vibrator Vibrator context.getSystemService Context.VIBRATOR_SERVICE vibrator.vibrate 50 final Intent alarmClockIntent new.. super.onReceive context intent if intent.getAction .equals android.tristan.widget.digiclock.CLICK Vibrator vibrator Vibrator context.getSystemService Context.VIBRATOR_SERVICE vibrator.vibrate 50 final Intent alarmClockIntent new Intent Intent.ACTION_MAIN..
AppWidget PendingIntent not working after Launcher restart http://stackoverflow.com/questions/4909886/appwidget-pendingintent-not-working-after-launcher-restart cn foundClockImpl true catch NameNotFoundException e Log.d LOGTAG Error vendor does not exist if foundClockImpl Vibrator vibrator Vibrator context.getSystemService Context.VIBRATOR_SERVICE vibrator.vibrate 50 final RemoteViews views new RemoteViews.. true catch NameNotFoundException e Log.d LOGTAG Error vendor does not exist if foundClockImpl Vibrator vibrator Vibrator context.getSystemService Context.VIBRATOR_SERVICE vibrator.vibrate 50 final RemoteViews views new RemoteViews context.getPackageName..
Wake the device up when app prompts user http://stackoverflow.com/questions/6445844/wake-the-device-up-when-app-prompts-user broadcast custom intent. mReceiver new BroadcastReceiver @Override public void onReceive Context context Intent intent Vibrator v Vibrator getSystemService Context.VIBRATOR_SERVICE v.vibrate 300 PowerManager pm PowerManager getSystemService Context.POWER_SERVICE.. intent. mReceiver new BroadcastReceiver @Override public void onReceive Context context Intent intent Vibrator v Vibrator getSystemService Context.VIBRATOR_SERVICE v.vibrate 300 PowerManager pm PowerManager getSystemService Context.POWER_SERVICE..
Android accessibility service http://stackoverflow.com/questions/9675611/android-accessibility-service AccessibilityEvent evt Toast.makeText this Got event from evt.getPackageName Toast.LENGTH_SHORT .show Vibrator v Vibrator getSystemService VIBRATOR_SERVICE v.vibrate new long 0 250 250 250 250 250 250 250 250 1 @Override public void.. AccessibilityEvent evt Toast.makeText this Got event from evt.getPackageName Toast.LENGTH_SHORT .show Vibrator v Vibrator getSystemService VIBRATOR_SERVICE v.vibrate new long 0 250 250 250 250 250 250 250 250 1 @Override public void onInterrupt..
|