On Habré, I found an article about sending a USSD request, the Activity is used there, and I would like to send and receive a response in the background, so that the dialing screen does not appear, and then I didn’t climb Alert with the message text. I tried to make the service, but it didn’t work out, or rather I can’t say for sure whether it turned out or not, I could send it, but I couldn’t figure out how to get the answer, I ask for help.

    1 answer 1

    You can call StartActivityForResult only from the Activity. Therefore, the direct method described in Habré is not applicable to services. You can also try

    1. create auxiliary activity and send-receive requests through it,
    2. request the requested activities to send results via Broadcast Intent.