Re: [android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-27 Thread SoftwareForMe.com SoftwareForMe.com
@Dianne,

We're using the Android API in a way completely consistent with the
documentation. If device OEM's decide not to implement some of the API, we
will have to make adjustments, as described in my post above.

I think concerns over fragmentation are more about devices with proprietary,
non-standard APIs, and not so much with OEMs choosing not to implement some
of the API. Eventually, the parts of the API that have been ignored by OEMs
will have to be deprecated, or updated with comments like "Not Supported on
Samsung Devices," or "Returns a constant value on Motorola devices," or
something like that.

In any case, no type of fragmentation would occur if everybody stuck to the
published API.

Finally, it is our hope that the number of pre-2.0 devices released will
start to drop, and the number of 2.0+ devices will increase, such that we
won't have to be making adjustments for long :-)

Scott
SoftwareForMe.com

On Wed, Jan 27, 2010 at 10:21 AM, Dianne Hackborn wrote:

> On Wed, Jan 27, 2010 at 9:31 AM, SoftwareForMe.com SoftwareForMe.com <
> softwareforme@gmail.com> wrote:
>
>> The issue in this thread was that it is possible to simulate it on all but
>> one [known] Android device from 1.0 though 1.6. As I said above, our
>> software uses a different code path on 2.0 and later devices, so there are
>> no ill side effects when placed on new devices.
>>
>
> Wow.  Okay, all I have to say is this: please do not be one of the people
> who complains about fragmentation, and please provide HUGE CAVEATS to
> -anyone- who is giving any thought to using your code.  You are entirely
> relying on certain behavior, of a certain vendor's certain screen, that will
> not happen on most other screens.  You can guarantee that this code will not
> work or work poorly or various devices as they ship.
>
> It's a clever trick for the cases where it works, but relies on highly
> variable behavior between devices.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-27 Thread Dianne Hackborn
On Wed, Jan 27, 2010 at 9:31 AM, SoftwareForMe.com SoftwareForMe.com <
softwareforme@gmail.com> wrote:

> The issue in this thread was that it is possible to simulate it on all but
> one [known] Android device from 1.0 though 1.6. As I said above, our
> software uses a different code path on 2.0 and later devices, so there are
> no ill side effects when placed on new devices.
>

Wow.  Okay, all I have to say is this: please do not be one of the people
who complains about fragmentation, and please provide HUGE CAVEATS to
-anyone- who is giving any thought to using your code.  You are entirely
relying on certain behavior, of a certain vendor's certain screen, that will
not happen on most other screens.  You can guarantee that this code will not
work or work poorly or various devices as they ship.

It's a clever trick for the cases where it works, but relies on highly
variable behavior between devices.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-27 Thread SoftwareForMe.com SoftwareForMe.com
I'm not clear what you mean by:


>
>  I am not going down the path
> to try to figure out how an app that implements pinch-and-zoom on the
> app level will fare when same functionality is also implemented on the
> platform level. Could work out of the box, could be ugly.
>
>
I mean, Multi-touch is fully implemented and available in the platform since
2.0. Google's applications (browser, gallery, maps) don't use it, but any
other applications wishing to use it can do so.

The issue in this thread was that it is possible to simulate it on all but
one [known] Android device from 1.0 though 1.6. As I said above, our
software uses a different code path on 2.0 and later devices, so there are
no ill side effects when placed on new devices.

Scott
SoftwareForMe.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-27 Thread JP


On Jan 27, 8:14 am, "SoftwareForMe.com SoftwareForMe.com"
 wrote:
> Hi,
>
> Sorry that I missed the continuation of this thread, and only noticed it now
> as I got a Google Alert for our app name.
>
> @Dianne, that's not quite true (that all MT data is lost). The coordinates
> of the additional points are removed from the event data, but the size and
> pressure values change predictably as additional fingers are added.

Yeah, I remember having seen proof-of-concepts prior to 2.0
But back to the original question. I would highly welcome pinch-and-
zoom, supported on the platform level, across apps Wait, it *is*
supported, at least somewhat, assuming you get a Milestone.
>From an engineering perspective, the sensible thing appears to be to
wait until pinch-and-zoom is supported on the platform level, across
the entire user interface of the phone, East and West. Lacking a
Milestone to test this, and motivation, I am not going down the path
to try to figure out how an app that implements pinch-and-zoom on the
app level will fare when same functionality is also implemented on the
platform level. Could work out of the box, could be ugly.
JP

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-27 Thread SoftwareForMe.com SoftwareForMe.com
Hi,

Sorry that I missed the continuation of this thread, and only noticed it now
as I got a Google Alert for our app name.

@Dianne, that's not quite true (that all MT data is lost). The coordinates
of the additional points are removed from the event data, but the size and
pressure values change predictably as additional fingers are added.

We have been swamped with work on our products and have not published the
solution. But, in a nut shell, our solution is a "simulated" multi-touch
that lets you zoom easily using either pinch/stretch or "paw" gestures. If
you're curious how well it works, download PhoneMyPC or Imagine Multi-touch
and give it a try.

Here's how it works:

* When an additional finger touches the screen, the size and pressure
([MotionEvent].getSize() and [MotionEvent].getPressure()) change in fairly
predictable ways.
* When that change is detected, track the one point (x,y) that you get to
determine whether it's moving towards, or away from the center of screen.
* If it's moving towards, zoom in. If it's moving away, zoom out.

Some things to consider are:

1) HTC devices work best when both pressure and size are used
2) On Samsung devices, size is always zero, but pressure changes predictably
3) The Motorola Cliq is the only phone we've found on which this will not
work. Both size and pressure are constant.

