tags:

views:

76

answers:

2

What is Package Manager ? What is the purpose of using it ? What does the following methods describe:
(1) getPackageManager()
(2) getApplicationInfo()
(3) getPackageName()

Can any one give detailed description as I could not get complete inf. in Android developer guide.
And also one sample program that comprises all the methods.

thanks in Advance

A: 

Here is the detailed explanation.

Vinay
I guess he knows already because he mentions the developer guide in his question ;)
Martin
can we get values of the variables of that package , if we use PackageManager ?
Android_prog
A: 

The Android Package Manager serves a similar function to Linux package managers. http://en.wikipedia.org/wiki/Package_manager

From the API docs: "[It's a] Class for retrieving various kinds of information related to the application packages that are currently installed on the device."

Want to know which apps are installed? Ask the package manager. And so on.

Matt Ball
Thank you. I got a problem in one Android Application which I am working in which I am getting error when I use PackageManager.
Android_prog
@Android - then it sounds like you should really be asking a question about the problem you're having, not a totally general "what is package manager" question.
Matt Ball
Problem in Using PackageManager in Android [closed] . This is the problem link
Android_prog
@Android: I think you're referring to [this question](http://stackoverflow.com/questions/3661367/error-while-using-packagemanager-in-android).
Matt Ball