Android :: Sleeping In OnTouchEvent Blocks OnSensorChanged

Nov 13, 2010

I'm making an application which will utilize both touchevents and sensorevents. The problem with touchevents is that they fire off very often, and thereby consumes massive amounts of CPU time. The common solution is to do a Thread.sleep to make it cool down.However, if one wants to use both the onTouchEvent and onSensorChanged in the same activity, applying the Thread.sleep hack will also slow down onSensorChanged. This is obviously caused by the two methods being called from the same (ui) thread.Is there some way to call onTouchEvent from a different thread than the ui, so one could do the Thread.sleep trick without slowing down onSensorChanged as well?

Android :: Sleeping in onTouchEvent blocks onSensorChanged


Games :: DROID BLOCKS - Sliding Blocks Puzzle

Jun 29, 2010

Droid Blocks is a classic sliding block puzzle with a sci-fi twist and over 500 levels.

You can get it from the marketplace (lite version also available) or from Droid Blocks Official Website for only 1.99$.

View 3 Replies View Related

Android :: Changing One TextView With OnSensorChanged Without Redrawing Entire Layout

Jun 8, 2009

I am having a bit of trouble with my current application. With a button at the beginning of my app, I send out Intents for two activities, one gets a camera object, and starts a preview screen. On top of that, in a separate layout, there is an activity with a translucent view, which shows a resource image (the user is trying to get the image he is actually taking to align with the translucent image) and a couple of textviews displaying a target phone orientation as well as the user's current phone orientation.

when I update the text value of one of my text views in my onSensorChanged() field, the system constantly reallocates 1.22MB and garbage collects it. I can only assume that this is because it is redrawing the entire layout with the translucent image and the text fields, because if I remove the view containing the translucent image from the layout, my text field updates 10x quicker and I don't have ridiculous heap growing / garbage collecting. I am wondering how to go about getting the text fields to update without redrawing the entire surface. I am very new to UI design, and this code was written by someone else before I took over the project, so I don't understand much of what is going on in the custom view he wrote to take care of the translucent image -- called MyView. I will post the code for the layout as well as the MyView code below.................................

View 4 Replies View Related

Android :: OnTouchEvent Limited To 36x / Second?

Jan 12, 2010

I've been pulling my hair out trying to achieve smooth scrolling in an OpenGL-based app on Eclair. It seems that no matter what I do, I cannot get more than 36 events per second (the rest is sent in history data which is useless in my case). This happens on both the emulator and the Motorola Milestone.Is this a hardcoded limit or am I doing something wrong? I'm implementing onTouchEvent on the activity and recording how many events are received per second and then send that info through Log.v to Eclipse. I also tried implementing onTouchEvent on the view instead of the activity and the results are the same.

View 4 Replies View Related

Android :: Does OnTouchEvent Has To Extends From MapView?

Jan 26, 2010

I want to catch any onTouchEvent() on the mapview. After search lots of questions&answers, I found only when I write my own MapView(MyMapView)and define onTouchEvent, then use this MyMapView in main activity.

View 2 Replies View Related

Android :: Drag Any Particular View With Ontouchevent?

Aug 5, 2010

I am making an user interface and i want to drag any one of them.how can i with ontouchevent.

View 2 Replies View Related

Android :: Stuck In OnTouchEvent & OnClikc Method

Mar 26, 2010

I am stuck in a situation,where I have onClick() method & onTouchEvent method. The situation is the my onTouchEvent is handling the fling gestures (like left,right), after each fling i am changing the Layout & presenting new one for the user. On each layout i have some buttons & they have the onClick() set. Now when i do the gesture nothing happens & sometimes the onClick gets called. how i can make these two methods to work correctly?

View 4 Replies View Related

Android :: Framerate Killed By OnTouchEvent Spam

Apr 27, 2009

I've got a problem with a flood of touch events destroying my game's framerate while there is a touch active. Basically onTouchEvent is called (with getAction = ACTION_MOVE, x = 0 and y = 0) about a hundred times a second for as long as the finger is touching the screen. I've tried returning from onTouchEvent straight away, and even removing its implementation at all, but it doesn't help - the app slows to a crawl as soon as a finger is down. I asked on the IRC channel and Romain Guy advised me that they're aware of the problem but didn't have time to fix it for Cupcake, so I'm not expecting a full solution!

View 3 Replies View Related

Android :: Lags During OnTouchEvent On Motorola DROID

Dec 16, 2009

I have several complaints from Moto DROID users who experience lags while touching. In my app I implement the recommended workaround with two threads and Thread.Sleep( 35 ) . It worked and works perfectly on my G1 and on some other Google devices. But for DROID I hear many complaints. As I don't have a DROID, could someone please tell me if there is still a need for this workaround? Or shall I have to do anything else?

View 2 Replies View Related

Android :: How Can I Check Left And Right Motion In OnTouchEvent?

Jul 7, 2009

i need left, right motion event and a click event . problem is that, if i have onclickEvent then onTouchEvent doesn't fire. onTouchEvent works only if i disable onclickEvent and also it doesn't work what i expect.

1-only ACTION_MOVE fires twice everytime when i move on screen.

2-can't get left and right motion.

View 6 Replies View Related

Android :: Detect Where On Screen OnTouchevent Happened

Jul 27, 2010

I've got an onTouchEvent boolean on a Surfaceview, I've got openGL objects drawn on the view and I'm wondering is there anyway to detect where on the screen the onTouch happened? e.g (x,y) co-ordinates.

View 1 Replies View Related

Android :: OnTouchEvent How To Get Curret View Under Finger?

Nov 19, 2010

I'm adding 5 ImageView to an linear layout at runtime, so far so good, but what i would like to do is, when the user slide his finger over one of them, i would like to change the image, so my question would be, how can i know what's the current imageview under the user finger.?

View 2 Replies View Related

Android :: Drag Marker On Map / Handle It In OnTouchEvent()?

Oct 15, 2010

How can I drag a marker on the map?
How to handle it in onTouchEvent()?

I had written one code that actually drags. But it feels like the map is moving instead of the marker. That code is...

View 1 Replies View Related

Android :: No Window To Dispatch Pointer Action 1 OnTouchEvent

Feb 3, 2009

Does anybody have any idea why I get often(but not always) error during the on touch event? Handling touch events is freezed for few seconds(this appears only immediately after application start). Then Error screen appears (choose wait of close). When I choose wait after few seconds screen is starting to process events. I'm using surfaceView with thread for painting. In logcat I get something like : "No window to dispatch pointer action 1".

View 2 Replies View Related

Android : Create App To Draw Simple Lines Through OnTouchEvent?

Dec 29, 2009

what is best way to create app in which I only need to draw simple lines through onTouchEvent? When i use invalidate everytime i draw any line, that erase lines i draw before. But if I use some List structure to store drawed lines it lose performance. Is there any simple way to do it?

View 6 Replies View Related

Android :: Prolonged Touching In One Area Causes OnTouchEvent To Stop Registering?

Jan 12, 2010

I'm trying to do something in my app where you have to hold your finger on the screen for more than 30 seconds. After about 30 seconds, it stops sending onTouchEvents for that part of the screen, almost like a "dead zone." Tested on a motorola droid, and is there any way to stop this from happening?

View 6 Replies View Related

Android : Catching Button Behavior - Using OnTouchEvent Method To Capture ACTION_DOWN

Oct 20, 2010

I need to specify the full button images for both the up and down positions. My impression is that the most probable choice is to use an custom button based on the ImageView and specify the image for up and down positions. I am using the OnTouchEvent method to capture the ACTION_DOWN, but I'm not getting the ACTION_UP event.

Is there a better choice for creating a button that controls the full button image, catches the Down/Up and can subdivide the down time into time slices? If not, how do I catch the up event.

My application expects a screen touch on the "button" and not a keyboard action.

View 3 Replies View Related

HTC EVO 4G :: Blocks Access Exchange Server - Not Available For Android

May 23, 2010

I'll be new to Android starting on June 4th and I'll be retiring my Blackberry Tour. There are a few apps on my Blackberry that I really like and use daily. So I have a few questions for the Android gurus out there.

1. Exchange Email- I work for a Computer Company that blocks access to their Exchange Server and although I've requested access repeatedly, they deny me every time. Is there a work around for Android similar to the Blackberry Desktop Redirector?
2. Sirius/XM- I know it's not available yet for Android but I was wondering if anyone has an update on the future availability of this App for the Evo.
3. Password Keeper- I would not be able to survive without this App on my Blackberry. Is there something as good or better available on the Android Market?
4. Can anyone recommend a good Chess Application for the Evo?

View 4 Replies View Related

Android :: DatagramSocket.receive - Sometimes Blocks For Too Long

Dec 28, 2009

