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. RE : Possible in emulator? Querrying google map? Unlocking Anrdoid Example

It looks like your activity is not bound to the intent. Have you bound it in
manifest.xml ?

Le 19 nov. 2009 05:05, "Esmail" <ebo...@hotmail.com> a crit :



Ok, this is what I get:

11-18 22:03:07.485: ERROR/Error(711):
android.content.ActivityNotFoundException: No Activity found to handle
Intent
{ action=android.intent.action.VIEW data=geo:0,0?q=white+house
11-18 22:03:07.485: ERROR/Error(711):  }

and this is the code (fails regardless of the address):

try
{
    String address = addressfield.getText().toString();
    address = address.replace(' ', '+');
    Intent geoIntent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("geo:0,0?q=" + address));
    startActivity(geoIntent);

} catch (Exception e) { AlertDialog ad = adb.create(); ad.setMessage("Failed
to Launch!");...
    Log.e("Error", e.toString());
}

--

2. Multi threading in android

I am new to android and i was doing some application which might use
multi threading.
For example the application threads might do as follows assuming 2
threads;

Thread 1
Even if the overall application runs on foreground thread one should
run at all times listening for specific sms;
Imagine the sms to be Intercepted is "3456" when this message is sent
to the phone then thread one will be paused
and thread 2 will be activated:

Thread 2
When thread to is activated then it will use gps to track the location
of the phone and will use instance of smsManager to send back the
coordinates(log, lat) of the phone or even if possible google map back
to the phone which sent the message "3456" and then thread one will be
activated:

****How to make this happen any idea?

Condtions:
I know user must know that this application is running on the phone at
all times.

Regards,
Rahel

-- 

3. surfaceCreated() and CreateSurface() in camera preview application

4. Change Android Language

5. android list targets FAILS

6. System.loadLibrary - Loading the Motorola Droid library

7. ADT Plugin for Eclipse on Ubuntu 9.10