2

Currently our app is two branches (two different binaries) one is for touch device (compiled with JDE 4.7), the other is for non-touch device (compiled with JDE 4.6). These two versions are the same except some UI rendering and interactions for touch devices only.

I am trying to combine these 2 into one single binary, and compile with JDE 5.0 so that it can run on OS 5.0/6.0/7.0 and 7.1, for both touch and non-touch devices. My question is how do I handle those difference behaviors between touch and non-touch devices in one single binary? Thanks!

androidkc
  • 689
  • 2
  • 7
  • 16
  • So, is the minimum OS you need to support 5.0, or 4.6? Also, [see this similar question](http://stackoverflow.com/q/10766755/119114). Also, remember to vote for, and/or accept answers that help you. Thanks! – Nate Feb 26 '13 at 22:45
  • @Nate, thanks for your reply. min OS is 5.0. – androidkc Feb 26 '13 at 23:54
  • 4
    Then, I'd recommend following the advice in the two answers to the question I linked to. Override `touchEvent()` if you need to. That call just won't ever be invoked on non-touch devices. If you have other places with specific logic for touch vs. non-touch devices, use `TouchScreen.isSupported()` to detect that. So, no pre-processor directives should be needed. – Nate Feb 27 '13 at 02:21

0 Answers0