I am updating some Xamarin.Android code to use the newer AndroidX APIs. The old way to launch an activity in my project was like this:
var intent = new Intent(this.Activity, typeof(SomeActivity));
intent.PutExtra("someVariableA", a);
intent.PutExtra("someVariableB", b);
StartActivityForResult(intent, 0);
The new way is with ActivityResultLauncher
object:
activityResultLauncher.Launch(intent);
But how do I pass the request code? (second parameter in StartActivityForResult
)