Added missing start at boot feature

This commit is contained in:
Sylvain Berfini 2024-08-06 11:39:05 +02:00
parent bc38ff19b6
commit a136b7da8b
3 changed files with 63 additions and 1 deletions

View file

@ -29,9 +29,11 @@ Group changes to describe their impact on the project, as follows:
### Added ### 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). - 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. - 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. - 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. - 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. - 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. - 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). - 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. - 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 ### Fixed
- No longer trying to play vocal messages & call recordings using bluetooth when connected to an Android Auto car, causing playback issues. - 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 ## [5.2.5] - 2024-05-03

View file

@ -34,9 +34,14 @@
without it app won't be able to access network if data saver is ON (for example) --> 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" /> <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 <!-- 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" /> <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 <application
android:name=".LinphoneApplication" android:name=".LinphoneApplication"
android:allowBackup="true" android:allowBackup="true"
@ -203,6 +208,14 @@
android:enabled="true" android:enabled="true"
android:exported="false" /> 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 --> <!-- Providers -->
<provider <provider

View 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
}
}