part-cw / lambdanative

LambdaNative is a cross-platform development environment written in Scheme, supporting Android, iOS, BlackBerry 10, OS X, Linux, Windows, OpenBSD, NetBSD, FreeBSD and OpenWrt.
http://www.lambdanative.org
Other
1.4k stars 86 forks source link

how to use the system default keyboard #47

Closed pkvov closed 8 years ago

pkvov commented 9 years ago

Android and IOS has their own keyboard to input non English characters, such as Chinese and Arabic. It is very important to let the user use the Input method that they installed (Android platform)

mgorges commented 9 years ago

Hi @pkvov, sorry but native keyboard support is currently not supported on any mobile platform. - We wanted the system to use the same widgets throughout. If you have suggestions on how to best implement the integration (maybe as a separate module) this I would welcome this!

Thanks Matthias

jkordani commented 9 years ago

I've always wondered what it would take to get this in android at least.

clpetersen commented 9 years ago

Just a few notes to follow up on this topic: Please note that key design choice behind lambdanative is portability. That's why the individual platform loaders are minimal, and we have a common visual framework that looks/runs/feels the same on all platforms. The advantage is that the same code base works on all platforms, and the disadvantage is that you do not have access to native widgets.

In many cases you can work around the widget limitations. We have successfully deployed applications in quite diverse languages, such as Kannada, Sindhi and Portuguese. However, if you are looking to develop a fullblown unicode iOS/Android text editor for example, then lambdanative is probably not the right tool for the job.

In any case, it should be possible to add native keyboard support. On Android my understanding is that it would require extending the loader to have an invisible edittext field. A resultreceiver can then collect the key presses and send them on to scheme in the usual way. As @mgorges noted, we would welcome an implementation in the form of a pull request, as long as it does not break current functionality.

pkvov commented 9 years ago

is there a plugin system like Apache Cordova, to allow people access the native widgets or apis

mgorges commented 9 years ago

The native APIs are available through JNI for Android, and potentially Objective-C for iOS. An example of these binding usage can be found in the serial or gps module source code. There currently is no native widget support but we would welcome support/contributions in this respect.

mgorges commented 8 years ago

My initial attempt at this can be found in 70f8ff4. Please expand as needed and reopen when you have a pull request with enhancements.