Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android) set target SDK to 34 #14129

Merged
merged 11 commits into from
Jan 19, 2024
Prev Previous commit
Next Next commit
feat(android): implement forground service type
  • Loading branch information
Calinteodor committed Jan 19, 2024
commit 0d4e658f64b96a2b92318b7ea112aa9b15631e36
3 changes: 2 additions & 1 deletion android/sdk/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />

<uses-feature
android:glEsVersion="0x00020000"
@@ -65,4 +66,4 @@

</application>

</manifest>
</manifest>
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ServiceInfo;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
@@ -94,8 +95,11 @@ public void onCreate() {
stopSelf();
JitsiMeetLogger.w(TAG + " Couldn't start service, notification is null");
} else {
startForeground(OngoingNotification.NOTIFICATION_ID, notification);
JitsiMeetLogger.i(TAG + " Service started");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
startForeground(OngoingNotification.NOTIFICATION_ID, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION);
} else {
startForeground(OngoingNotification.NOTIFICATION_ID, notification);
}
}

OngoingConferenceTracker.getInstance().addListener(this);