-4

I am making an library project in android. How do I make sure that integration of the library project doesn't crash the app because of any exceptions in the library project. How do I wrap the entire library to handle exception at runtime and log it and doesn't force close the application

Harikrishnan CV
  • 901
  • 2
  • 8
  • 17

2 Answers2

1

There is no such exception handling for the entire project.

For developing a better library/ app try running on few devices with different OS version making sure you cover all the possible usecases.

If the above procedure seems to be a bit time consuming. Try writing test cases and execute them on various devices.

For reference :

https://developer.android.com/training/testing/start/index.html

ChaitanyaAtkuri
  • 1,672
  • 11
  • 15
0
try{
// codes 
} 
catch (Exception E )
{

}

How to handle try catch exception android

Community
  • 1
  • 1
Rahul R
  • 303
  • 2
  • 11