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 5974371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:56:01+00:00 2026-05-22T20:56:01+00:00

I am trying to load the logo associated with the current activity and/or its

  • 0

I am trying to load the logo associated with the current activity and/or its parent application from the definition in the manifest. This technique has already worked successfully on loading the title and icon associated with both, but the logo is always returning null or 0.

Here is the relevant info from the manifest I am working with:

<application
    android:icon="@drawable/ic_launcher"
    android:logo="@drawable/ad_logo"
    android:label="@string/app_name"
    android:hardwareAccelerated="true">

    <activity
        android:name=".MainActivity" 
        android:label="@string/app_name"
        android:logo="@drawable/ad_logo">

With activity being an instance of the above defined activity, I have tried the following (results annotated inline):

PackageManager pm = activity.getPackageManager();
ComponentName cn = activity.getComponentName();
ApplicationInfo ai = activity.getApplicationInfo();

//ACTIVITY LABEL: Works
pm.getActivityInfo(cn, PackageManager.GET_ACTIVITIES).loadLabel(pm);

//APPLICATION LABEL: Works
ai.loadLabel(pm);
//APPLICATION LABEL: Works
pm.getApplicationLabel(ai);

//ACTIVITY ICON: Works
pm.getActivityInfo(cn, PackageManager.GET_ACTIVITIES).loadIcon(pm);
//ACTIVITTY ICON: Works
pm.getActivityIcon(cn);

//APPLICATION ICON: Works
pm.getApplicationIcon(ai);
//APPLICATION ICON: Works
ai.loadIcon(pm);

//ACTIVITY LOGO: Does not work
pm.getActivityInfo(cn, PackageManager.GET_ACTIVITIES).loadLogo(pm);
//ACTIVITY LOGO: Does not work
pm.getActivityInfo(cn, PackageManager.GET_ACTIVITIES).logo
//ACTIVITY LOGO: Does not work
pm.getActivityLogo(cn);

//APPLICATION LOGO: Does not work
pm.getApplicationLogo(ai);
//APPLICATION LOGO: Does not work
pm.getApplicationLogo(activity.getApplication().getPackageName());
//APPLICATION LOGO: Does not work
ai.loadLogo(pm);

//APPLICATION LOGO: Does not work
pm.getApplicationInfo(ai.packageName, 0).loadLogo(pm);
//APPLICATION LOGO: Does not work
ai.logo;

Does anyone know how to properly load the logo for either or both of these targets?

edit:
Logo support requires API level 9. The devices I am testing on are emulators and physical devices all runing API level 10. This code will never be executed on 3.0+.

  • 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-05-22T20:56:02+00:00Added an answer on May 22, 2026 at 8:56 pm

    From my tests, your code works properly running on a Honeycomb device, but not on a Gingerbread or below device. That seems to imply that the android:logo functionality, although present in API Level 8, is not implemented correctly in the underlying platform. That is, the same application apk on a Level 8-10 device is not retaining the logo attribute, but a Level 11 device does. That means the problem is not with the code or the AndroidManifest.xml, but with the platform.

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

Sidebar

Related Questions

i am trying load file after it created from /stext command line but its
I trying to load feeds from my blog but this is resulting in the
Trying to load a shared lib out of the current '.' dir in a
When trying to load Microsoft.Xna.Framework.dll from any project, it throws a FileNotFoundException. The specified
I am am trying to load a SQL table from a flat file. The
I am trying to load UIImage object from NSData , and the sample code
Im trying to load a csv file into a datatable using oledb. This is
I'm actually trying load image based on its screen size. Code seems to be
Im trying to load a new page when i click on a link. Its
Im trying to load a css file for ipad only. I tried this: <link

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.