How to get Programmatically Get Application Name

by wyngnut » Mon, 08 Dec 2008 01:50:54 GMT


Sponsored Links
 Hi,

I am trying to get the Application Name (the one that accompanies the
icon in the launcher) for all packages installed in the device.  I
have the packageName and name from the ActivityInfo retrived view
queryIntentActivities(), but can't seem to locate the Application
Name.  Any pointers would be appreciated.

Thanks

--~--~---------~--~----~------------~-------~--~----~



How to get Programmatically Get Application Name

by Mark Murphy » Mon, 08 Dec 2008 02:24:10 GMT


 


Can you use PackageManager#getApplicationInfo()?

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 1.9 Available!

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to get Programmatically Get Application Name

by Derek » Mon, 22 Dec 2008 10:12:33 GMT


 Not sure is this what you want

Assuming you have your current Context object ctx

Resources appR = ctx.getResources();
CharSequence txt = appR.getText(appR.getIdentifier("app_name",
"string", ctx.getPackageName()));

Derek








--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Using Alarm Service - Getting Started

I am just getting into android and had a question about leveraging the
alarm service.

My application consists of one activity, setting a time.  I want to
then pass that time to the system's alarm, and have it add a message
to the notification bar at that time.

I have read the design guidelines and a few of the tutorials listed in
the developer site. BUt I couldn't find a good example to interact
with the system clock or alarm.

The closest I found was the code
http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/app/AlarmService.html
but I am not sure if I need to implement this, or if can just pass and
alarm message or something.

I know nothing!

--~--~---------~--~----~------------~-------~--~----~

2. Another Core VM Problem

Man I need help.  I've scrubbed my code, and there is no longer any
reference to an java.* class.  I'm including only android.jar from the
1.5 SDK.  and I'm still getting this error




One thing I do notice I cannot fix.  Eclipse is auto-generating a
service I...Service.java file.  Inside that file there is an import

import java.lang.String

I'm not supposed to be editing that file... could that be the
problem?  Doesn't that imply that the SDK 1.5 isn't ready?

I have no problem compiling this app in the full android build, but
for other reasons need this working in an emulated debug environment
(no I cannot install the app on the emulator, that fails, probably for
the same reason the build fails within eclipse).

Any thoughts you guys have are most welcome...

Steve

--~--~---------~--~----~------------~-------~--~----~

3. eclipse adt plugin

4. TOOLS.JAR

5. Using setActualDefaultRingtoneUri

6. To Publish Priced Apps in Australia

7. Android Calendar / Google Maps integration