This shows you the differences between two versions of the page.
smd:laboratoare:03 [2021/04/01 16:44] adriana.draghici [Start foreground service] |
smd:laboratoare:03 [2021/04/08 16:57] (current) adriana.draghici [Using Intent Services] |
||
---|---|---|---|
Line 83: | Line 83: | ||
====Start a service==== | ====Start a service==== | ||
+ | |||
<code java> | <code java> | ||
Line 113: | Line 114: | ||
} | } | ||
</code> | </code> | ||
+ | |||
+ | :!: If your project is configured for versions higher than Oreo, there's no need to perform the check for Oreo. | ||
+ | |||
====Start foreground service==== | ====Start foreground service==== | ||
Line 224: | Line 228: | ||
* If we want to send a response from the IntentService to the activity, we can broadcast the result using intents and register a broadcast receiver for them. | * If we want to send a response from the IntentService to the activity, we can broadcast the result using intents and register a broadcast receiver for them. | ||
+ | |||
+ | /* | ||
+ | TODO INTENT SERVICE IS DEPRECATED, LEAVE THE TEXT< ADD A WARNING AND REMOVE THE EXERCISE | ||
+ | */ | ||
=== Task 3 LuckyIntentService (2p) === | === Task 3 LuckyIntentService (2p) === | ||