tags:

views:

15

answers:

1

I'm having trouble getting my app to work properly on older devices.

I've ready the "Backward Compatibility" tutorial, I'm working for performance - and it suggestions using .invoke is considerably slower than using a wrapper class.

But it seems the wrapper class only works for if a class is not available on older devices.

I'm compiling with 2.2, but minSDK is 1.5

I'm working with multitouch, I assumed that if I checked against Build.Version.SDK, and didn't call getPointerCount() - then it wouldn't raise an error.

But when I create an instance of the class which has my methods in, I get this:

06-29 08:17:28.263: ERROR/dalvikvm(255): Could not find method android.view.MotionEvent.getPointerCount, referenced from method com.myPackage.myClass

Despite not actually calling it. Is this normal?

How do I get around this?

A: 

Sorted it, using a wrapper class - but in a different way.

Was attempting to not create new objects on every touch event, I have one wrapper class and pass MotionEvent to that each time. Doesn't remove anything noticeable to frame rate

Sticky