does not apply to services, and besides the function is Deprecated.
My task includes the following limitations:
The service is called from the outside, so it's necessary to use it.
The data must be received in the service execution flow. Therefore it's not suitable to launch the activity from the service, and then launch the service from it. In the activity, you need to fill in some values and return control back to the service with received data, in the same place as the service entry point is.
The target version of android is 6.0 (API 23). Maybe it limits some possibilities too.
For now I got by synchronized singletone with a map inside, but it's just a crutch...
Как запустить действие из сервиса и получить от него ценность?[code]startActivityForResult()[/code] does not apply to services, and besides the function is Deprecated. My task includes the following limitations: [list] [*]The service is called from the outside, so it's necessary to use it. [*]The data must be received in the service execution flow. Therefore it's not suitable to launch the activity from the service, and then launch the service from it. In the activity, you need to fill in some values and return control back to the service with received data, in the same place as the service entry point is. [*]The target version of android is 6.0 (API 23). Maybe it limits some possibilities too. [/list] For now I got by synchronized singletone with a map inside, but it's just a crutch...