开发者

Android framework. What is it? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 2 years ago.

Improve this question

I've few questions on Android Framework. Can someone please answer them

  1. What does an Android Framework do? What is it's job?

  2. What are these managers - Activity Manager, Location Manager etc? Are they APIs or libraries?

  3. I heard that the definition of a framework is - a set of libraries that say “Don’t call us, we’ll call you.” So can I say that Activity Manager, Location Manager etc are such libraries? Or is it that they are not libraries but APIs (used to access underlying c/c++ libraries) and the actual libraries that do "Don't call us, we'll call you." 开发者_如何学编程are hidden from us?


  1. The android framework is the set of API's that allow developers to quickly and easily write apps for android phones. It consists of tools for designing UIs like buttons, text fields, image panes, and system tools like intents (for starting other apps/activities or opening files), phone controls, media players, ect. Essentially an android app consists of Activities (programs that the user interacts with), services (programs that run in the background or provide some function to other apps), and broadcast receivers (programs that catch information important to your app). The best way to learn this system will be to go through the Google Tutorials found here

  2. AcitivityManager and LocationManager are examples of classes found in the android sdk (the framework). I do not know of any use for these classes, as I believe they are part of the system. I have never used them, but if you wanted to learn more about them i would look at the Android API

  3. I believe your question is a bit 3 dimensional:

    • A library is a code source that a developer and add to their application. It is not source code, thus the inner details are hidden to the developer. You can only access the visible (public) parts.

    • An API is the documentation that accompanies a library to explain how to use the library (an example of this is the Android API listed above)

So to answer your question, ActivityManager and LocationManager are neither libraries nor APIs. Rather, they are classes within the Android SDK (which is a library) that are used by either the system, or the developer (if he can find any use for them). Also, everything in android is Java, so you wont find any C/C++ libraries for android

I hope that this answer was helpful for you.


The Android Framework is the entire stack of stuff that makes up the OS. This is the underlying Native libraries that are not directly accessible, the layer above that that you actually interact with and the code that developers write to run on the system. Yo are confused about Libraries vs APIs. Libraries are just chunks of useful code, APIs are the interface to those libraries. API actually stands for Application Programming Interface. The Managers do exactly what it says on the tin! The Activity Manager is the class that manages Activities, the Location Manager manages your current location.


Android framework is a set of those classes and methods whose fuctionalities can be selectively overridden by the user like examples content providers,activity managers,Location manager,Telephony manager etc.

Activity manager or Location manager are the classes whose methods can be override to use it as per the need of the output of the programme.


Android framework has APIs which are provided for android application development. Using these APIs, apps can access android functionalities like Wifi, BT, NFC etc.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