According to the Android developer manual shows here, it seems to assume that once the client calls bindService(), eventually the service will be bound and the onServiceConnected() callback will be triggered.
However, in my application I received a crashed report due to the service is not bound after calling bindService and use this service object without null checking. It is a rare bug that cannot be repeated on my devices. Although I can fix this bug by adding null checking, that service is essential to my application and if it isn't connected, the app will not function properly. Therefore, I want to ensure the service connection being created in any case. Is there any way to do that?