Questions tagged [shake]

An effect or gesture of rapid vibration. For example, shaking dialog box, shaking cell phone.

An effect or gesture of rapid vibration. For example, shaking dialog box, shaking cell phone.

277 questions
0
votes
2 answers

Android Shake Code

In my game I want the player to shake his phone, at any point during the game, and every shake will result in switching weapons. Example: Player has knife, [shakes phone] and switches to a katana. if (accelerometer.x >= 5 || accelerometer.x <= -5 …
katrina
  • 43
  • 2
  • 10
0
votes
2 answers

How to pass data from one view to another view controller in IOS?

I am using Xcode 4.3.1. I have created the UI using Storyboard which has many View Controllers. Issue In my app i am using ShakeGesture. While shaking i am doing some operations, its working fine. But, when shaking get stopped i need to pass some…
vinothp
  • 9,939
  • 19
  • 61
  • 103
0
votes
2 answers

Shaking phone direction

Is there any way to detect to which direction the phone was shaked? For example: I want something be shot from the right border of the screen, so I need to look if a phone was shaked to the left (coordinates from the beginning of first movement).…
Graykos
  • 1,281
  • 3
  • 20
  • 31
0
votes
1 answer

ShakeListener implementation in separate class

I'm trying to implement a ShakeListener. So I made a Class called ShakeListener.java : import java.util.List; import android.app.Activity; import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorEvent; import…
Kees Koenen
  • 772
  • 2
  • 11
  • 27
0
votes
2 answers

Image shaking when StretchDIBits partially

I am using C++ GDI, StretchDIBits to draw images on DC. Because the original Image is large, and high quality is needed. I use HAFTONE mode, to draw whole image on DC(zoom the image) seems time comsuming. So I decide to draw partially using…
user25749
  • 4,825
  • 14
  • 61
  • 83
0
votes
3 answers

How to finish an activity on device shaken in android

I just want to finish current activity when i shake my device for 2 seconds. What should i do for that? Can anyone guide me please.
SANDHYA
  • 771
  • 7
  • 18
  • 27
-1
votes
2 answers

Shake event on mobile web apps

I was wondering of there is a way to trigger the shake event within a mobile web app? --EDIT--- Without using Phonegap.
Steaphann
  • 3,431
  • 3
  • 18
  • 15
-1
votes
1 answer

How to detect shake in UITableViewCell

I want to detect a shake gesture in a UITableViewCell, but no shake is being registered. Is there a way I can detect a shake in a UITableView cell? This is the code I'm using now: extension MyTableViewCell { override func motionBegan(_ motion:…
helloworld12345
  • 176
  • 1
  • 4
  • 22
-1
votes
1 answer

jquery shake doesn't work on divs

I was designing a webpage and needed JQuery shake to shake some divs but i couldn't get it to work so I guessed it maybe is something in my page which was preventing it. then I used it on two very simple divs but again it didn't…
Mahdi Ghajary
  • 2,717
  • 15
  • 20
-1
votes
1 answer

Shake sort using MACRO

Shake sort of vector: program works, but: I was trying to use the same function for bubble up and bubble down for shake sort (bubble up to get the MAX value to the right and bubble down to get the min value to the left). In order to do it I was…
user8180105
  • 27
  • 1
  • 2
-1
votes
2 answers

How to listen to a combination of events in an Android Service

I have an android service (in Java) that currently invokes a function that does things like getting geolocation coordinates when the user shakes the phone repeatedly. However, to reduce false-positives, I would like to be able to listen to a…
chidelta
  • 7
  • 1
-1
votes
1 answer

How I can get an Android phone to vibrate while shaking it?

I am just curious if my app would work out this way to make it vibrate when the phone is shook: if(event.values[0] > 1.0) { vibrator.vibrate(500); } else { if(event.values[1] > 1.0) vibrator.vibrate(500); } What I am doing is…
Rido
  • 27
  • 6
-1
votes
1 answer

bump API shutdown after 31st January what it's alternate for iphone

I am developing the app in which i successfully integrated a bump API but recently bump developer site announce that bump API shutdown after 31st January. Now i wondering about it's alternate way for doing this task in my application to implement…
Bhavesh Lakum
  • 130
  • 1
  • 12
-1
votes
1 answer

Shake Detection iPhone 3.0 not working

I have a ViewController that works perfectly with a button that trigger an action. I would like to replace the button with a shake event so I've googled it around and created a ShakeDetector class that ineherits from UIView and my implementation is…
-2
votes
1 answer

Why does en IF statement make my function repeat?

Sensor Assignment
1 2 3
18
19