

Supporting Low Cost Android Phones - lnanek2
http://neatocode.tumblr.com/post/34964277213/low-cost-phones

======
aw3c2
Public Service Announcement about Image-/Graphicsmagick ;)

Imagemagick/Graphicsmagick have a batch image manipulation tool called
mogrify. For example "mogrify -format jpeg -geometry 512 -quality 75 -path
other/dir/ *.png". There usually is no need for any awkward loops that use
convert once per image.

Posting this here since the linked site requires Javascript for comments.

~~~
lnanek2
Thanks for the tip. I read the docs for mogrify just now, but it says it
overwrites images and I don't see any option to change that or add a different
output path. The need here is to take a source image from a folder like
drawable-hdpi, and produce a new, converted image in a folder like drawable-
ldpi. I guess maybe you could copy everything first, then modify it? Although
that seems more clumsy than just running the find command already being used.
Thanks for the help!

------
mhaymo
I wonder how easy it would be to get Android doing this automatically. It
would certainly improve performance if images could be scaled once on
installation of the APK instead of every time they are displayed.

~~~
TazeTSchnitzel
What if Google Play could produce various scaled versions ahead-of-time? Then
you'd have smaller downloads for smaller devices!

~~~
ConstantineXVI
Since you sign your apk locally; it'd have to be integrated into the build
process instead of being done in Play (else the signatures get broken).

~~~
TazeTSchnitzel
Ah, that sucks. Allow APKs to depend on an external media archive?

~~~
ConstantineXVI
That would

a) defeat the point of signing

b) require a new version of Android (which these low-end phones aren't likely
to get)

It'd be far easier and more effective to tweak the build tools to crunch the
images before packing up the APK in the first place.

~~~
lnanek2
Another advantage is that technically the Android Market will let you upload
multiple APKs for a single market entry now as long as they are only
compatible with different devices. So it is possible to post a different APK
for each density class using compatible-screens targeting...

------
kizza
I've wanted a 9-patch resizer for ages now - this is great!

------
fharper1961
I wonder what the dimensions of the bitmap that caused the OutOfMemoryError
were? Usually ActionBar icons are small, so it seems weird that such a small
image would cause an OOME.

------
brianbreslin
This brings up an interesting need: ability to easily and affordable
test/simulate across the thousands of android or mobile devices. An emulator
with CPU/gpu specs for each model..

~~~
graue
I was going to suggest <http://www.manymo.com/>, but it seems to only allow
customizing screen size and OS version — not the hardware specs.

~~~
brianbreslin
does this do only browser emulation or actual app running?

