title: Crossplatform iPhone / Android code sharing
body: <p>Simply put: What is the most effective way to share / reuse code between iPhone and Android builds?</p>
  
  <p>The two most common scenarios I think would be:</p>
  
  <ol>
  <li>Blank slate new project, knowing ahead of time there is a large chunk of reusable logic that needs to run on each device.</li>
  <li>Existing iPhone code base, porting of C, C++ and Objective-C to the <a href="http://developer.android.com/sdk/ndk/1.6_r1/index.html" rel="noreferrer">Android NDK</a> or otherwise.</li>
  </ol>
  
  <p>Yes of course in a perfect world all apps would just plug into the magical cloud and all the reusable logic would be up in Google App Engine or some web services, but that is not the spirit of this question.  After experiencing a port of iPhone to Android with no code reuse at all second-hand and seeing the pain that person had to endure, I'd like to know how other people are avoiding it.</p>