Up until Android Pie, when I sent multiple Toast messages sequentially, they were all displayed sequentially. On my API 28 emulator, when I send multiple Toasts at the same time, only the last one is shown.
Is this a behavior change across Android P?
Related
I'd like to implement daily local notifications, at the same time each day, but with different content. All examples I have seen are with repeating the same content.
In Android I can set an alarm to trigger a portion of my app which then creates the custom content for the day, and pushes that content as notification. How do I do the same in iOS?
The backend of this app was made with ExtJS. The frontend is Objective-C, where the webpages are displayed with a WKWebView. It is legacy, and there is no documentation or people with knowledge or experience within the company regarding the app.
My app freezes when I select a new time picker.
I have multiple (4) native time pickers on one screen, which are displayed in a web page through WKWebView.
Whenever the user closes the picker by selecting the screen anywhere but on the picker, and choosing another one of the remaining three relatively quickly (within 1 second), the app freezes.
The app will not freeze:
When the same date picker is selected.
When the user selects 'Done'.
When the user waits 1 to 2 seconds before selecting a new time picker.
The time pickers work fine on any device older than, but not including, iOS 15.
On iOS 15 and above, the freezing only occurs when the OS is iOS (phone), but never on iPadOS.
I have tried setting definesPresentationContext to true, but to no avail.
I could not find any other developers with this kind of issue on the internet, which is why im resorting to StackOverflow.
The error that arises:
[Presentation] Attempt to present <_UIDatePickerContainerViewController: 0x15303b6e0> on <ViewController: 0x150d068f0> (from <ViewController: 0x150d068f0>) which is already presenting <_UIDatePickerContainerViewController: 0x150e16650>.
So my question is, is there anyone else that has experienced freezing because of time pickers on iOS15+ with phones only?
As I have developed a solution for people with Alzheimer’s, Dementia and for instance an Autisme Spectrum Disorder, that normally is shown on tablets (see www.dontforgetit.eu), I have made also an Android APP to be installed on a SmartWatch.
This app is developed with Android Studio and has an HTML5 background (as for the tablets).
What I do is I start with a page that needs to be tapped. It vibrates and that goes to the actual HTML5 page showing upcoming appointments and other obligations. The maximum ages shown is three (a clock, the actual event and the upcoming event). The upcoming event is only shown 5 minutes before the actual event terminates. Three minutes before the actual event stops and the upcoming events starts, the SmartWatch needs to vibrate.
For that reason I start with the earlier mentioned start page. However I get the following message "Blocked call to navigator.vibrate because user hasn't tapped on the frame or any embedded frame yet: https://www.chromestatus.com/feature/5644273861001216.” and the Watch doesn’t vibrate.
How do I solve this problem, preventing the disabled person to continue tapping the Watch?
My scenario that I need to show the first Local Notification using Swift and then using the same identifier add another Local Notification, but without showing it as a popup in iOS device. So basically the flow would be like this:
Starting upload... <-- Show on the screen and adds to the Tray bar
Uploading photos... <-- Does not shows on the screen, but clears all the notifications and add another one in Tray bar silently (or changes previous one)
Uploading data... <-- Same as Uploading photos...
Finished uploading... <-- Same as Uploading photos...
Tried different ways, on Android it is not hard to do that, but iOS makes everything hard to do, is it even possible? :)
Thanks!
The reason it works on Android is because the "state showing" notifications are very Android thing. iOS is not designed for this kind of stuff because you almost never do something in the background of an app that also needs to be reflected to the user while user is outside of an app. So the real answer to your question is no. In iOS environment it is not possible to simulate Android way of showing status changes in a notification.
How is it possible to wake the application from code?
I am writing a simple timer and when time goes out it displays picture on main activity. But this means that application should stay on screen all the time. If user switches to another app (or simply presses Home) my Activity is no longer visible and I need to show it on screen again (switch back to my application) in the way similar to standard Android Phone or Timer pops up.
So there actually are 2 questions:
How to get application on "top" of screen?
How to correctly display application when screen is locked?
For that you would need a service that starts your activity when that timer triggers.
You can take a look at the Android Alarm Clock source code for how to have an Activity Shown even on the lock screen: https://github.com/android/platform_packages_apps_alarmclock/blob/master/src/com/android/alarmclock/AlarmAlertFullScreen.java
Note especially lines 85 to 90, here flags are added so that it is allowed to be shown on the Lock Screen. This should of course work with Mono for Android as well.
There is also a nice answer here to your questions: Wake Android Device up
It should be fairly easy to port to Mono for Android.