mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 19:38:08 +00:00
Fixed Core Service notification icon
This commit is contained in:
parent
86cfb66bf4
commit
433373328b
2 changed files with 45 additions and 1 deletions
|
|
@ -216,7 +216,7 @@
|
|||
android:label="@string/service_name" />
|
||||
|
||||
<service
|
||||
android:name="org.linphone.core.tools.service.CoreService"
|
||||
android:name=".service.CoreService"
|
||||
android:foregroundServiceType="phoneCall"
|
||||
android:stopWithTask="false"
|
||||
android:label="@string/app_name" />
|
||||
|
|
|
|||
44
app/src/main/java/org/linphone/service/CoreService.java
Normal file
44
app/src/main/java/org/linphone/service/CoreService.java
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) 2010-2021 Belledonne Communications SARL.
|
||||
*
|
||||
* This file is part of linphone-android
|
||||
* (see https://www.linphone.org).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.linphone.service;
|
||||
|
||||
import android.app.Notification;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import org.linphone.R;
|
||||
|
||||
public class CoreService extends org.linphone.core.tools.service.CoreService {
|
||||
@Override
|
||||
public void createServiceNotification() {
|
||||
mServiceNotification =
|
||||
new NotificationCompat.Builder(this, SERVICE_NOTIFICATION_CHANNEL_ID)
|
||||
.setContentTitle(SERVICE_NOTIFICATION_TITLE)
|
||||
.setContentText(SERVICE_NOTIFICATION_CONTENT)
|
||||
.setSmallIcon(getApplicationInfo().icon)
|
||||
.setAutoCancel(false)
|
||||
.setCategory(Notification.CATEGORY_SERVICE)
|
||||
.setVisibility(NotificationCompat.VISIBILITY_SECRET)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.setShowWhen(true)
|
||||
.setOngoing(true)
|
||||
.setSmallIcon(R.drawable.linphone_notification_icon)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue