Sometimes my app crashes for some reason and I have no control over
it.
You need to debug the exact reason for crash, but in General, if you have a Service
running, then Android will notice that you have a service running and not kill it so readily. However, it is still possible that Android will kill your service process if it isn't "in use".
I want to let the service know when the app crashes and do some other
process.
Assuming App crashes here means your app's process is killed by Android system, and in such an event, Service
will stop running when system kill your application. Basically When your application is killed by the system, all components of it are killed (activities, services, etc.).
Hence, this situation don't leave any scope to notify anything to your app's service as it is already gone with app crash.