I have a thread that constantly polls a UDP connection and posts the received data to another thread. It uses a connected DatagramSocket, reads a packet (which is always the same side), gets the data and posts it to a message queue (not the android one, my implementation). The problem happens mainly over 3G connection, not wifi.

Code looks like:

CODE:...............

View 2 Replies View Related

Android :: Protected Blocks On Home Screens

Jun 17, 2010

I have an HTC Incredible and I noticed what appears to be protected blocks on one of the home screens. The home screen has only a couple of programs on it that take up 1 block. When I tried to move the location of one of the programs, I noticed there is a 1x2 vertical strip that is blank that is just to the top right of center that won't allow me to place anything. There is no reason why I shouldn't since there is plenty of room on the screen. Could there possibly be something hidden there? All i see is the background and touching that region does nothing.

View 1 Replies View Related

Android :: CheckBox Blocks ExpandableListView.OnGroupClic­kListener

Nov 5, 2009

I'm trying to put a checkbox into ExpandableListView. I noticed that doing that disables basic functionality of displaying child list when group row is clicked. Furthermore when I click outside of checkbox the click is detected by nether checkbox nor by OnGroupClickListener. Can someone help me to resolve this? The CheckBox works fine though including detecting clicks when clicking directly on the box.

View 2 Replies View Related

Android :: Activity Blocks Till Service Completes

Oct 10, 2009

I am starting a service from an activity. Once the services starts, the calling activity loses focus and blocks till the service is completed. Why is this and is there a way around it to return the control to the calling activity while the service runs in the background?

View 6 Replies View Related

Android :: Youtube Blocks So Many Videos From Being Viewed On Mobile?

Aug 18, 2010

why is it that youtube blocks so many videos from being viewed on mobile? does not compute. is this at google's discretion, or carriers?

View 4 Replies View Related

Android :: SSL Socket Blocks On Read While Changing Connection / Is It A Bug?

Feb 19, 2010

I assume that when I do a read on the inputstream, it blocks until it gets more data to read.
I also assume that when the connection is closed, the read throws an IOException.

The problem is that sometimes when I change the connection from carrier to WiFi or from WiFi to carrier, the read just gets stuck and never throws the IOException.

The SDK is 1.5 and the phone a HTC Hero.

This behavior is quite ugly for me because I need to stay always connected.
Does someone else have ever seen this problem ? Is it a bug or am I the bug?

View 2 Replies View Related

Android : Scrolling Down In App Inventor Blocks Editor Window

Aug 29, 2010

How can you scroll down in the Blocks Editor window?It lets me scroll down a little, but not to the end of my (lengthy) code.

View 1 Replies View Related

Games :: Blocks

Nov 4, 2010

Blocks is an original logic game. Your aim is collecting all rubies. It's very hard, but you should try it!

trial version
Blocks trial ~ Android Game v1.0 By rewqgame | Brain & Puzzle

full version
Blocks ~ Android Game v1.0 By rewqgame | Brain & Puzzle

View 5 Replies View Related

HTC EVO 4G :: Skype Blocks Fring

Jul 12, 2010

Skype Blocks Fring ? Or Not? Fingerpointing... But Where is Skype for Android? So what will we use now for video calling on our Evo's ?

View 3 Replies View Related

KitKat 4.4 :: App That Really Blocks SMS Text?

May 23, 2014

Is there an app that really blocks SMS text from blacklisted numbers? Avast is working on their software, since Google broke text blocking with KitKat. But any already released software that really works with KitKat? (I used the Nexus 5 SMS app on my Nexus 7 in order to restore SMS, but along with good text is a lot of spam. Go SMS Pro does not work for me, it will only save drafts, not send or block.)

View 3 Replies View Related

Android :: How To Tell Device Is Sleeping?

Nov 24, 2010

Here's my scenario. I have an app that is playing backgound sounds. Using the BroadcastReceiver I can tell when the display turns off, and then kill the sounds. I can also tell if the screen turns back on. However, if the device is in the lock state I don't want the audio to start. Therefore I wait for the ACTION_USER_PRESENT intent to signal. That all works, except that if the user turns the screen back on quickly after it was turned off, you don't get the lock screen or the ACTION_USER_PRESENT message. So, is there a way to tell, when the screen turns back on, if the device is locked or not, which I guess also means sleeping or not?

View 1 Replies View Related

Android :: How To Prevent Sleeping

Sep 5, 2010

I 'm working with GPS in my application. When phone go to sleep, the GPS's data don't update. I want to stay phone screen wake up until my app will be close. How can I prevent sleeping in Android?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved