开发者

how to change the text to just the app name

开发者 https://www.devze.com 2023-02-18 20:19 出处:网络
I m creating an application that allows the user to choose an application that is already installed on there phone, I got a listview populated with all the apps on the phon开发者_开发百科e but everyth

I m creating an application that allows the user to choose an application that is already installed on there phone, I got a listview populated with all the apps on the phon开发者_开发百科e but everything appears and most of the names dont look right, like "com.android.launcher"

I just want all the apps names appearing like the "safety.app" in the picture and not the rest of them like the "com.android.launcher".

I am currently using the code "packageInfo.packageName" to get the list of apps

Does anyone know how to just get the names of the apps to appear here?


Does this do what you want?

packageInfo.applicationInfo.loadLabel(getPackageManager()).toString();

0

精彩评论

暂无评论...
验证码 换一张
取 消