mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-15 08:45:04 +01:00
Steps towards better notifications
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
550eba9de4
commit
e079601dad
@ -26,8 +26,10 @@ import com.nextcloud.talk.models.json.capabilities.CapabilitiesOverall
|
|||||||
import com.nextcloud.talk.models.json.conversations.Conversation
|
import com.nextcloud.talk.models.json.conversations.Conversation
|
||||||
import com.nextcloud.talk.models.json.conversations.ConversationOverall
|
import com.nextcloud.talk.models.json.conversations.ConversationOverall
|
||||||
import com.nextcloud.talk.models.json.generic.GenericOverall
|
import com.nextcloud.talk.models.json.generic.GenericOverall
|
||||||
|
import com.nextcloud.talk.models.json.notifications.NotificationOverall
|
||||||
import com.nextcloud.talk.models.json.participants.AddParticipantOverall
|
import com.nextcloud.talk.models.json.participants.AddParticipantOverall
|
||||||
import com.nextcloud.talk.models.json.participants.Participant
|
import com.nextcloud.talk.models.json.participants.Participant
|
||||||
|
import com.nextcloud.talk.models.json.participants.ParticipantsOverall
|
||||||
import com.nextcloud.talk.models.json.push.PushRegistrationOverall
|
import com.nextcloud.talk.models.json.push.PushRegistrationOverall
|
||||||
import com.nextcloud.talk.models.json.signaling.settings.SignalingSettingsOverall
|
import com.nextcloud.talk.models.json.signaling.settings.SignalingSettingsOverall
|
||||||
import com.nextcloud.talk.models.json.userprofile.UserProfileOverall
|
import com.nextcloud.talk.models.json.userprofile.UserProfileOverall
|
||||||
@ -59,16 +61,16 @@ class NextcloudTalkRepositoryImpl(private val apiService: ApiService) : Nextclou
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun getConversationForUser(userEntity: UserNgEntity, conversationToken: String): ConversationOverall {
|
override suspend fun getConversationForUser(user: UserNgEntity, conversationToken: String): ConversationOverall {
|
||||||
return apiService.getConversation(userEntity.getCredentials(), conversationToken)
|
return apiService.getConversation(user.getCredentials(), conversationToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun joinConversationForUser(userNgEntity: UserNgEntity, conversationToken: String, conversationPassword: String?): ConversationOverall {
|
override suspend fun joinConversationForUser(user: UserNgEntity, conversationToken: String, conversationPassword: String?): ConversationOverall {
|
||||||
return apiService.joinConversation(userNgEntity.getCredentials(), ApiUtils.getUrlForSettingMyselfAsActiveParticipant(userNgEntity.baseUrl, conversationToken), conversationPassword)
|
return apiService.joinConversation(user.getCredentials(), ApiUtils.getUrlForSettingMyselfAsActiveParticipant(user.baseUrl, conversationToken), conversationPassword)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun exitConversationForUser(userNgEntity: UserNgEntity, conversationToken: String): GenericOverall {
|
override suspend fun exitConversationForUser(user: UserNgEntity, conversationToken: String): GenericOverall {
|
||||||
return apiService.exitConversation(userNgEntity.getCredentials(), ApiUtils.getUrlForSettingMyselfAsActiveParticipant(userNgEntity.baseUrl, conversationToken))
|
return apiService.exitConversation(user.getCredentials(), ApiUtils.getUrlForSettingMyselfAsActiveParticipant(user.baseUrl, conversationToken))
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun getCapabilitiesForServer(server: String): CapabilitiesOverall {
|
override suspend fun getCapabilitiesForServer(server: String): CapabilitiesOverall {
|
||||||
@ -93,6 +95,14 @@ class NextcloudTalkRepositoryImpl(private val apiService: ApiService) : Nextclou
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override suspend fun getNotificationForUser(user: UserNgEntity, notificationId: String): NotificationOverall {
|
||||||
|
return apiService.getNotification(user.getCredentials(), ApiUtils.getUrlForNotificationWithId(user.baseUrl, notificationId))
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun getPeersForCall(user: UserNgEntity, conversationToken: String): ParticipantsOverall {
|
||||||
|
return apiService.getPeersForCall(user.getCredentials(), ApiUtils.getUrlForCall(user.baseUrl, conversationToken))
|
||||||
|
}
|
||||||
|
|
||||||
override suspend fun setPasswordForConversation(user: UserNgEntity, conversationToken: String, password: String): GenericOverall {
|
override suspend fun setPasswordForConversation(user: UserNgEntity, conversationToken: String, password: String): GenericOverall {
|
||||||
return apiService.setPasswordForConversation(user.getCredentials(), ApiUtils.getUrlForPassword(user.baseUrl, conversationToken), password)
|
return apiService.setPasswordForConversation(user.getCredentials(), ApiUtils.getUrlForPassword(user.baseUrl, conversationToken), password)
|
||||||
}
|
}
|
||||||
|
@ -27,13 +27,24 @@ import com.nextcloud.talk.models.json.capabilities.CapabilitiesOverall
|
|||||||
import com.nextcloud.talk.models.json.conversations.ConversationOverall
|
import com.nextcloud.talk.models.json.conversations.ConversationOverall
|
||||||
import com.nextcloud.talk.models.json.conversations.RoomsOverall
|
import com.nextcloud.talk.models.json.conversations.RoomsOverall
|
||||||
import com.nextcloud.talk.models.json.generic.GenericOverall
|
import com.nextcloud.talk.models.json.generic.GenericOverall
|
||||||
|
import com.nextcloud.talk.models.json.notifications.NotificationOverall
|
||||||
import com.nextcloud.talk.models.json.participants.AddParticipantOverall
|
import com.nextcloud.talk.models.json.participants.AddParticipantOverall
|
||||||
|
import com.nextcloud.talk.models.json.participants.ParticipantsOverall
|
||||||
import com.nextcloud.talk.models.json.push.PushRegistrationOverall
|
import com.nextcloud.talk.models.json.push.PushRegistrationOverall
|
||||||
import com.nextcloud.talk.models.json.signaling.settings.SignalingSettingsOverall
|
import com.nextcloud.talk.models.json.signaling.settings.SignalingSettingsOverall
|
||||||
import com.nextcloud.talk.models.json.userprofile.UserProfileOverall
|
import com.nextcloud.talk.models.json.userprofile.UserProfileOverall
|
||||||
|
import io.reactivex.Observable
|
||||||
import retrofit2.http.*
|
import retrofit2.http.*
|
||||||
|
|
||||||
interface ApiService {
|
interface ApiService {
|
||||||
|
@GET
|
||||||
|
suspend fun getPeersForCall(@Header("Authorization") authorization: String,
|
||||||
|
@Url url: String): ParticipantsOverall
|
||||||
|
|
||||||
|
@GET
|
||||||
|
suspend fun getNotification(@Header("Authorization") authorization: String,
|
||||||
|
@Url url: String): NotificationOverall
|
||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@PUT
|
@PUT
|
||||||
suspend fun setPasswordForConversation(@Header("Authorization") authorization: String,
|
suspend fun setPasswordForConversation(@Header("Authorization") authorization: String,
|
||||||
|
@ -46,6 +46,7 @@ import com.nextcloud.talk.newarch.domain.repository.online.NextcloudTalkReposito
|
|||||||
import com.nextcloud.talk.newarch.utils.NetworkUtils
|
import com.nextcloud.talk.newarch.utils.NetworkUtils
|
||||||
import com.nextcloud.talk.newarch.utils.NetworkUtils.GetProxyRunnable
|
import com.nextcloud.talk.newarch.utils.NetworkUtils.GetProxyRunnable
|
||||||
import com.nextcloud.talk.newarch.utils.NetworkUtils.MagicAuthenticator
|
import com.nextcloud.talk.newarch.utils.NetworkUtils.MagicAuthenticator
|
||||||
|
import com.nextcloud.talk.newarch.utils.NextcloudRepositoryWithNoCookies
|
||||||
import com.nextcloud.talk.utils.LoggingUtils
|
import com.nextcloud.talk.utils.LoggingUtils
|
||||||
import com.nextcloud.talk.utils.preferences.AppPreferences
|
import com.nextcloud.talk.utils.preferences.AppPreferences
|
||||||
import com.nextcloud.talk.utils.singletons.AvatarStatusCodeHolder
|
import com.nextcloud.talk.utils.singletons.AvatarStatusCodeHolder
|
||||||
@ -87,10 +88,15 @@ val NetworkModule = module {
|
|||||||
single { createOkHttpClient(androidContext(), get(), get(), get(), get(), get(), get(), get()) }
|
single { createOkHttpClient(androidContext(), get(), get(), get(), get(), get(), get(), get()) }
|
||||||
factory { createApiErrorHandler() }
|
factory { createApiErrorHandler() }
|
||||||
single { createNextcloudTalkRepository(get()) }
|
single { createNextcloudTalkRepository(get()) }
|
||||||
|
single { createNexcloudRepositoryWithNoCookies(get(), get())}
|
||||||
single { createImageLoader(androidApplication(), get()) }
|
single { createImageLoader(androidApplication(), get()) }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun createNexcloudRepositoryWithNoCookies(okHttpClient: OkHttpClient, retrofit: Retrofit): NextcloudRepositoryWithNoCookies {
|
||||||
|
return NextcloudRepositoryWithNoCookies(okHttpClient, retrofit)
|
||||||
|
}
|
||||||
|
|
||||||
fun createCookieManager(): CookieManager {
|
fun createCookieManager(): CookieManager {
|
||||||
val cookieManager = CookieManager()
|
val cookieManager = CookieManager()
|
||||||
cookieManager.setCookiePolicy(ACCEPT_ALL)
|
cookieManager.setCookiePolicy(ACCEPT_ALL)
|
||||||
|
@ -51,9 +51,22 @@ val UseCasesModule = module {
|
|||||||
single { createCreateConversationUseCase(get(), get()) }
|
single { createCreateConversationUseCase(get(), get()) }
|
||||||
single { createAddParticipantToConversationUseCase(get(), get()) }
|
single { createAddParticipantToConversationUseCase(get(), get()) }
|
||||||
single { setConversationPasswordUseCase(get(), get()) }
|
single { setConversationPasswordUseCase(get(), get()) }
|
||||||
|
factory { getPeersForCallUseCase(get(), get()) }
|
||||||
|
factory { getNotificationUseCase(get(), get()) }
|
||||||
factory { createChatViewModelFactory(get(), get(), get(), get(), get(), get()) }
|
factory { createChatViewModelFactory(get(), get(), get(), get(), get(), get()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getNotificationUseCase(nextcloudTalkRepository: NextcloudTalkRepository,
|
||||||
|
apiErrorHandler: ApiErrorHandler): GetNotificationUseCase {
|
||||||
|
return GetNotificationUseCase(nextcloudTalkRepository, apiErrorHandler)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getPeersForCallUseCase(nextcloudTalkRepository: NextcloudTalkRepository,
|
||||||
|
apiErrorHandler: ApiErrorHandler): GetPeersForCallUseCase {
|
||||||
|
return GetPeersForCallUseCase(nextcloudTalkRepository, apiErrorHandler)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fun setConversationPasswordUseCase(nextcloudTalkRepository: NextcloudTalkRepository,
|
fun setConversationPasswordUseCase(nextcloudTalkRepository: NextcloudTalkRepository,
|
||||||
apiErrorHandler: ApiErrorHandler): SetConversationPasswordUseCase {
|
apiErrorHandler: ApiErrorHandler): SetConversationPasswordUseCase {
|
||||||
return SetConversationPasswordUseCase(nextcloudTalkRepository, apiErrorHandler)
|
return SetConversationPasswordUseCase(nextcloudTalkRepository, apiErrorHandler)
|
||||||
|
@ -26,14 +26,18 @@ import com.nextcloud.talk.models.json.capabilities.CapabilitiesOverall
|
|||||||
import com.nextcloud.talk.models.json.conversations.Conversation
|
import com.nextcloud.talk.models.json.conversations.Conversation
|
||||||
import com.nextcloud.talk.models.json.conversations.ConversationOverall
|
import com.nextcloud.talk.models.json.conversations.ConversationOverall
|
||||||
import com.nextcloud.talk.models.json.generic.GenericOverall
|
import com.nextcloud.talk.models.json.generic.GenericOverall
|
||||||
|
import com.nextcloud.talk.models.json.notifications.NotificationOverall
|
||||||
import com.nextcloud.talk.models.json.participants.AddParticipantOverall
|
import com.nextcloud.talk.models.json.participants.AddParticipantOverall
|
||||||
import com.nextcloud.talk.models.json.participants.Participant
|
import com.nextcloud.talk.models.json.participants.Participant
|
||||||
|
import com.nextcloud.talk.models.json.participants.ParticipantsOverall
|
||||||
import com.nextcloud.talk.models.json.push.PushRegistrationOverall
|
import com.nextcloud.talk.models.json.push.PushRegistrationOverall
|
||||||
import com.nextcloud.talk.models.json.signaling.settings.SignalingSettingsOverall
|
import com.nextcloud.talk.models.json.signaling.settings.SignalingSettingsOverall
|
||||||
import com.nextcloud.talk.models.json.userprofile.UserProfileOverall
|
import com.nextcloud.talk.models.json.userprofile.UserProfileOverall
|
||||||
import com.nextcloud.talk.newarch.local.models.UserNgEntity
|
import com.nextcloud.talk.newarch.local.models.UserNgEntity
|
||||||
|
|
||||||
interface NextcloudTalkRepository {
|
interface NextcloudTalkRepository {
|
||||||
|
suspend fun getNotificationForUser(user: UserNgEntity, notificationId: String): NotificationOverall
|
||||||
|
suspend fun getPeersForCall(user: UserNgEntity, conversationToken: String): ParticipantsOverall
|
||||||
suspend fun setPasswordForConversation(user: UserNgEntity, conversationToken: String, password: String): GenericOverall
|
suspend fun setPasswordForConversation(user: UserNgEntity, conversationToken: String, password: String): GenericOverall
|
||||||
suspend fun addParticipantToConversation(user: UserNgEntity, conversationToken: String, participantId: String, source: String): AddParticipantOverall
|
suspend fun addParticipantToConversation(user: UserNgEntity, conversationToken: String, participantId: String, source: String): AddParticipantOverall
|
||||||
suspend fun createConversationForUser(user: UserNgEntity, conversationType: Int, invite: String?, source: String?, conversationName: String?): ConversationOverall
|
suspend fun createConversationForUser(user: UserNgEntity, conversationType: Int, invite: String?, source: String?, conversationName: String?): ConversationOverall
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* * Nextcloud Talk application
|
||||||
|
* *
|
||||||
|
* * @author Mario Danic
|
||||||
|
* * Copyright (C) 2017-2020 Mario Danic <mario@lovelyhq.com>
|
||||||
|
* *
|
||||||
|
* * 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 com.nextcloud.talk.newarch.domain.usecases
|
||||||
|
|
||||||
|
import com.nextcloud.talk.models.json.notifications.NotificationOverall
|
||||||
|
import com.nextcloud.talk.newarch.data.source.remote.ApiErrorHandler
|
||||||
|
import com.nextcloud.talk.newarch.domain.repository.online.NextcloudTalkRepository
|
||||||
|
import com.nextcloud.talk.newarch.domain.usecases.base.UseCase
|
||||||
|
import org.koin.core.parameter.DefinitionParameters
|
||||||
|
|
||||||
|
class GetNotificationUseCase constructor(
|
||||||
|
private val nextcloudTalkRepository: NextcloudTalkRepository,
|
||||||
|
apiErrorHandler: ApiErrorHandler?
|
||||||
|
) : UseCase<NotificationOverall, Any?>(apiErrorHandler) {
|
||||||
|
override suspend fun run(params: Any?): NotificationOverall {
|
||||||
|
val definitionParameters = params as DefinitionParameters
|
||||||
|
return nextcloudTalkRepository.getNotificationForUser(definitionParameters[0], definitionParameters[0])
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* * Nextcloud Talk application
|
||||||
|
* *
|
||||||
|
* * @author Mario Danic
|
||||||
|
* * Copyright (C) 2017-2020 Mario Danic <mario@lovelyhq.com>
|
||||||
|
* *
|
||||||
|
* * 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 com.nextcloud.talk.newarch.domain.usecases
|
||||||
|
|
||||||
|
import com.nextcloud.talk.models.json.participants.ParticipantsOverall
|
||||||
|
import com.nextcloud.talk.newarch.data.source.remote.ApiErrorHandler
|
||||||
|
import com.nextcloud.talk.newarch.domain.repository.online.NextcloudTalkRepository
|
||||||
|
import com.nextcloud.talk.newarch.domain.usecases.base.UseCase
|
||||||
|
import org.koin.core.parameter.DefinitionParameters
|
||||||
|
|
||||||
|
class GetPeersForCallUseCase constructor(
|
||||||
|
private val nextcloudTalkRepository: NextcloudTalkRepository,
|
||||||
|
apiErrorHandler: ApiErrorHandler?
|
||||||
|
) : UseCase<ParticipantsOverall, Any?>(apiErrorHandler) {
|
||||||
|
override suspend fun run(params: Any?): ParticipantsOverall {
|
||||||
|
val definitionParameters = params as DefinitionParameters
|
||||||
|
return nextcloudTalkRepository.getPeersForCall(definitionParameters[0], definitionParameters[1])
|
||||||
|
}
|
||||||
|
}
|
@ -33,6 +33,7 @@ import java.net.Proxy.Type
|
|||||||
import java.net.Proxy.Type.SOCKS
|
import java.net.Proxy.Type.SOCKS
|
||||||
|
|
||||||
class NetworkUtils {
|
class NetworkUtils {
|
||||||
|
|
||||||
class HeadersInterceptor : Interceptor {
|
class HeadersInterceptor : Interceptor {
|
||||||
|
|
||||||
@Throws(IOException::class)
|
@Throws(IOException::class)
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* * Nextcloud Talk application
|
||||||
|
* *
|
||||||
|
* * @author Mario Danic
|
||||||
|
* * Copyright (C) 2017-2020 Mario Danic <mario@lovelyhq.com>
|
||||||
|
* *
|
||||||
|
* * 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 com.nextcloud.talk.newarch.utils
|
||||||
|
|
||||||
|
import com.nextcloud.talk.newarch.data.repository.online.NextcloudTalkRepositoryImpl
|
||||||
|
import com.nextcloud.talk.newarch.data.source.remote.ApiService
|
||||||
|
import com.nextcloud.talk.newarch.domain.repository.online.NextcloudTalkRepository
|
||||||
|
import okhttp3.JavaNetCookieJar
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
import org.koin.core.KoinComponent
|
||||||
|
import retrofit2.Retrofit
|
||||||
|
import java.net.CookieManager
|
||||||
|
|
||||||
|
class NextcloudRepositoryWithNoCookies(
|
||||||
|
private val okHttpClient: OkHttpClient,
|
||||||
|
private val retrofit: Retrofit
|
||||||
|
) : KoinComponent {
|
||||||
|
fun getRepository(): NextcloudTalkRepository {
|
||||||
|
return NextcloudTalkRepositoryImpl(retrofit.newBuilder().client(
|
||||||
|
okHttpClient.newBuilder().cookieJar(JavaNetCookieJar(CookieManager())).build())
|
||||||
|
.build().create(ApiService::class.java))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -91,7 +91,7 @@ object NotificationUtils {
|
|||||||
|
|
||||||
fun getNotificationChannelId(context: Context, channelName: String,
|
fun getNotificationChannelId(context: Context, channelName: String,
|
||||||
channelDescription: String, enableLights: Boolean,
|
channelDescription: String, enableLights: Boolean,
|
||||||
importance: Int, sound: Uri, audioAttributes: AudioAttributes, vibrationPattern: LongArray?, bypassDnd: Boolean, lockScreenVisibility: Integer?): String {
|
importance: Int, sound: Uri, audioAttributes: AudioAttributes, vibrationPattern: LongArray?, bypassDnd: Boolean, lockScreenVisibility: Int?): String {
|
||||||
val channelId = Objects.hash(channelName, channelDescription, enableLights, importance, sound, audioAttributes, vibrationPattern, bypassDnd, lockScreenVisibility).toString()
|
val channelId = Objects.hash(channelName, channelDescription, enableLights, importance, sound, audioAttributes, vibrationPattern, bypassDnd, lockScreenVisibility).toString()
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O) {
|
||||||
@ -106,7 +106,7 @@ object NotificationUtils {
|
|||||||
channelId: String, channelName: String,
|
channelId: String, channelName: String,
|
||||||
channelDescription: String, enableLights: Boolean,
|
channelDescription: String, enableLights: Boolean,
|
||||||
importance: Int, sound: Uri, audioAttributes: AudioAttributes,
|
importance: Int, sound: Uri, audioAttributes: AudioAttributes,
|
||||||
vibrationPattern: LongArray?, bypassDnd: Boolean = false, lockScreenVisibility: Integer?) {
|
vibrationPattern: LongArray?, bypassDnd: Boolean = false, lockScreenVisibility: Int?) {
|
||||||
|
|
||||||
val notificationManagerCompat = NotificationManagerCompat.from(context)
|
val notificationManagerCompat = NotificationManagerCompat.from(context)
|
||||||
if (notificationManagerCompat.getNotificationChannel(channelId) == null) {
|
if (notificationManagerCompat.getNotificationChannel(channelId) == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user