- 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]
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]
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]
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...
[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...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید