title: EXPO. Notifications do not popup
body: <p><code>&quot;expo&quot;: &quot;^39.0.0&quot;</code> / Library - expo-notifications.</p>
  <p>Since moving to the new API, I have been facing various problems. I fixed problems with the icon, with receiving a notification in apk, with  handlers, and now I could not find an answer to this question.</p>
  <p>I have 3 phones <em><strong>Samsung Galaxy S9+</strong></em> with <code>Android 10</code>, <em><strong>Xiaomi Redmi 4x</strong></em> with <code>Android 7.12 N2G47H MIUI 10 Global 9.6.27</code> and <em><strong>Xiaomi Redmi Note 4 Global</strong></em> <code>Android 7.0 nrd90m MIUI global 11.0.2</code>.</p>
  <p>Samsung Galaxy S9+. With my current config i receive notification
  excellent as it should be:</p>
  <ul>
  <li>Vibration +</li>
  <li>Sound +</li>
  <li>Popup when notification comes +</li>
  </ul>
  <p><strong>All this come from the box, i do not need to ask permissions or something like that.</strong></p>
  <p>Xiaomi Redmi 4x and Xiaomi Redmi Note 4.
  With my current config i have problems:</p>
  <ul>
  <li>Vibration - <strong>do not work both in both published and apk(standalone) versions</strong></li>
  <li>Sound +</li>
  <li>Popup when notification comes +</li>
  </ul>
  <p><strong>AND THE MAIN PROBLEM: All this DO NOT come from the box, I need to manually give permission for notifications to pop up, sound, etc.</strong></p>
  <p>My app.json :</p>
  <pre><code>{
    &quot;expo&quot;: {
      &quot;name&quot;: &quot;qwert&quot;,
      &quot;slug&quot;: &quot;qwert&quot;,
      &quot;version&quot;: &quot;1.1.2&quot;,
      &quot;orientation&quot;: &quot;portrait&quot;,
      &quot;icon&quot;: &quot;./src/assets/images/logo1024.png&quot;,
      &quot;scheme&quot;: &quot;myapp&quot;,
      &quot;userInterfaceStyle&quot;: &quot;automatic&quot;,
      &quot;privacy&quot;: &quot;unlisted&quot;,
      &quot;splash&quot;: {
        &quot;image&quot;: &quot;./src/assets/images/splashScreen.png&quot;,
        &quot;resizeMode&quot;: &quot;contain&quot;,
        &quot;backgroundColor&quot;: &quot;#f1f0f0&quot;
      },
      &quot;android&quot;: {
        &quot;package&quot;: &quot;com.qwert.app&quot;,
        &quot;googleServicesFile&quot;: &quot;./google-services.json&quot;,
        &quot;versionCode&quot;: 1,
        &quot;useNextNotificationsApi&quot;: true
      },
      &quot;notification&quot;: {
        &quot;icon&quot;: &quot;./src/assets/images/VIAicon96.png&quot;,
        &quot;color&quot;: &quot;#8edcd5&quot;,
        &quot;androidMode&quot;: &quot;collapse&quot;
      },
      &quot;updates&quot;: {
        &quot;fallbackToCacheTimeout&quot;: 0
      },
      &quot;assetBundlePatterns&quot;: [
        &quot;**/*&quot;
      ],
      &quot;ios&quot;: {
        &quot;supportsTablet&quot;: true
      },
      &quot;web&quot;: {
        &quot;favicon&quot;: &quot;./assets/images/favicon.png&quot;
      },
      &quot;description&quot;: &quot;&quot;
    }
  }
  </code></pre>
  <p>My permissions/configs:</p>
  <pre><code>import Constants from 'expo-constants';
  import * as Notifications from 'expo-notifications';
  import * as Permissions from 'expo-permissions';
  import { Platform } from 'react-native';
  
  Notifications.setNotificationHandler({
    handleNotification: async () =&gt; ({
      shouldShowAlert: true,
      shouldPlaySound: true,
      shouldSetBadge: true,
    }),
  });
  
  export const registerForPushNotificationsAsync = async () =&gt; {
    let token;
    if (Constants.isDevice) {
      const { status: existingStatus } = await Permissions.getAsync(
        Permissions.NOTIFICATIONS,
      );
      let finalStatus = existingStatus;
      if (existingStatus !== 'granted') {
        const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS);
        finalStatus = status;
      }
      if (finalStatus !== 'granted') {
        console.log('Failed to get push token for push notification!');
        return;
      }
      token = (await Notifications.getExpoPushTokenAsync()).data;
      console.log(token);
    } else {
      console.log('Must use physical device for Push Notifications');
    }
  
    if (Platform.OS === 'android') {
      Notifications.setNotificationChannelAsync('default', {
        name: 'default',
        importance: Notifications.AndroidImportance.MAX,
        vibrationPattern: [0, 250, 250, 250],
        lightColor: '#FF231F7C',
      });
    }
    // eslint-disable-next-line consistent-return
    return token;
  };
  </code></pre>
  <p>Also, place where use all this:</p>
  <pre><code>  useEffect(() =&gt; {
      const handleNotification = async () =&gt; {
        await getPermitsAndIntegrateIntoApp(store);  // works great
      };
      const setPersistDataToStore = async () =&gt; {
        const EXPO_PUSH_TOKEN = await registerForPushNotificationsAsync();
        const qwertyyy = await getConfig(Constants.deviceId, EXPO_PUSH_TOKEN);
        store.setQwerrt(config.destinations);
      };
      setPersistDataToStore();
  
      Notifications.addNotificationReceivedListener(handleNotification);
  
      return () =&gt; Notifications.removeAllNotificationListeners();
    }, [store]);
  </code></pre>
  <p>On all 3 phones I have a logic for handling notifications ( send request, updates store, and updates screen on my app). It works correct.</p>
  <p><strong>How to automatically configure the permission to show push notifications? How to enable vibration on Xiaomi?</strong></p>