Desktop API of Gears API does not work on Android browser for 1.5

by versae » Thu, 30 Apr 2009 02:05:58 GMT

Sponsored Links
 Since Android 1.5 (API Level 3), if I use the Desktop API of Gears API
in the Android browser, the Javascript flow breaks.

    <script type="text/javascript" src=" 
    <script type="text/javascript">
    alert("This alert works fine");

    var desktop = google.gears.factory.create('beta.desktop');

    alert("This alert is never shown");

No problems with any other API such as Geolocation API or Database

Really I don't know if this issue belongs to Android or Google Gears,
but in previously versions of Android Desktop API worked fine.



Other Threads

1. IllegalMonitorStateException on 'object.wait()' call randomly

My code throws an IllegalMonitorStateException on 'object.wait()'
call, even though wait is invoked inside a synchronized block. And
this exception occurs only randomly not always.

below is my code snippet:

while (!mFinish) {
          synchronized (mResponse) {
                    if (!mResponse.isEmpty()) {
                           do something
                    } else {
                        try {
                        } catch (InterruptedException ie) {


Also all the 'notify' methods are in synchronized block.
Please point out if there is anything wrong in my code?


2. What happens with the registered broadcast receivers after the application is killed?

Hi guys,
I want to optimize the CPU usage in my application.

Currently my application is configured to always receive the
CONNECTIVITY_CHANGED action to force an update if the previous update
failed because there was no connectivity.
What I don't like about this is that the broadcast receiver gets to be
called too many times although it is not needed.

I was thinking to register my broadcast receiver only if an update
failed using the Context.registerReceiver(BroadcastReceiver receiver,
IntentFilter filter) method. But I'm not so sure if this is a good

I'm concerned that if my application is evicted from memory the
broadcast receiver will be unregistered or lost and my application
will not be notified about the future CONNECTIVITY_CHANGED actions.

The update is done in a short lived service. So if the update fails,
the service will register the broadcast receiver just before it ends
its execution time.

Can somebody explain what happens to my broadcast receiver after the
application is evicted from memory?



3. How to import music into Android library

4. geo fix in emulator - strange pattern in gps fix timestamps

5. Android device VID/PIDs

6. Allow only decimal numeric input and use phone soft keyboard?

7. extending soft-keyboard with language switching support?