End application from class library project
How can I close or end the application from library project?

For example I have made a function in a library project to check if SD Card is available or not. So if sd card is not available i want to display a dialog box with button. On button click I want to close the application. I tried finish() but it didn't work.
End application from class library project
===

How can I close or end the application from library project?

For example I have made a function in a library project to check if SD Card is available or not. So if sd card is not available i want to display a dialog box with button. On button click I want to close the application. I tried finish() but it didn't work.