|
@@ -21,6 +21,7 @@ import android.app.Service;
|
21
|
21
|
import android.content.ComponentName;
|
22
|
22
|
import android.content.Context;
|
23
|
23
|
import android.content.Intent;
|
|
24
|
+import android.os.Build;
|
24
|
25
|
import android.os.IBinder;
|
25
|
26
|
import android.util.Log;
|
26
|
27
|
|
|
@@ -47,7 +48,12 @@ public class JitsiMeetOngoingConferenceService extends Service
|
47
|
48
|
Intent intent = new Intent(context, JitsiMeetOngoingConferenceService.class);
|
48
|
49
|
intent.setAction(Actions.START);
|
49
|
50
|
|
50
|
|
- ComponentName componentName = context.startService(intent);
|
|
51
|
+ ComponentName componentName;
|
|
52
|
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
53
|
+ componentName = context.startForegroundService(intent);
|
|
54
|
+ } else {
|
|
55
|
+ componentName = context.startService(intent);
|
|
56
|
+ }
|
51
|
57
|
if (componentName == null) {
|
52
|
58
|
Log.w(TAG, "Ongoing conference service not started");
|
53
|
59
|
}
|