Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to determine default activity for com.testapp #273

Open
2 tasks
jnjdev42 opened this issue May 21, 2024 · 1 comment
Open
2 tasks

Unable to determine default activity for com.testapp #273

jnjdev42 opened this issue May 21, 2024 · 1 comment

Comments

@jnjdev42
Copy link

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)

  1. install package
  2. 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

@GorArestakesyan
Copy link

is your app crashing when call restart?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants