The document discusses Android libraries and APIs. It defines software libraries, application programming interfaces (APIs), and software development kits (SDKs). It describes different types of libraries in Android like .jar and .aar files. It provides steps for creating an Android library, including deciding the library type, keeping the code data-agnostic, testing, and documenting usage. Proper documentation is emphasized through javadoc comments to help other developers use third-party libraries.
3. Application programming interface
How software
components should
interact
Can be in form of a
library or just
documentation
ABI = Application
Binary Interface; for
closed source binary
function call hooks
4. Software Development Kit
Set of tools to
create a software for
a particular platform.
Usually a set of APIs,
building tools and
configs, debugging &
testing utilities
SDK's license can
dictate the freeness
of the software you
develop
5.
6. Libraries in Android
.jar -> are just Java
libraries
.jar libraries are
mostly functionality
based libraries, where
data handling, data
manipulation,
service/framework
integration is handled
Generally cannot be
7. Libraries in Android
.aar -> android library
Contain java code
along with android
resources and also
android manifest stubs
Project structure
exactly as an Android
app
**Support only
8. Libraries in Android
Open source libraries
-> distributed as form
of the whole
directory structure
from where project
was built
Need to import the
whole project into
IDE and add it as a
module on which your
App depends
9. Creating your own Android Library
Step 1 : Decide
whether to use only-
java library or a full
android library
Step 2 : Create data-
agnostic
functions/classes in
library. Keep in mind
various different apps
will use the library
10. Creating your own Android Library
Step 4 : Properly
document the usage of
the library. If not
for anyone else but
for yourself
Step 5 : Test properly
for all use cases and
corner cases
Step 6 : Decide
distribution
11. Need for documentation
A library is written
for third party usage
The person who will
develop a software
using your library
needs to know how to
make best use of your
library
Even open source
libraries must have
12. Javadoc : Documenting Java code
Generally
documentation
invloves writing
comments in code.
Javadoc takes the
step further.
Write comments in
code in javadoc
format, then run
javadoc on the
source, and get