henninghall / react-native-date-picker

React Native Date Picker is datetime picker for Android and iOS. It includes date, time and datetime picker modes. The datepicker is customizable and is supporting different languages. It's written with native code to achieve the best possible look, feel and performance.
MIT License
2.25k stars 346 forks source link

TimePicker not working on Android devices, UI blocked #854

Closed BruceSuperProgramer closed 2 months ago

BruceSuperProgramer commented 2 months ago

Describe the bug

The TimePicker component is sometimes not working on Android devices. When the user attempts to select a time, the picker opens, but they are unable to make a selection. It appears that something overlays on top of the picker, blocking further UI interaction. As a result, the user is forced to restart the app to restore normal functionality.

Expected behavior The TimePicker should allow the user to select a time without any issues, and the UI should remain responsive. To Reproduce After using picker multiple times, I am able to replicate this issue, it only happen to release APK.

My AndroidManifest.xml Debug

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

    <application
        android:usesCleartextTraffic="true"
        tools:targetApi="28"
        tools:ignore="GoogleAppIndexingWarning">
        <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
    </application>
</manifest>

Release

<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
        android:launchMode="singleTask"
        android:windowSoftInputMode="adjustPan"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity"
        android:exported="true"/>
    </application>
</manifest>

Lib versions I tried both versions, theyboth have this issue.

Screenshot 2024-09-04 at 11 30 42 AM

I also tested this on my Samsung S10+ device and was able to replicate the issue.

Image from emulator (It appears that an overlay is covering the TimePicker, preventing users from interacting with it):

Screenshot 2024-09-04 at 11 27 37 AM Screenshot 2024-09-04 at 11 27 18 AM
BruceSuperProgramer commented 2 months ago

I saw we are using react-native-date-picker inside another lib package which means issue might not arise from react-native-date-picker, I am investigating the issue at moment I will close this report for the time being.