Hi, you are correct that there is no method to retrieve this, and the state is actually very complicated because it depends on what a particular IME wants to do. And the asynchronous/oneway calls are very carefully done the way they are do avoid deadlocks and other such things, so anything that modifies the behavior of one of these APIs is most likely something we don't want to do.
On Wed, Jul 29, 2009 at 4:35 PM, Zeigler, Steve <[email protected] > wrote: > It looks to me like there is no way to tell if the soft input method is > displaying at any given time. I'd like to know both in my app and when I'm > testing my app. The state can be a simple string: "null", "open", > "fullscreen", "requested", "disappearing". A String value lets future or > different InputMethods provide their own state. In this case I need to know > if the InputMethod is in the process of appearing - this animation is > special and causes my app to pan, so I need "requested" to say "it will > appear soon" and "disappearing" to say "it will soon be gone". > > It seems like a sensible approach is to include a "String > getSoftInputState()" in the IInputMethodSession interface. The > InputMethodSession is intended to provide safe access for apps. But the > IInputMethodSession.aidl has a "oneway interface", which I understand to > mean that it is not expecting any results to be returned for the interface; > of course I'd like to get a value back. I can move the general "oneway" > onto the other methods and leave my new getSoftInputState to return a value. > > But the current implementer of IInputMethodSession is > IInputMethodSessionWrapper, which calls: > mCaller.executeOrSendMessage(...) > I don't see an example of where a return value is passed back. Normally > this would mean setting up a receiver thread or wait-lock to wait for a > return message. But in this case I'm only asking for a simple status so > technically I wouldn't need to sync - I can just grab the current status, > following the isInputViewShown() model. > > My questions are: > > 1) Is this something that others agree should be in Android? > 2) Is the right implementation to go through IInputMethodSession? > 3) Is there a standard way to pass back results such as my string value, > given the asynch HandlerCallback interface? > > thanks very much for your help. > > Steve Zeigler > Wind River - Intel > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
