Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8246303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:27:49+00:00 2026-06-07T22:27:49+00:00

I am retrieving android apps icons using this code : Drawable icon = icon

  • 0

I am retrieving android apps icons using this code :

Drawable icon = icon = p.applicationInfo.loadIcon(context.getPackageManager());

where p is PackageInfo class object.

I have implemented a server for android which handles requests and responses by client. Here when I send a GET request from client that is my browser, server generates a html page.

Problem is that I need to display retrieved android installed App Icons on html page and I used the following code to do that:

returnHtml += "<tr>";
returnHtml += "<td><img src=" + icon +" /></td>";
returnHtml += "<td>" + apps[0] + "</td>";
returnHtml +="<td>" + apps[1] + "</td>";
returnHtml += "<td>" + apps[2] + "</td>";
returnHtml +="<td>" + apps[3] + "</td>";
returnHtml +="</tr>";

Basically, here I am generating a table row with respective app info and displaying respective App icons in first column.But it’s not showing respective App icons instead displaying default icon image (small image with a question mark on it).

“icon” is a “Android Drawable” class object. Do I need to convert retrieved icon to some form or I need to store icon in some folder first ?

As my html pages are stored in assets folder which is not writable I can’t store icon images there. Is there any solution to display icon images directly from drawable object only ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T22:27:51+00:00Added an answer on June 7, 2026 at 10:27 pm

    Are you using fromHtml? http://developer.android.com/reference/android/text/Html.html#fromHtml(java.lang.String, android.text.Html.ImageGetter, android.text.Html.TagHandler)

    There’s an argument for Html.ImageGetter which allows you to resolve the src string into a Drawable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to android phonegap. i am storing and retrieving data using native
Im having trouble with retrieving username and password from android's sharedpreferences. I use this
I'm using HttpGet method for retrieving data from a web service in my Android
Retrieving the COM class factory for component with CLSID {B4E1B2EC-151B-11D2-926A-006008123235} failed due to the
When retrieving packages with Cabal, I frequently get errors with this message: user error
I'm retrieving data from a MySQL table and displaying it on a webpage using
I'm having difficulty retrieving the giftcard code and amount used on an order. For
I'm retrieving a set of location names from a MySQL database using PHP and
For retrieving the accounts (information) in Android versions since 2.0 you can use the
I want to develop an android application which retrieving data from the Waze Live

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.