Both values can be a bit neurotic and require some denouncing, but if you
try the software, you'll see this method works well enough to give a good
user experience.

And, in the interest of time, here are some more details copied from an
email I recently sent someone who asked about this:


First, we no longer override onTouchEvent because it's simpler to provide
support for all API versions using view.setOnTouchListener(...). We use one
OnTouchListener implementer for pre-2.0 devices, and a different one for
2.0+ devices. Determine this with (Integer.parseInt(
android.os.Build.VERSION.SDK )). This value is >4 for 2.0+ devices.

Next, in our implementation for < 2.0 devices, we grab three important
values:

float size = event.getSize();
float pressure = event.getPressure();
float total = size * pressure;

We use the total to help us detect the device type.

In our code for handling events when the action is MotionEvent.ACTION_MOVE,
we're always watching to see if the values indicate we should switch to zoom
mode (an extra finger down). Note, we never worry about this when action is
ACTION_DOWN, because you just can't get two fingers on the screen at the
same time, and even if you could, we'd pick it up int he fist ACTION_MOVE.
We check as follows:

if( (total > .1f) || (size == 0f && pressure < .15f ) ) { ...

The first subexpression indicates a non-Samsung device, and that a second
finger is down. The second subexpression is for Samsung, where size is
always 0, and pressure will drop below .15 when a second finger goes down.

Note, there is something wrong with this approach because we've now got two
reports (out of many thousand users) that they are unable to pan. One is
using a G1 (this MUST be a strange device calibration issue, because I
personally have ran this code on MANY G1's); one is a Cliq. Ironically now
that we've added support for Samsung, they are the only users with zero
reports of issues (and of course Droid and Nexus One users don't count
because they are using different code that supports true multi-touch).


Warm regards,
Scott
SoftwareForMe.com

On Thu, Jan 7, 2010 at 10:49 AM, theSmith  wrote:

> Scott,
>
> Please publish your code, I would love to take a look at it :-)
>
> -theSmith
>
> On Jan 7, 12:48 pm, Dan Sherman  wrote:
> > I'd love to see this as well :)
> >
> > On Thu, Jan 7, 2010 at 9:30 AM, Dianne Hackborn 
> wrote:
> > > Well I would really like to see this, given that prior to 2.0 there was
> no
> > > multitouch information propagated through the framework at all, and
> > > applications do not have permission to open the raw driver.
> >
> > > On Thu, Nov 12, 2009 at 11:03 PM, SoftwareForMe.com SoftwareForMe.com <
> > > softwareforme@gmail.com> wrote:
> >
> > >> Our solution is software only, works on production phones (i.e., no
> > >> rooting or modding required).
> >
> > >> Scott
> > >> SoftwareForMe.com
> > >> Makers of PhoneMyPC
> >
> > >>  On Thu, Nov 12, 2009 at 11:02 PM, Nathan  >wrote:
> >
> > >>> I'm curious about this. Does multi-touch require hardware changes? Or
> > >>> am I reading this right that it can all be done through software?
> >
> > >>> Nathan
> >
> > >>> --
> > >>> You received this message because you are subscribed to the Google
> > >>> Groups "Android Developers" group.
> > >>> To post to this group, send email to
> android-developers@googlegroups.com
> > >>> To unsubscribe from this group, send email to
> > >>> android-developers+unsubscr...@googlegroups.com
> 
> >
> > >>> For more options, visit this group at
> > >>>http://groups.google.com/group/android-developers?hl=en
> >
> > >> --
> > >> Warm regard

[android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-07 Thread theSmith
Scott,

Please publish your code, I would love to take a look at it :-)

-theSmith

On Jan 7, 12:48 pm, Dan Sherman  wrote:
> I'd love to see this as well :)
>
> On Thu, Jan 7, 2010 at 9:30 AM, Dianne Hackborn  wrote:
> > Well I would really like to see this, given that prior to 2.0 there was no
> > multitouch information propagated through the framework at all, and
> > applications do not have permission to open the raw driver.
>
> > On Thu, Nov 12, 2009 at 11:03 PM, SoftwareForMe.com SoftwareForMe.com <
> > softwareforme@gmail.com> wrote:
>
> >> Our solution is software only, works on production phones (i.e., no
> >> rooting or modding required).
>
> >> Scott
> >> SoftwareForMe.com
> >> Makers of PhoneMyPC
>
> >>  On Thu, Nov 12, 2009 at 11:02 PM, Nathan wrote:
>
> >>> I'm curious about this. Does multi-touch require hardware changes? Or
> >>> am I reading this right that it can all be done through software?
>
> >>> Nathan
>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> To post to this group, send email to android-developers@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> android-developers+unsubscr...@googlegroups.com
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/android-developers?hl=en
>
> >> --
> >> Warm regards,
> >> The PhoneMyPC Team
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-07 Thread Dan Sherman
I'd love to see this as well :)


On Thu, Jan 7, 2010 at 9:30 AM, Dianne Hackborn  wrote:

> Well I would really like to see this, given that prior to 2.0 there was no
> multitouch information propagated through the framework at all, and
> applications do not have permission to open the raw driver.
>
>
> On Thu, Nov 12, 2009 at 11:03 PM, SoftwareForMe.com SoftwareForMe.com <
> softwareforme@gmail.com> wrote:
>
>> Our solution is software only, works on production phones (i.e., no
>> rooting or modding required).
>>
>> Scott
>> SoftwareForMe.com
>> Makers of PhoneMyPC
>>
>>
>>  On Thu, Nov 12, 2009 at 11:02 PM, Nathan wrote:
>>
>>> I'm curious about this. Does multi-touch require hardware changes? Or
>>> am I reading this right that it can all be done through software?
>>>
>>> Nathan
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>>
>> --
>> Warm regards,
>> The PhoneMyPC Team
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-07 Thread Dianne Hackborn
Well I would really like to see this, given that prior to 2.0 there was no
multitouch information propagated through the framework at all, and
applications do not have permission to open the raw driver.

On Thu, Nov 12, 2009 at 11:03 PM, SoftwareForMe.com SoftwareForMe.com <
softwareforme@gmail.com> wrote:

> Our solution is software only, works on production phones (i.e., no rooting
> or modding required).
>
> Scott
> SoftwareForMe.com
> Makers of PhoneMyPC
>
>
> On Thu, Nov 12, 2009 at 11:02 PM, Nathan wrote:
>
>> I'm curious about this. Does multi-touch require hardware changes? Or
>> am I reading this right that it can all be done through software?
>>
>> Nathan
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> Warm regards,
> The PhoneMyPC Team
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-07 Thread Nathan
Have you published it?

Nathan
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Who wants Multi-touch in all Android versions?

2009-11-13 Thread Fred Grott(Android Expert, http://mobilebytes.wordpress.com)
Yes, you should publish your technique

Fred Grott
Android Developer
http://mobilebytes.wordpress.com


On Nov 13, 12:53 am, "SoftwareForMe.com" 
wrote:
> Our team developed a fairly robust multi-touch implementation for PhoneMyPC
> that has worked since Android 1.0. Our code still uses it on pre- 2.0
> phones, but of course we use the 2.0 multi-touch API on the Droid.
>
> I've been stunned that no other apps (that I know of) have supported
> multi-touch (in pre- 2.0 Android), and I'm curious if the community at large
> might like our implementation. We've been considering publishing the
> technique on our website. Although pre- 2.0 Android devices will dwindle
> now, they still represent a vast majority of current devices.
>
> If you're curious how well it works, download PhoneMyPC to your pre- 2.0
> phone and give it a try. It's usable in the *Snapshot*, *View Live*,
> and *Interact
> Live* features.
>
> --
> Warm regards,
> Scott,
> SoftwareForMe.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Who wants Multi-touch in all Android versions?

2009-11-12 Thread SoftwareForMe.com SoftwareForMe.com
Our solution is software only, works on production phones (i.e., no rooting
or modding required).

Scott
SoftwareForMe.com
Makers of PhoneMyPC

On Thu, Nov 12, 2009 at 11:02 PM, Nathan  wrote:

> I'm curious about this. Does multi-touch require hardware changes? Or
> am I reading this right that it can all be done through software?
>
> Nathan
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Warm regards,
The PhoneMyPC Team

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Who wants Multi-touch in all Android versions?

2009-11-12 Thread Nathan
I'm curious about this. Does multi-touch require hardware changes? Or
am I reading this right that it can all be done through software?

Nathan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en