how to change the text to just the app name - android

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 phone 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();

Related

launcher which will show only seletec application. restrict other apps

I want to make launcher app retreive/store a list of selected application and restrict other applications.and the list of the application should me in viewpager (ex. Horizontal manner).
Thanks in advance.
First of all, this is not a question, but a request.
Now, to help you out - there is around 50 apps which restrict showing apps in any launcher, no reason to make another launcher.. BUT. If you still want to do it, when making the list in the adapter, just remove the ones with packages you want to hide.

Only displaying pre-installed applications on android device

So I am using the Home sample to build an application that creates a second home screen for the user. The idea is to be able to have only one user account yet restrict certain access to chosen applications. I have managed to ensure that all of the applications are invisible in the XML yet I am struggling with how to change this to make certain apps visible.
Is it possible to write a whitelist of accepted apps for instance the preinstalled apps or child friendly apps for children who game using the android device and then put in a Java method to access this white list? This is the only way I can think to make it work.
If anyone knows the correct way can you please help.
Thanks.
Ok so I discovered how to do this.
In the home sample they provide a for loop in the Home.java file that covers all apps and displays them. It take a simple if statement to restrict the apps that can be viewed -
// for loop is here
if (info.activityInfo.applicationInfo.packageName.contains("com.android"))
//then the rest of the home sample is here.
Still very basic but provides me with a good enough UI so that kids cannot see apps I don't want them to.

Android: how to do a checkbox list from installed user apps

i'm very new to android development...
i'm still on leaning phase...
and it seems like a very big forest for me...
there's is something specific i want to make...
i want to create an app that will list(checkbox) all the installed user apps...
and i want each app will appear with the logo on the left side of the app name... and the checkbox will be on right and the list will extend vertically...
so the User can check any app on the list...
but I certainly don't know where to start Y_Y
First read about PackageManager.
http://developer.android.com/reference/android/content/pm/PackageManager.html#getInstalledApplications%28int%29
This will give you a list of installed android apps.

Set scrolling for application name

My application name has 15 characters. But in apps list of android device does not shows the full name. So I want to set marquee for my lable in android manifest. But I dont know how even I didn't know wheather it is possible or not.
I was googling it near 4 hours but the solution is only for title of each activity and not for application name.
sample image for reference:
This is sample image taken from google. I could not take screenshot of my device.
Note the red marked name. I want this name to be scroll. If it is possible means please help me friends.
Thanks in advance.
You are not able to make the name scroll on the user's device, as this is (probably) a launcher feature. Unless the user's launcher is able to scroll long app names, it's not going to scroll. This is not something you can control through your app.
you cannot do that pro grammatically. Thats an default functionality of the every single OS manufactures . Its depend upon them only. Some manufactures will set marque and some of then wont set.
Marquee is not supported on all android mobile devices. Anyways check out this link you may be lucky ;)

Android create custom IM type

In my android application I want to create a custom type of IM that should be editable via standard contacts editing application. There are several built-it IMs that user can select from: Aim, Windows Live, Yahoo, etc. I want to add "My Very Best IM" to the list, so that user can pick it quickly without the need to enter the "custom" text and value by hand. Any ideas on how to do this?
You cannot add this functionality to the inbuilt contacts app.
In other words, you cannot tell that this app should show up in that list.

Categories

Resources