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. ODBC connectivity in android

Hi,

As Android uses sqlite as it's embedded database, how it gives it the
ODBC connectivity.


Regards

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

2. Unit tests run twice from Eclipse?

I've got unit tests which are subclasses of AndroidTestCase, I thought
they were just taking awhile to run, but for some reason when I run
them via Eclipse, they actually run twice. I can verify this in
LogCat .. after the Console outputs "Launching instrumentation
android.test.InstrumentationTestRunner on device..." the first run
starts, which is only visible via LogCat. Then the JUnit pane comes to
life and starts tracking the second run.

Any ideas? My AndroidManifest.xml looks like this:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.foobar.test"
        android:versionCode="1"
        android:versionName="1.0.0">
        <uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION" />
        <uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
        <uses-permission android:name="android.permission.INTERNET" />

        <application android:label="@string/app_name">
                <uses-library android:name="android.test.runner" />

                <service android:name="com.foobar.EventService" />
        </application>

            <instrumentation
            android:name="android.test.InstrumentationTestRunner"
            android:targetPackage="com.foobar.test"
            android:label="Tests for my app" />

</manifest>


Thanks,
Steve

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

3. thread questions.

4. no avd available while

5. How to debug android framework with eclipse and emulator

6. How to debug android framework with eclipse and emulator

7. How to debug android framework with eclipse and emulator