Hi all,

Been chasing this bug for the last couple of days with a helpful user
who owns a Garminfone. The app in question includes wallpapers; on
compliant 2.1+ devices it uses live wallpaper, but for others (like
the Garminfone, which is stuck on 1.6), it just uses
Context.setWallpaper(). In order to generate a wallpaper bitmap of the
correct size, I first call Context.getWallpaperDesiredMinimumWidth()
and ...Height(). This has worked fine on every other handset I know
of, but on the Garminfone, these functions apparently return 0.

So, a few questions for the group...

First, has anyone run across this before, on any handset? If so, any
tips? I doubt that there's anything I'm doing wrong - these functions
are dead simple - but anything's possible, of course.

Second, any good ideas for a workaround? I tried making a reasonable
guess like this:

final DisplayMetrics dm = getResources().getDisplayMetrics();
if ((wallWidth <= 0) || (wallHeight <= 0)) {  // these are the values
returned from "getDesired..."
        wallHeight = Math.max(dm.widthPixels, dm.heightPixels);
        wallWidth  = Math.min(dm.widthPixels, dm.heightPixels) * 2;
}

This would work on virtually any other handset known to man. But
unfortunately, the Garmin user reported that the resulting wallpaper
was the wrong aspect ratio; from his description, I'm thinking that it
shouldn't have the "* 2". I'm not going to hardcode THAT in, however.

Finally, does anyone know how to go about getting something added to
the Compatibility Test Suite? It strikes me that this is a flaw in the
basic Garminfone SDK implementation. I looked through the CDD, but the
only mentions of wallpaper in there are about the newer, live ones. So
this is probably another test case that should be added to the CTS
itself.

Thanks,

String

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to