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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:59:09+00:00 2026-05-29T22:59:09+00:00

For work I maintain an internal ‘market’ where new app releases can be uploaded

  • 0

For work I maintain an internal ‘market’ where new app releases can be uploaded and downloaded. I also maintain a launcher that can select from our many apps and launch them (some are the same app ‘branded’ differently). I can currently populate this list with the package name and the version code, but I would also like to add in the SVN branch.

I was thinking about having a script that would add the branch info as XML either to the manifest as a custom attribute or as a separate XML file. Ideally, this could be accessible publicly by the PackageManager. Is this possible?

Alternatively, can I programmatically change the APK name? Then I could use “$name – $branch” as the new name.

  • 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-29T22:59:12+00:00Added an answer on May 29, 2026 at 10:59 pm

    I was thinking about having a script that would add the branch info as XML either to the manifest as a custom attribute or as a separate XML file. Ideally, this could be accessible publicly by the PackageManager. Is this possible?

    You have add a <meta-data> element to a component’s element (e.g., <activity>) and access the metadata XML content via PackageManager:

        <receiver android:name="com.commonsware.cwac.wakeful.AlarmReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
    
            <meta-data
                android:name="com.commonsware.cwac.wakeful"
                android:resource="@xml/wakeful"/>
        </receiver>
    

    The component would access the metadata through code like this:

    PackageManager pm=ctxt.getPackageManager();
    ComponentName cn=new ComponentName(ctxt, getClass());
    ActivityInfo ai=pm.getReceiverInfo(cn, PackageManager.GET_META_DATA);
    XmlResourceParser xpp=ai.loadXmlMetaData(pm, "com.commonsware.cwac.wakeful");
    

    Your custom build process could then adjust the XML resource pointed to by <meta-data> to contain whatever you want.

    Alternatively, can I programmatically change the APK name?

    You can name the APK file whatever you want on your hard drive, but I would not count on that name remaining intact through the installation process.

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

Sidebar

Related Questions

I am new to Flex (got assigned to maintain an old project at work)
In a web-based system I maintain at work that recently went live, it makes
I've just started a new work and I've got to manage, maintain (and feel
I want to maintain state in my Perl web app. How can I do
Work on a support helpdesk. New tickets come in and records are created in
I work with unordered_set . Here it's written that it has a reserve function
In our daily work we maintain some rather large Javascript libaries. We use VS2008
I'm trying to build a datagrid that user can edit, add, delete entries from
The company I work for has over 1000 apps which we maintain. Many of
I maintain an application that sends me an email when an error occurs in

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.