Open
Description
Description
Is this a bug report or a feature request?
- [ x] Bug Report
- Feature Request
Library Version:
React Native Version:
Platform(s):
- iOS
- [ x] Android
Description:
Got an error when calling restart() function :
"Unable to determine default activity for com.testapp. Does an activity specify the DEFAULT category in its intent filter?"
Steps to Reproduce (for bugs)
- install package
- call restart function
Expected Behavior:
App should restart.
Actual Behavior:
Got an error on phone.
Reproducible Demo (for bugs)
import RNRestart from 'react-native-restart';
const VerificationCodeScreen = ({ navigation }: VerificationCodeScreenProps) => {
const { updateAuth0Config } = useAuth0Config();
const verifyCode = async () => {
await updateAuth0Config('hey', 'yo');
RNRestart.restart();
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<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="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data
android:scheme="scheme"
android:host="host"
android:pathPrefix="/android/com.testapp/callback"/>
</intent-filter>
</activity>
</application>
</manifest>
Your Environment
Windows.
VIsual Studio Code
Node version v20.13.1
npm v8.6.0
Metadata
Metadata
Assignees
Labels
No labels