It seems like it's not properly supported as I need to implement JNI stuff when I try to implement IActivityResultCallback interface. Also ActivityResultContract is not a generic class so when I inherit it to create a custom contract it's not type-safe like in native Android. So it's not usable at all at the moment I guess?
Using Activity Result API in Xamarin.Android
527 Views Asked by solru At
1
There are 1 best solutions below
Related Questions in XAMARIN
- C# Visual Studio Android App Showing a wrong not working Keypad on Entry text
- Playing local recorded video
- What changed from xcode 13.2.1 to 14.2 that would affect an app's entitlements?
- After adding the packages of "Xamarin.Firebase.Messaging", getting error related to JAVA0000 "Compilation failed"
- C# Xamarin Android | Change Contentview from class
- Why does my LINQ query in Xamarin.Forms show less than expected content?
- My .net MAUI app works in debug mode, but "dotnet publish" doesn't work
- Xamarain support for IOS 17.4.1
- Grid Items keep stacking instead of creating a new row
- .NET MAUI TapGesture Command not working in CollectionView
- Xamarin android emulate usb PC Keyboard
- Java.Lang.IllegalStateException: 'Unable to parse composition' using Lottie in splashscreen xamarin forms (android)
- add Items (FILES) from Directory to Spinner List
- AVPlayerViewController's caption options do not update in .Net 8 tvOS app
- Printing PDF generate with Itext7 on a thermal printer Model:P80D
Related Questions in XAMARIN.ANDROID
- Extracting Last 4 Digits from RPM Response in Xamarin Android (e.g., "41 0C") and Performing Decimal Conversion and Division by 4
- Xamarin android emulate usb PC Keyboard
- Java.Lang.IllegalStateException: 'Unable to parse composition' using Lottie in splashscreen xamarin forms (android)
- AzureDevops Pipeline Generate APK: Error XALNK7000: Mono.Linker.MarkException
- Unable to clear App cache in Xamarin.Forms Android
- Xamarin Android Memory Usage
- Failed to resolve SDK 'Microsoft.NET.Sdk'
- Why are there no results after clicking button even though event handler is initiated and button_click method created?
- How to perfectly localize DatePicker, TimePicker in Xamarin
- .Net Android (Maui) Writing external storage doesn't work until I restart the application in below 13 version
- Syncfusion/Xamarin Numeric Keyboard broken - 2 different characters within the same button
- Alarm manager does not trigger broadcast receiver when app is closed
- ExtendedListView not scrolling to correct position
- Can not resolve reference 'Package' referenced by 'Project.Android', when updating a new package in an existing project
- How to make a row in a list after clicking a buttom xaml
Related Questions in ONACTIVITYRESULT
- Android Studio, java, onActivityResult is not being triggered using Intent
- SOLVED -- Saving an image from Photo Picker in app folder for permanent access
- App restart issue when resource-intensive app is in foreground: How to ensure onActivityResult method triggers reliably
- Managing Unknown App Source Permissions and Handling Back Navigation in Android
- ActivityResult result always zero: giving permissions with new method since startActivityForResult is deprecated
- Requesting overlay and post notifications permission from Android 13
- Facebook SDK - logInWithReadPermissions deprecated - Android
- The onActivityResult method is resetting values
- Does an Activity extending another activity have 2 separate contexts for super and child classes(Activities) Android?
- App2 results not recieved on App1
- How To Crop Multiple Images Separately
- onActivityResult not called after click the button (using Google Drive API)
- How to override onActivityResult function using JNI C++?
- Android app Crash OnActivityResult, Unable to read captured image
- Unable to get Phone from registerForActivityResult(new ActivityResultContracts.PickContact()
Related Questions in STARTACTIVITYFORRESULT
- Inheritance with new ActivityResult launcher
- Android14 - Flutter App: Issue with eSIM Download Functionality
- Starting an activity for result with launchMode="singleTop" behaves differently on Android 11 than on Android 12
- Android, can not import the right startActivityForResult. (Kotlin, compose, android studio)
- Android, startActivityForResult with arguments (Intent, Int), gives type mismatch error
- .net MAUI Android call StartActivityForResult synchronously and wait OnActivityResult is called
- Why i cant Fetch the Gallery From my Desktop
- 'startActivityForResult(android.content.Intent, int)' is deprecated. How shall i fix this error
- The official document about Leaderboards of Play Games Services uses deprecated startActivityForResult
- How to get image from gallery in a non activity/fragment class? - koltin
- Intent is null while opening camera
- How to know which app was selected by user when using an Intent chooser?
- Recording and Casting permission dialog is getting canceled immediately
- Does the ActivityResult contain any info of the activity (such as class name) has just called setResult when using registerForActivityResult callback?
- Unable to call activity for result?
Related Questions in ACTIVITY-RESULT-API
- Android Activity Result API with a ViewModel: how to reference ActivityResultRegistry
- Android. How to share result from one fragment to another with fragment result api?
- Android. How to correctly create DialogFragment?
- Does requiring an Play Services module in manifest.xml install for all apps or just the requestor
- Google Pay Push provisioning activity result with activity result launcher api
- How to construct PickVisualMediaRequest for ActivityResultLauncher
- ActivityResultContracts.TakePicture - Image is not saved after activity orientation change
- Android. Requesting runtime permissions does not work correctly
- Android ActivityResultContracts.CreateDocument onResult is never called
- How safe is registering contracts with ActivityResultRegistry after onResume in android?
- How To Send Intent Back using ActivityLauncher API?
- Android SecurityException: Permission Deniel for CAMERA permission in the AndroidManifest file
- FirebaseUI needs pending intent
- Android and Fragment result API. How to share result from child fragment with different request key?
- ActivityResultLauncher always returns null data
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can get around this issue by inheriting from
Java.Lang.Object. Something like this will probably work:IActivityResultCallback inherits from IJavaObject, which most, if not all Android interfaces do. This way Xamarin can interface between C# and Java. This is described pretty well here: https://learn.microsoft.com/en-us/xamarin/android/platform/java-integration/working-with-jni#implementing-interfaces