<div dir="ltr"><div>So according to the Swift Community I should adapt Kotlin and not Swift as my choice for the programming language for a  cross-platform GUI framework? Is that really going to be easier than building a GUI framework for Android as listed on this page?</div><div><a href="https://github.com/apple/swift/blob/master/docs/Android.md">https://github.com/apple/swift/blob/master/docs/Android.md</a></div><div><br></div><div>The main technical issues I can think of when building Android Java API Access is the following:</div><div>a) You can only call static Java methods from the NDK Main Thread in Android</div><div>b) If I go the Android NDK(C/C++) approach, it provides access to the C++ API of Android but not the Java API of Android. It bootstraps differently in that you have access to a NativeActivity class but a lot of Java Android is deriving from an Activity and adding your overrides. I wonder if that possible doing that with JNI</div><div>c) You would not have access to the XML way of declaring an Android GUI but will have to do everything in code (I have experience in this in Android). This is not a problem just extra work</div><div>d) Since the Java API of Android bootstraps differently you would need to add libraries to your module maps in Swift so you can bootstrap the Java VM literally in Android so you have access to the Java Environment via Java Native Interface.</div><div><br></div><div>Anyone else think of how to call Java API from Swift? I was thinking  a bootstrap Java Android skeleton app, which receives an API via a 64 bit encoded number. The number is converted into a string and passed into a switch statement where the correct API call is made.</div><div>Any fresh ideas?</div><div>Sincerely yours,</div><div>Tony Constantinides</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 17, 2016 at 9:34 AM, Jens Alfke <span dir="ltr">&lt;<a href="mailto:jens@mooseyard.com" target="_blank">jens@mooseyard.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span><br><div><blockquote type="cite"><div>On Oct 16, 2016, at 1:35 PM, Tony Constantinides via swift-users &lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt; wrote:</div><br class="m_506378868617610708Apple-interchange-newline"><div><span style="font-family:Alegreya-Regular;font-size:15px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Kotlin does not run on iOS without some custom VM (Robot VM) which would kill performance.</span></div></blockquote></div><br></span><div>If you mean RoboVM, it claims to use ahead-of-time compilation of Java to native code, so there shouldn’t be much of a performance penalty. (Definitely a <i>size</i> penalty, though!) However, RoboVM appears to have been discontinued.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>—Jens</div></font></span></div></blockquote></div><br></div>