Multitouch API question

by Rafa艂 Grzybowski » Sat, 01 May 2010 18:37:34 GMT


Sponsored Links
 I'm trying to detect fingers location on the screen within
onTouchListener. The location looks fine when only one finger is "on
touch". Touching with the other one causes somehow my first finger
location to be corrupted, shifted by some value. Below is an example
of the location log ([x, y]):

05-01 12:26:47.410: VERBOSE/TouchTest(8204): [58, 66]
05-01 12:26:47.960: VERBOSE/TouchTest(8204): [58, 67]
05-01 12:26:48.061: VERBOSE/TouchTest(8204): [58, 68]
05-01 12:26:48.070: VERBOSE/TouchTest(8204): [58, 69]
05-01 12:26:48.090: VERBOSE/TouchTest(8204): [58, 72] [392, 72]
05-01 12:26:48.100: VERBOSE/TouchTest(8204): [58, 73] [391, 74]
05-01 12:26:48.110: VERBOSE/TouchTest(8204): [58, 74] [391, 75]
05-01 12:26:48.121: VERBOSE/TouchTest(8204): [58, 75] [391, 76]
05-01 12:26:48.143: VERBOSE/TouchTest(8204): [58, 76] [391, 77]
05-01 12:26:48.170: VERBOSE/TouchTest(8204): [58, 77] [392, 78]
05-01 12:26:48.190: VERBOSE/TouchTest(8204): [58, 78] [392, 79]
05-01 12:26:48.230: VERBOSE/TouchTest(8204): [58, 79] [392, 80]
05-01 12:26:48.260: VERBOSE/TouchTest(8204): [58, 80] [392, 81]
05-01 12:26:48.320: VERBOSE/TouchTest(8204): [58, 81] [392, 82]
05-01 12:26:48.410: VERBOSE/TouchTest(8204): [58, 82] [393, 82]
05-01 12:26:48.510: VERBOSE/TouchTest(8204): [58, 82] [393, 81]
05-01 12:26:48.520: VERBOSE/TouchTest(8204): [58, 82] [393, 78]
05-01 12:26:48.531: VERBOSE/TouchTest(8204): [58, 77] [394, 73]
05-01 12:26:48.550: VERBOSE/TouchTest(8204): [58, 69] [394, 73]
05-01 12:26:48.570: VERBOSE/TouchTest(8204): [58, 68]
05-01 12:26:48.592: VERBOSE/TouchTest(8204): [58, 67]
05-01 12:26:48.730: VERBOSE/TouchTest(8204): [58, 66]
05-01 12:26:49.580: VERBOSE/TouchTest(8204): [58, 67]
05-01 12:26:49.640: VERBOSE/TouchTest(8204): [58, 68]

The code that creates the log above is:

StringBuilder message = new StringBuilder();

for (int i = 0; i < event.getPointerCount(); i++) {
  float viewX = event.getX(i);
  float viewY = event.getY(i);

  if (i != 0)
    message.append (' ');

  message.append ('[');
  message.append((int)viewX);
  message.append (", ");
  message.append((int)viewY);
  message.append (']');
}

Log.v (
  "TouchTest",
  message.toString());

And I'm having problems with creating a view to control some car.
There are four areas on the image to choose left/right/forward/
backward and when only one area is touched it works great. Touching
another one causes misplaced X,Y coordinates for both of it. When I
release the first area suddenly second area is detected as being
touched. I've created dummy event.getXY(...) log to show that the
problem arises from MotionEvent data (or my understanding of it
contents) not area hit detection.

Thank you.

--



Multitouch API question

by Yahel » Sat, 01 May 2010 20:12:58 GMT


 Hi,

You should try to search the group for "multitouch broken" and you'll
find three or four threads around the fact that on Android, multitouch
is unusable.

Seems to be because of the cheap hardware used in htc and motorola
phones, not the Android SDK.

Good luck.

Yahel

--


Sponsored Links


Multitouch API question

by Rafa艂 Grzybowski » Tue, 04 May 2010 03:04:08 GMT


 Thank you.



>



Multitouch API question

by Robert Green » Tue, 04 May 2010 04:15:33 GMT


 FYI - Multitouch is not unusable.  It just has limitations you should
be aware of.  The new phones (Incredible and Evo) are much better with
it.  If you want to see a working multitouch example used in a game, I
just launched a game called Antigen the other day.  If you are running
2.0+, you'll get two buttons on the right side of the screen.  You can
tap them while holding down the joystick on the left.  It all works, I
just had to position them funny to keep from having the near-axis
issues on the synaptics screen.




> >



Other Threads

1. How to get thumbnails from the video frames of the particular time

Is there any way to get several thumbnails from a video?
Assume that
 - The video file is stored on the device
 - The total playback time is 1min.
At this time, is it possible to get thumbnails from video every 20
secs?
(Need to get 4 thumbnails, for the first frame, 20secs, 40secs,
60secs)

captureFrame() of MediaMetadataRetriever looks like capturing only the
first frame.

-- 

2. Android Development Service: Mobile Application CM

I am an Android and iPhone developer myself and frequently had to
include some dynamically loaded content into different apps. Content
like a tip of the day, store locations of a retail chain,{*filter*}tail
recipes etc.

I think this is always way too much effort. I either have to create a
small web application with a database myself to manage and serve the
content in JSON or XML or configure a large open source CMS to do this
(which is a pain). And I have to host and maintain those systems,
which costs time and money.

My hosted solution is cheaper, flexible and allows developers to
configure many different data sets. Your own editors can manage the
content for these data sets and you can then easily load that content
into your mobile apps with JSON (with search and advanced queries).
You could also load the JSON into your website with JSONP or into a
desktop app, but this is currently not the focus.

Basically a CMS for non-HTML applications. I already developed a
prototype and a landing page for this service. Before I continue with
further development I would love to get some feedback from fellow
developers.

What do you think of this idea? Would you use it? I am looking forward
to your comments. Thanks.

 http://www.***.com/ 

-- 

3. Bluetooth Problem

4. Is it possible to use Window Media Service to Streaming Video on demand to Android?

5. How to XOR pixel values with Canvas

6. Enhancing text input for all apps

7. youtube player app