What are libraries in Android App Development ?
Libraries
Libraries are like the extensions to the core Android SDK, they benefit from the collective work of the massive Android community around the world, empowering all the Android developers like you to more easily build better apps.
Using community build and maintained library can be a huge time saver but it's important to choose these libraries wisely because your app is ultimately responsible for what the code does in these libraries. Which is one reason why open source can be an advantage and you want to make sure that the library is well-supported and maintained.
Things to look for while choosing a particular library for your app.
- Only use reasonable API's/Permissions (access to sensitive data such as user contacts or call logs can be risky, access to internet is ok )
- Supports Targeting Latest Android SDK
While choosing library we see the GitHub page and check its:
- Watcher
- Star
- Fork
- Issues : open and closed
- We look @ source code and check if we can read and understand it.
- Does the code has a reasonable amount of automated tests.
- Check the documentation if it is well documented and updated recently.
- Popular libraries has community build around them, blogspot, conferences, tutorials ecc.
- Also the size of library can affect the startup time of app.
- Legal things like what kind of license it uses.
In Android Gradle lets you add community libraries to your project by including the right repository along with the right dependencies.
So from which repositories do you get these libraries to include with your app?
Android Studio project declares Google and JCenter as repository locations in the projects top-level build-up Gradle file.
Google repository is used to serve Google libraries like Jetpack.
JCenter hosts most of the community libraries.
Comments
Post a Comment