Android foreground service stops immediately when is started after selecting an image
If I start a service in the foreground inside the onClick of a button everything works fine. But if I start a service after selecting an image, so inside the onActivityResult method, then the service stops after few seconds even though it’s able to read correctly the selected image.