B4X FEED Problems with notification, FindNextTime and SDK 31

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: Problems with notification, FindNextTime and SDK 31 است. این موضوع تا کنون 28 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع Problems with notification, FindNextTime and SDK 31
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
28
پسندها
0
آخرین ارسال توسط PracticalSoft
Jun 6, 2020
11,559
4,422
For several years I use this code in my apps to show a notification every day at the morning and night.
[H3] [/H3]
Name: Find the next scheduled time. Description by example: You need to start a service each day at 5 am, 6:30 am and 8 pm. You need to find the ticks values of the next scheduled time, either today or tomorrow if it is after 8pm. Dim t As Long = FindNextTime(Array As Double(5, 6.5, 20))...
برای دیدن تصاویر باید ثبت نام کنید


Now I created a new app - that requires SDK 31 in play store - and don't work anymore.
I get the error below (Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.).

I made this changes:
1 - Use StartServiceAtExact and add to manifest editor:
AddPermission(android.permission.SCHEDULE_EXACT_ALARM)
[H3] [/H3]
There are several versioned components that affect the compilation process and the runtime behavior of our apps. The purpose of this tutorial is to explain the differences between them and help you choose which version to use. Each Android version is mapped to an api level. You can see this...
برای دیدن تصاویر باید ثبت نام کنید


2 - Try to set the automatic foreground mode to NEVER:
[H3] [/H3]
Hello, I am upgrading a widget-enabled app to targetSDK 31. When I install the widget, it does not load and I get an error. java.lang.RuntimeException: Unable to start receiver com.tempusumbra.solarwidget.solarw4x2$solarw4x2_BR: android.app.ForegroundServiceStartNotAllowedException...
برای دیدن تصاویر باید ثبت نام کنید


3 - Update the core:
try the attached update - 11.81...



 

عقب
بالا