Android :: ScaleGestureDetector Not Detecting Gesture End
Oct 31, 2010
I have hooked in a ScaleGestureDetector to an OnTouchListener as instructed in Android documentation. For some reason the ScaleGestureDetector does not always detect end of a pinch gesture. This happens mostly when pinching fast from large to small.
The effect is that after I have released both fingers the detector does not fire the gesture end event. If I touch the screen with one afterwards it still thinks I'm continuing the scale gesture (keeps firing onScale events). I have to do another gesture to get the detector to fire end event.
I have added logs to the OnTouchListener and when the scale gesture gets stuck I still get motion events normally when using one finger and event.getPointerCount() is 1.
I have made sure that I don't have any other listeners intervening. View that has the onTouchListener is not the only view on screen but this effect happens also when I'm very careful to begin and end the gesture inside this one view.
Is there any way to improve the end detection?
Or if there a way for me to manually set the ScaleGestureDetector to fire onScaleEnd and change scaleGestureDetector.isInProgress() to false?
View 1 Replies
Jul 31, 2009
I would like to know what is meant by gestures in typical mobiles more specifically android ones. Android supports gesture recognition.
Is a gesture termed as when user holds the device and shakes it(say upwards, downwards or side- side)?
Is a gesture termed as when a finger is placed on the screen and traced UP,DOWN,RIGHT,LEFT? If so what is the difference between touch screen and gestures.
I am confused between 1) and 2) option.
What is a gesture exactly?
View 3 Replies
View Related
Oct 6, 2010
I create some gestures and they are working, but if I add a button the gesture doesn't work over the button. I split the display resolution to make different gestures and i get x, y coordinates. If i make a gesture starting with the button the coordinates are both 0, only under them i get normal coordinates. It's like the coordinates are starting only after the button.
View 1 Replies
View Related
Oct 13, 2010
I have to add a gesture to my listview,i want to implement the same functionality of contact application.
when i left swipe it should send a message,right swipe it should call. can anyone help me how to do those gesture detection... i have implemented it in various other views... but i couldn't do for listView... i don't what going worng...
My code is:
CODE:...........
View 1 Replies
View Related
Dec 15, 2009
I want to know that android has a touchscreen requirement about hardware and software.And how does touch gesture processing where, for example, in driver layer or framework or application,
View 4 Replies
View Related
Sep 3, 2010
I got a crash with the following stack trace:
CODE:.................
Line 130 in my code is: ...........
What's wrong and what checks can I perform on gesture before sending it to recognize to avoid this crash?
View 5 Replies
View Related
Apr 11, 2009
I had developed a simple gesture recognition library for Android (not for accelerometer; I mean touchscreen - finger gestures). I had to abandon it for quite a while, but recently I was able to clean it a bit and port it to 1.0 SDK. It is released under GPL. Here are some sample videos:
http://www.youtube.com/watch?v=C7A6OHWfSOE [url]
View 7 Replies
View Related
Apr 30, 2009
http://android-wydiwyg.blogspot.com/
Me and some of my friends have made a gesture recognition application for android. It allows you to customize gestures that will call, text, or email one of your contacts or launch an application. Please check out our blog and demonstration video and comment to let us know what you think.
View 2 Replies
View Related
Apr 30, 2010
I got pretty good at using the Palm shorthand for entering text. I'm pretty sure that a similar "shorthand keyboard" would work out well on the Android phones, but I haven't seen any apps that will replace the keyboard with a "shorthand" pad.
View 2 Replies
View Related
Feb 2, 2010
What I want is to have an options menu where the user can choose to navigate the menu between:
1) touching a button and then pressing down on the trackball to select it, and
2) drawing predefined gestures from Gestures Builder
As it stands now, I have created my buttons with OnClickListener and the gestures with GestureOverlayView. Then I select starting a new Activity depending on whether the using pressed a button or executed a gesture. However, when I attempt to draw a gesture, it is not picked up. Only pressing the buttons is recognized. The following is my code:
CODE:..............
View 1 Replies
View Related
Mar 25, 2010
I am using gesture detector to catch "flings" and using a view flipper to change the screen when this happens. Some of my child views contain list views. The the gesture detector wont recognize a swipe if you swipe on the list view. But it will recognize it if it is onTop of TextView's or ImageView's. Is there a way to implement it so that it will recognize the swipes even if they are on top of another view that has a ClickListener?
View 3 Replies
View Related
Jul 6, 2010
What Android Api is used to get the scrolling to the left or to the right on the start screen on Android?
View 4 Replies
View Related
Jul 26, 2010
I am adding gesture recognition to my app. I have added the view as described in the Android Developers Gestures article but when it comes to adding:
CODEE:..........
where do I put this in my code, do I have to create a new class for it, or can I have it in an inner class, or does it not need a class at all?! I have a set up similar to Lunar Lander which comprises of two files, one of which is a thread that handles pretty much all the physics and drawing of the game. The other file begins the thread and saveInstanceState method. Furthermore, what type is mLibrary?! I cannot find out anywhere! I imagine I will put the OnGesturePerformed method in my thread as this is where I handle all keyUp and Down events.
View 1 Replies
View Related
Apr 15, 2009
How do you use the Android API to zoom in and out maps with the 2 finger gestures like iPhone?
View 2 Replies
View Related
Nov 26, 2009
I have the same problem with Gesture Builder on the emulator and when I build the app myself and install om my G1.
It does not save the gestures correctly on my sdcard. It does not create a folder called "gestures" but instead creates a file called "gestures" with a size on about 2kb. It does not grow when I create more gestures. Is this really correct, because I thought a folder would be created in which each gesture would be stored in different files.
I look in code for CreateGestureActivity.java and here is where the magic of saving happens:
final GestureLibrary store = GestureBuilderActivity.getStore(); store.addGesture(name.toString(), mGesture); store.save();
View 2 Replies
View Related
May 1, 2010
I want to implement the same behavior of the notification view in the official Facebook app.
The "notifications" tab are at the bottom and can drag/drop via fingers to full screen. How can I do that? I've tried it via ViewFlipper and Animation. But no success. The app "Zedge" has the same in the "search" function. Via drag/drop you can open the "search" view.
View 4 Replies
View Related
Sep 3, 2010
I want to implement the same behaviour of the notification view in the official Facebook app.
The "notifications" tab are at the bottom and can drag/drop via fingers to full screen.
How can i do that?
I've tried it via ViewFlipper and Animation.... But no success.
Does anyone know how we can do this?
The app "Zedge" has the same in the "search" function. Via drag/drop you can open the "search" view.
View 2 Replies
View Related
Jul 7, 2010
I have a single bitmap with several individual pictures in (each one is an option) and I would like to detect when the user touches these pictures. I am using the event.getX and event.getY to detect where is pressed, I know the top left X Y and bottom right location of each of the pictures. What is the best way of detecting which one is pressed? (i.e. tieing up the event press and which picture has been pressed?
View 2 Replies
View Related
Dec 23, 2009
I am a brand new developer to Android. I wrote a pretty simple application that uses the gesture library. The application itself seems to run fine in the simulator. However, when I installed the application on my Google Dev Phone 1 (G1) last night, it doesn't seem to work. I've upgraded my G1 with the 1.6 image from the htc developer site. I see the first screen/activity for about a second and the application exits without and errors. Here is what my manifest looks like:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.blahblah" android:debuggable="true"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CONTACTS">
</ uses-permission>
<uses-permission android:name="android.permission.CALL_PHONE">
</uses- permission>
<application android:icon="@drawable/icon" android:label="@string/ application_name"> <activity android:name="Gesture1Activity"
android:label="@string/application_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="Gesture2Activity"
android:label="@string/label_gesture_list" />
<activity android:name="Gesture3Activity"
android:label="@string/label_create_gesture" />
</application>
</manifest>
Here's the output for logcat:
D/AndroidRuntime(860): D/AndroidRuntime(860): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< D/AndroidRuntime(860): CheckJNI is OFF D/AndroidRuntime(860): --- registering native functions --- I/jdwp (860): received file descriptor 20 from ADB D/ddm-heap(860): Got feature list request I/ActivityManager(101): Starting activity: Intent { flg=0x10000000 cmp=com.blahblah/.Gesture1Activity } D/AndroidRuntime(860): Shutting down VM D/dalvikvm(860): DestroyJavaVM waiting for non-daemon threads to exit E/AndroidRuntime(860): ERROR: thread attach failed D/dalvikvm(860): DestroyJavaVM shutting VM down D/dalvikvm(860): HeapWorker thread shutting down D/dalvikvm(860): HeapWorker thread has shut down D/jdwp (860): JDWP shutting down net... D/jdwp (860): +++ peer disconnected I/dalvikvm(860): Debugger has detached; object registry had 1 entries D/dalvikvm(860): VM cleaning up D/dalvikvm(860): LinearAlloc 0x0 used 677572 of 4194304 (16%) W/InputManagerService(101): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub $Proxy@439a9eb8
View 5 Replies
View Related
Mar 26, 2009
My View subclass is can be written one of two ways, I've tried both. One implements OnGestureListener, the other doesn't. In both cases, the Activity registers the view for context menus when the view is created and registers itself, the activity, as the context menu listener.In the case where OnGestureListener is *not* implemented, context menus work. onCreateContextMenu() and onContextItemSelected() are both called and the menu works as expected. In the case where OnGestureListener *is* implemented by the view subclass, the context menu processing functions in the activity are never called. Problem is, I need both. Without OnGestureListener, I don't get fling events. With it, I don't get context menus. need both.
View 6 Replies
View Related
Aug 31, 2009
The App I'm trying to work on requires that when a special combination of keys are pressed ( irrespective of the keypad being locked ) a service / app is triggered.
How can I achieve this? My app's whole idea hinges on this particular part to work.
I am not here to take a "no" for an answer. If you are going to tell me that its not possible, atleast include an explanation as to why its not possible.
View 7 Replies
View Related
Nov 12, 2010
If (in Android) you wanted to write an alarm app where the user entered in the time for the alarm by swiping the hours & minutes up and down, what's the easiest way of achieving this? Is it the Swipe or Fling command?
Are there any good tutorials out there for this?
View 1 Replies
View Related
Jun 3, 2009
There are return values and such that allow handling if SensorManager sensors and location providers aren't available, but what about the camera and microphone for audio recording? Is there a way to detect those in software, or are we just to assume that every device running Android (even the rumored set-top box) is going to have a camera and microphone and try to use them?
In the case of the camera, it would seem that Camera.open() returning null would indicate the lack of hardware. I don't know if that assumption is valid or not, though, considering it isn't documented as such.
In the case of the microphone, though, I don't see anything that could possibly be checked. The same goes for the camera if you're wanting to do video with the MediaRecorder class.
View 2 Replies
View Related
Sep 2, 2009
I'm trying to figure out how my Activity can detect if it was launched by an alias as opposed to by the main icon.
Is it possible to do this?
CODE:............
alias1 and alias2 appear as expected in the Launcher, but I don't see any way in multipleEntryPointTestActivity to tell which of these icons launched the application.
View 2 Replies
View Related
Nov 26, 2009
Is there a way to detect whether a image was pulled from the folder res/drawable or res/drawable-hdpi?I am trying to save space and have a program that is using some hdpi bitmaps and some mdpi bitmaps. When an image is placed in drawable-hdpi it automatically replaces the mdpi version. I need to know when this happens beacuseI am using bitamp.resize() to fix the image sizes.The problem is that the getDensity() method (in the if statment after the && ) returns the screen density and I need the original bitmap density. This allays matched the screenDPI and returns false. I have a lot of artwork and do not want to duplicate everything for every size screen. I am trying to just create hdpi bitmaps for the ones that don't look good when re-sized.
View 2 Replies
View Related
Oct 20, 2010
I'm trying to find out if the user is still within range of his own area code. Detecting roaming doesn't solve the problem since the user may still be in the same network with a different area code. I thought about getting the user's coarse location to find the city he's is in but this approach needs Internet access and might not be fast enough (this is done as the user is making a call and needs to finish before the call is made). Is there any way I can do this with just the info from the cellular network?
View 7 Replies
View Related
Jun 6, 2009
I am writing a Security-oriented application for Android that is supposed to detect abuse of SMS sending.
In my work I encountered the problem of not being able to detect outgoing SMSs sent not through the use of conventional applications, i.e. merely by using SMS Manager's sendTextSMS method.
The conventional SMS applications add the contents of the sent SMS to the SMS Provider after they send it but I can assume that malicious applications will not do that... and neither will they provide the pending intents to the sendTextSMS method to be broadcast upon sending/ delivery.
My question is, is there any way I can detect the sending of the SMS without relying on the SMS provider?
View 2 Replies
View Related
Oct 16, 2010
As far as i know there is no way to detect when an outgoing call is accepted at public API level. I can detect incoming calls (with PhoneStateListener), outgoing calls by NEW_OUTGOING_CALL intent, but i can not find a way to distinguish the dialing and connected phone states.
View 4 Replies
View Related
Oct 11, 2009
I have an SQL which uses something like "LIMIT 100". If the cursor returns 100 rows, is there an efficient way of distinguishing between whether the LIMIT caused it or not? I suppose I could just call LIMIT 101 instead but I was hoping for a nicer way.
View 2 Replies
View Related
Aug 27, 2010
I was trying to come up with an app that works on the call that a user gets on his phone. For this I wanted to know whether it is possible for me to get intimated when a call comes to the phone and is it possible to intercept the same.I tried to go through quite a few forums but could not get conclusive evidence on how to achieve this.Does anyone have an idea whether this is feasible and if so then how?
View 2 Replies
View Related