Skip to content

ToastAndroid not showing on Android API 28 but working on Android API 23 #26531

Description

@Bradzer

On Android API 23, the following code shows both toasts when the condition is met :

    onWillBlur = () => {
        if(!this.store.isNoVocabulary && !this.store.isReviewOver) {
            ToastAndroid.show(AppConstants.TOAST_UNEXPECTED_LEAVE, ToastAndroid.SHORT)
            ToastAndroid.show(AppConstants.TOAST_WORD_NOT_REMEMBERED, ToastAndroid.SHORT)
        }

On Android API 28, only the second toast is shown when the condition is met :

    onWillBlur = () => {
        if(!this.store.isNoVocabulary && !this.store.isReviewOver) {
            ToastAndroid.show(AppConstants.TOAST_UNEXPECTED_LEAVE, ToastAndroid.SHORT)
            ToastAndroid.show(AppConstants.TOAST_WORD_NOT_REMEMBERED, ToastAndroid.SHORT)
        }

React Native version:

System:
OS: Linux 4.15 Linux Mint 19.1 (Tessa)
CPU: (4) x64 Intel(R) Core(TM) i5-3340M CPU @ 2.70GHz
Memory: 519.38 MB / 7.66 GB
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 10.15.1 - ~/Documents/nodejs/bin/node
npm: 6.8.0 - ~/Documents/nodejs/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28
Build Tools: 27.0.3, 28.0.2, 28.0.3
System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-24 | Google APIs Intel x86 Atom_64, android-25 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom_64, android-27 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom_64
npmPackages:
react: 16.8.6 => 16.8.6
react-native: ^0.60.5 => 0.60.5

Describe what you expected to happen: I expected both toasts to show on my Android API 28 device just like it does on Android API 23

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions