Find the total number of APIs used in the source code of the Android application.

I want to find out the total number of android APIs (classes and methods) used in the source code of an Android application. but I want to do it programmatically. can anyone suggest me how can i do this?

Thanks at Advance

+4
source share
2 answers

You can do this using the reflection API .

You can get a list of classes using the following code:

Reflections ref = new Reflections("package_name"); Set<Class<?>> classes = ref.getSubTypesOf(Object.class); 

Then, using Class.getDeclaredMethods () or Class.getMethods () you can get a list of methods.

+2
source

The eclipse metric plugin looks promising. It is not specifically designed for Android, but there is a chance that it will provide you (most of) the information you need.

Link

+1
source

All Articles