codelab-android-navigation icon indicating copy to clipboard operation
codelab-android-navigation copied to clipboard

10 Deeplinking to a destinatino does not work on Android 13

Open lvguowei opened this issue 2 years ago • 7 comments

Step 10 does not seem to work on Android 13, I tested on Android 11 and it worked fine.

lvguowei avatar Oct 06 '22 18:10 lvguowei

邮件已经收到了,谢谢!

mtf7101520 avatar Oct 06 '22 18:10 mtf7101520

Also not work on api31

jeonhei avatar Nov 02 '22 03:11 jeonhei

邮件已经收到了,谢谢!

mtf7101520 avatar Nov 02 '22 03:11 mtf7101520

Having the same issue. But actually it seems to ONLY work on Android 11. Tried on 13, 12, 10 and it doesn't work, but works fine on Android 11. :)

rossanafmenezes avatar Apr 05 '23 16:04 rossanafmenezes

邮件已经收到了,谢谢!

mtf7101520 avatar Apr 05 '23 16:04 mtf7101520

In android12 (sdk31) or higher version, I have confirmed that the following error stack is coming up.

========================

java.lang.RuntimeException: Unable to start receiver com.example.android.codelabs.navigation.DeepLinkAppWidgetProvider: java.lang.IllegalArgumentException: com.example.android.codelabs.navigation: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

========================

Updating the navigationVersion from 2.3.5 to 2.5.3 seems to fix the above issue.

However, after entering the deep link, a side effect that could not be moved to the HomeFragment occurred.

  • Side effect contents After deep linking, navigation bottom view doesn't work properly.
  1. After moving to the deep link by clicking the widget,
  2. When the menu of BottomNavigationView is clicked,
  3. The destination id value does not come out properly. (When you click Home, the destination id value does not appear, only the id of the deep-linked location appears)
  • It works normally when entering the app, not deep linking.
  • Normal operation after pressing the back button in the deep link to exit to the back stack

what could be the problem... Is it a problem with the navigation library itself..?

+) The side effect written above does not occur on android 11 (Sdk30), navigation version 2.3.5 and works as desired. That's probably a library issue.

hhyeok1026 avatar Jun 02 '23 07:06 hhyeok1026

邮件已经收到了,谢谢!

mtf7101520 avatar Jun 02 '23 07:06 mtf7101520