I was wondering about it today myself.
This thread from two years ago suggests its problematic.
There's a couple of serious suggestions here...
http://stackoverflow.com/questions/29665435/how-to-get-the-height-of-android-keyboard
Paul
I found numerous solutions. All java.
Will add to the 'things we want' list.
Makes me wonder for needed Android system things like this (in development phase) whether sufficient hooks could be placed in the underlying Java code of DS to make it possible to run trial JavaCode with a generic exposed "trial" JS object, that can all execute live, so that Java code can be trialed and then submitted to Dave and Chris?
Sort of like a super eval() for Java Code pushed through from JS, and tested on the proposed JS "app.trial." interface?
If you mean Java byte code, it is possible to call functions from a .jar using the plugins SDK.
https://groups.google.com/forum/m/#!topic/androidscript/ysjOLDdjUvw
That, I think is the way this sort of thing needs to go.
Unfortunately, I find the SDK impossible to use because it is designed to work with Eclipse and not with Android Studio and I can no longer set up the Eclipse Android setup from scratch.
I am hoping for some advice soon on an alternative way to create plugins using neither of the big PC based systems.
I posted the java needed for a getKeyboardHeight in the beta group. Hope it is incorporated, this is a very needed method.
"You can't call Java classes directly from DroidScript because we do not wrap the Java SDK with a 1:1 mapping, it is more like a 1:10 mapping...so that you guys can do ten times less coding to get your Apps up and running. (It might be worth us looking into exposing the reflection API though :) "
( https://docs.oracle.com/javase/tutorial/reflect/ )
<- that's what I was thinking, but to be effective it would involve going above the 1:10 mapping with latent code redundancy and so bloat when I think about it (my reference to hooks) and indeed it's obviously far too much work for Dave and co. compared to people just writing plugins - agreed.
Maybe a series of plugins which expose JS objects as libraries with methods and properties for generic areas of need like the FTP plugin had just done? Encouraging people to generalise as much as possible when developing new areas of functionality - helping to develope a series of "system" core library plugins, before specialising to their own specific project's purposes?
Is there anyway a need for a clearer naming convention for the JS side of plugins to avoid potential collisions if more than one plugin is to be loaded?
Are you part of the beta group?