Hi,
By setting up a Receiver to launch a periodic task (for example, for testing every 30 minutes).
With a :
- Samsung Galaxy A13 / Android 14: alarm OK every 30 minutes
- Xiaomi Redmi A3 / Android 15: alarm KO
I have the impression that the Receiver's behavior is erratic. Is this a restriction on Android 15?
Have you ever encountered this type of problem? (i use SDK 36)
By setting up a Receiver to launch a periodic task (for example, for testing every 30 minutes).
With a :
- Samsung Galaxy A13 / Android 14: alarm OK every 30 minutes
- Xiaomi Redmi A3 / Android 15: alarm KO
I have the impression that the Receiver's behavior is erratic. Is this a restriction on Android 15?
Have you ever encountered this type of problem? (i use SDK 36)
Manifest:
AddManifestText(
<uses-sdk android:minSdkVersion="28" android:targetSdkVersion="36"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:usesCleartextTraffic, "true")
AddPermission(android.permission.POST_NOTIFICATIONS)
AddPermission(android.permission.RECEIVE_BOOT_COMPLETED)
AddReceiverText(ReceiverNotification, <intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>)
'End of default text.
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values, theme.xml,
<resources>
<style
name="LightTheme" parent="@android:style/Theme.Material.Light">
<item name="android:actionMenuTextAppearance">@style/LowerCaseMenu</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:forceDarkAllowed">false</item>
</style>
<style name="LowerCaseMenu" parent="android:TextAppearance.Material.Widget.ActionBar.Menu">
<item name="android:textAllCaps">false</item>
</style>
</resources>
)
ReceiverNotification:
Sub Process_Globals
End Sub
Private Sub Receiver_Receive (FirstTime As Boolean, StartingIntent As Intent)
Log("Service démarré")
'code download + display notification
ScheduleNextDownload
End Sub
Sub ShowNotification(titre As String,detail As String)
Log("Lancement notification")
Dim n As Notification
n.Initialize2(n.IMPORTANCE_HIGH)
n.Icon = "icon_notif"
n.AutoCancel = True
n.SetInfo2(titre,detail,"",Main)
n.Notify(1)
End Sub
Sub ScheduleNextDownload
CancelScheduledService(Me)
Log("Initialise StartReceiverAt")
Dim target As Long = DateTime.Now + DateTime.TicksPerMinute * 30
Log("Prochain téléchargement planifié pour : " & DateTime.Date(target) & "-" & DateTime.Time(target))
StartReceiverAt(Me, target, True)
End Sub
Last edited: