Thursday, February 24, 2011

[android-developers] Finding Specific Installed Applications at Run Time

Hi,

I am working on an application, for which I have to display icons of
specific applications such as "Email" , "Browser" and "Alarm Clock" .
Currently I have defined a String Array with the Title names of these
applications as shown below.

private final String[] firstAppNames = new String[] {
"Phone",
"Messaging",
"Contacts",
"Browser",
"Email",
"Music",
"Camera",
"Gallery",
"Alarm Clock",
"Settings"
};

At run time I get a full list of installed application on the device
and compare the Title of each installed application with strings
defined in string array above and if the result of comparison is true
then I collect the icon information for display from corresponding
installed application.

This works fine as long as device is using English language. But when
the device's Language is set to other language such as "Chinese" the
run time title string comparison fails for all the strings defined
above in string array.

Is there a better way , which is not language dependent to get the
specific applications . I haven't tried using the full package name.

Do you have better suggestion for it?

Thanks in advance
argongold

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment