gregm
gregm

Reputation: 12159

Webview not displaying Twitter on some Droids

This is an obscure, possibly hardware dependent error.

I have a webview that is trying to display a twitter feed like this: http://twitter.com/HP

The view works fine on a Droid 2, but fails on Droid and Droid X.

Instead of displaying the page, it just displays the twitter logo and hangs forever.

about the devices:

All running the same software, and Android 2.2. However, they are running different flavors of Android 2.2. Droid X: 2.2.1 Droid 1: 2.2.2 Droid 2: 2.2

It seems that Verizon must have added a bug or fixed a bug in their later versions of 2.2.

Upvotes: 7

Views: 4878

Answers (1)

gregm
gregm

Reputation: 12159

This is the answer:

add this:

        webView.getSettings().setDomStorageEnabled(true);

(plus use code from here: http://www.codelark.com/2010/09/13/backwards-compatibility-in-android-using-reflection/)

I have no idea why, but if you ever see an error message like this: Web Console: Uncaught TypeError: Cannot read property 'profile' of undefined then try adding this setting.

Upvotes: 38

Related Questions