mozilla / apk-factory-service

Web service which converts Open Web Apps into native Android apps
42 stars 18 forks source link

App icon is not set properly, Android icon is displayed instead #84

Closed kyoshino closed 9 years ago

kyoshino commented 9 years ago

Currently, both Marketplace apps and debuggable APKs generated with mozilla-apk-cli don't have the app logo in the APK bundle so the app icon is not shown on the Android app list. When I extract the package, /res/drawable-*/ic_launcher.png is the Android icon, not the app icon.

ic_launcher

asdofindia commented 9 years ago

I faced this same issue. Apps that are already on the marketplace seems to be working fine (maybe they're served from cache?). But if I use the manifest url of the same apps and generate apk locally, the icons are what @kyoshino posted. Also, any new app are having the same problem, both on the marketplace apk-factory and local installations.

asdofindia commented 9 years ago

This is caused because of #82 When it is reverted the icons are proper.

Here is what happens. icon.identify and optimize in android_icon.js fails because of the image headers being incorrect. This happens because the files created by writing body to /tmp is not the same as those created by piping the stream.

I shall send a pull request based on https://github.com/request/request/issues/647 which utilizes streaming and listens for response code. It does work when the requests are 200, but I'm not sure about the other case. Please check.

kyoshino commented 9 years ago

Thanks @asdofindia!