mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Added missing start at boot feature
This commit is contained in:
parent
bc38ff19b6
commit
a136b7da8b
3 changed files with 63 additions and 1 deletions
|
|
@ -29,9 +29,11 @@ Group changes to describe their impact on the project, as follows:
|
|||
### Added
|
||||
- Contacts trust: contacts for which all devices have been validated through a ZRTP call with SAS exchange are now highlighted with a blue circle (and with a red one in case of mistrust). That trust is now handled at contact level (instead of conversation level in previous versions).
|
||||
- Media & documents exchanged in a conversation can be easily found through a dedicated screen.
|
||||
- A brand new chat message research has been added to conversations.
|
||||
- You can now react to a chat message using any emoji.
|
||||
- Screen sharing in conference: only desktop app starting with 6.0 version is able to start it, but on mobiles you'll be able to see it.
|
||||
- Chat while in call: a shortcut to a conversation screen with the remote.
|
||||
- You can choose whatever ringtone you'd like for incoming calls (in Android notification channel settings).
|
||||
- Security focus: security & trust is more visible than ever, and unsecure conversations & calls are even more visible than before.
|
||||
- CardDAV: you can configure as many CardDAV servers you want to synchronize you contacts in Linphone (in addition or in replacement of native addressbook import).
|
||||
- OpenID: when used with a SSO compliant SIP server (such as Flexisip), we support single-sign-on login.
|
||||
|
|
@ -46,6 +48,7 @@ Group changes to describe their impact on the project, as follows:
|
|||
|
||||
### Fixed
|
||||
- No longer trying to play vocal messages & call recordings using bluetooth when connected to an Android Auto car, causing playback issues.
|
||||
- AAudio driver no longer causes delay when switching between devices (SDK fix).
|
||||
|
||||
## [5.2.5] - 2024-05-03
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,14 @@
|
|||
without it app won't be able to access network if data saver is ON (for example) -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
||||
<!-- Needed to keep a permanent foreground service and keep app alive to be able to receive
|
||||
messages & calls for third party accounts for which push notifications aren't available -->
|
||||
messages & calls for third party accounts for which push notifications aren't available,
|
||||
and starting Android 15 dataSync is limited to 6 hours per day
|
||||
and can't be used with RECEIVE_BOOT_COMPLETED intent either -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
||||
|
||||
<!-- Needed for auto start at boot if keep alive service is enabled -->
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
|
||||
<application
|
||||
android:name=".LinphoneApplication"
|
||||
android:allowBackup="true"
|
||||
|
|
@ -203,6 +208,14 @@
|
|||
android:enabled="true"
|
||||
android:exported="false" />
|
||||
|
||||
<receiver android:name=".core.BootReceiver"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!-- Providers -->
|
||||
|
||||
<provider
|
||||
|
|
|
|||
46
app/src/main/java/org/linphone/core/BootReceiver.kt
Normal file
46
app/src/main/java/org/linphone/core/BootReceiver.kt
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright (c) 2010-2024 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.core
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||
import org.linphone.core.tools.Log
|
||||
|
||||
class BootReceiver : BroadcastReceiver() {
|
||||
companion object {
|
||||
private const val TAG = "[Boot Receiver]"
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
val keepAlive = corePreferences.keepServiceAlive
|
||||
if (intent.action.equals(Intent.ACTION_BOOT_COMPLETED, ignoreCase = true)) {
|
||||
Log.i(
|
||||
"$TAG Device boot completed, keep alive service is ${if (keepAlive) "enabled" else "disabled"}"
|
||||
)
|
||||
} else if (intent.action.equals(Intent.ACTION_MY_PACKAGE_REPLACED, ignoreCase = true)) {
|
||||
Log.i(
|
||||
"$TAG App has been updated, keep alive service is ${if (keepAlive) "enabled" else "disabled"}"
|
||||
)
|
||||
}
|
||||
// Starting the keep alive service will be done by CoreContext directly
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue