getx icon indicating copy to clipboard operation
getx copied to clipboard

When waking up the app by URL scheme, it has an error.

Open designsharing opened this issue 6 months ago • 6 comments

Describe the bug When waking up the app by URL scheme, it has an error.

**Reproduction code Android config:

<intent-filter>
    <action android:name="android.intent.action.VIEW" />

    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

    <data android:scheme="unq58ip7" />
</intent-filter>

Flutter code:

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      initialRoute: '/init',
      getPages: [
        GetPage(
          participatesInRootNavigator: true,
          maintainState: false,
          name: '/init',
          page: () => const Text('init'),
        ),
      ],
    );
  }
}

HTML code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>wake up app</title>
</head>
<body>
    <div style="display: flex; justify-content: center; align-items: center; height: 200px;">
        <a href="unq58ip7://home"> wake up </a>
    </div>
</body>
</html>

To Reproduce Steps to reproduce the behavior:

  1. Run the app
  2. Kill the app
  3. Click the 'wake up' button
  4. See error

Expected behavior Wake up the app without error.

Screenshots Image

Image

Flutter Version: 3.29.2

Getx Version: 4.7.2

Describe on which device you found the bug: All Android devices.

designsharing avatar Jun 24 '25 05:06 designsharing

I also have this problem, which has been bothering me for a long time

sunfase-io avatar Jun 28 '25 08:06 sunfase-io

I also have this problem, which has been bothering me for a long time

Do you try to migrate to 5.0.0-release-candidate-9.3.2 ?

designsharing avatar Jul 01 '25 12:07 designsharing

I also have this problem, which has been bothering me for a long time

Do you try to migrate to 5.0.0-release-candidate-9.3.2 ?

Not yet

sunfase-io avatar Jul 02 '25 05:07 sunfase-io

I also encountered this problem

hongxiao-arcade avatar Aug 06 '25 07:08 hongxiao-arcade

I have switched to using go_router,signals and get_it. It works very well

sunfase-io avatar Aug 06 '25 08:08 sunfase-io

我也碰到了这个问题,如果没有目标路由, unknownRoute可以解决,如果applinks 有目标路由 还是会报错

LoveYao avatar Sep 01 '25 07:09 LoveYao