Try it
notifiertoast.aia (1.5 KB)
ShowAlert works with Button my place too, but not with ListPicker
works for me with listpicker on Android 11
I tried even simpler example, and it does not show up the alert.
Could you verify at your place?
alertTest.aia (7.4 KB)
Yes, it works for me, on Android 11 companion mode.
But you do need to add at least one element to select from your listpicker, in order to fire the afterPicking event!
Deprecated does not mean, that it does not work anymore...
What does not work anymore is the ShowAlert method together with using the close application event, see here
Taifun
The question is, does it still work after building the app?
Taifun
Yes it does
but i have tried on my android 11 device it doesn't work at all
you forgot to tell us, what exactly you are testing...
EDIT: which device are you using for your tests?
try the example project
together with
Taifun
PS: I removed the checkmark for the "solution"
has the target API of that aia been changed?
because if the target API is changed to 29 it can indeed work on android 11
Samsung Galaxy A52 "Real Device not emulator"
Sorry if this is a lame question, but how you change the target API?
I can confirm that ShowAlert works in AfterPicking event if the list is not empty.
But, ShowAlert does not work in BeforePicking event
I find that too, it is probably a timing issue. You can work around this with a clock (tested at 100ms)
you can do that by using APK Editor Studio (Only For APK file)
Target SDK doesn't do anything here. If an API is deprecated it will still be deprecated even if you target a lower SDK.
Okay, now I understand,
but do you know what causes CustomToast to work on Android level 11?
It is probably in here:
the system blocks toasts that contain custom views if those toasts are sent from the background by an app that targets Android 11 or higher
Is the AI2 notifier not sending the toast from the background?
According to the code I saw AI2 notifier sending toast from the background,
because if notifier is not sending toast from background then AI2 doesn't need to use Class Toast
(use canvas to show toast)