How to detect whether the virtual keyboard is visible or not? SDK 1.5

by Dianne Hackborn » Wed, 29 Apr 2009 12:28:44 GMT


Sponsored Links
 There is no way to discover this, except for indirectly as your UI is
resized to accommodate the IME.






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. easy way to synchronize data between phone and server

Just store offline data in builtin sqllite database.And have a simple Ui to
activate synchronization through a web service.

Rgds,
Isuru





--~--~---------~--~----~------------~-------~--~----~

2. Gears' geolocation.watchPosition does not work as advertised?

I'm trying to use Gears' geolocation support on Android 1.5 but am
running into some issues.  The call I'm trying to use is documented
here:

http://code.google.com/apis/gears/api_geolocation.html#watchPosition

On my G1 dev phone I'm seeing two big problems:

1. The operation does not appear to accept any PositionOptions (http://
code.google.com/apis/gears/api_geolocation.html#positionoptions) such
as "enableHighAccuracy".  If I add any options to the call, it fires
the error callback.  For example:

  var geolocation = google.gears.factory.create('beta.geolocation');
  geolocation.watchPosition(showMap, handleError, {enableHighAccuracy:
true, maximumAge: 0});

This code will cause handleError() to be fired.  If I remove the
options from the end, it runs.  Note that, strangely, this exact
syntax works fine for geolocation.getCurrentPosition.

2. The operation does not appear to loop indefinitely as described.
It is supposed to run until terminated, constantly updating the GPS
coordinates.  Using a counter I can see that it only fires once.  For
example:

  var geolocation = google.gears.factory.create('beta.geolocation');
  watch = geolocation.watchPosition(showMap, handleError);

  function showMap(position) {
      alert("it ran");
      // other code to eventually terminate via: geolocation.clearWatch
(watch)
  }

All of this works as expected on the iPhone (using the HTML5-standard
equivalent operations, which are virtually identical).  But Android
does not appear to be behaving how the Gears docs suggest it should
be.

Anyone have any ideas here?  Are these known bugs in cupcake?  I'm
stumped.

Thanks!
--Stephen

--~--~---------~--~----~------------~-------~--~----~

3. How to get SMS message ID

4. MediaPlayer playback is interrupted by user interface interaction

5. Disabling the Camera Flash

6. How to capture any screen? (when your view is greater than screen size)

7. no activity in project