Along with androidX support StartActivityForResult and OnActivityResult got dprecated inside Fragment. Here we can see the one of the alternate approach for this deprecated api's in xamarin android.
Below code snippet explains the handling the above mentioned deprecated API's:
In my previous post explained Android Keystore based encryption and decryption, How to implement Dependency injection in xamarin form using AutoFac, ReOrder the list items by drag and drop in xamarin android, Custom Image Gallery Control using Xamarin Form
-
Happy coding!!
Hello,
ReplyDeleteActivityResultCallback class not found.
However IActivityResultCallback interface exists
Do I need to add any references?
OK. The class is there at the end of the code.
ReplyDeleteThanks
I'm upgrading one of my apps to android API 33 and I'm having some issues with this code that I can't resolve. The line " _activityResultLauncher = RegisterForActivityResult(new ActivityResultContracts.StartActivityForResult(), _activityResultCallback);" causes the IDE error "The name 'RegisterForActivityResult' does not exist in the current context". I'm using Visual Studio 2022 v17.3.6. I can't even test the code until I resolve this. Can anyone here help me?
ReplyDeleteThis comment has been removed by the author.
DeleteDid you add required namespace, as suggested in this sample code
Delete