0

I'm trying to write an android web application that detects all installed apps on android.

PackageManager pm = mContext.getPackageManager();
if (pm == null) {
    return "can't get pm";
}

Drawable icon = pm.getApplicationIcon(packageName);

I tried with java imageview and it works fine. However, the GUI is HTML code base. I tried to google it but I don't have any idea how to display other apps icon on my webview HTML. Could you please help me to solve this issues?

Thanks

Vinh
  • 21
  • 2
  • 1. convert Drawable to Bitmap 2a. save Bitmap as png/jpg and pass the uri to the file 2b. or (save to png to byte array then covert) to base64 if WebView support [data scheme](http://jsfiddle.net/mn30h39u/) – Selvin Feb 24 '15 at 03:13
  • hi @Selvin, I tried this but it does not work [link](http://stackoverflow.com/questions/3035692/how-to-convert-a-drawable-to-a-bitmap) [pre] (Bitmap bitmap = ((BitmapDrawable)drawable).getBitmap() [code] – Vinh Feb 24 '15 at 07:07

0 Answers0