Samsung Android P, Q onStart called before onActivityResult lifecycle
In the Xamarin Android project, taking pictures and recording with the camera was not working only on Samsung 9.0 and above Samsung devices.
Camera turned on, picture was taken, then "onActivityResult" method was not triggered when it returned to application.
When I examined the codes on the page, I saw that we used the method called "onRestart" and that "finish" was done here.
protected override void OnRestart()

protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data)
	//bla bla bla

On non-Samsung devices, "OnActivityResult" was triggered after taking pictures from the camera.
On Samsung devices with 9.0 and above, I saw that it fell to "OnRestart" before "OnActivityResult", so we couldn't capture the picture.
So I got this error because the pageLifecycle has changed on Samsung 9.0 and above.
If it happens to you, you can check it this way.

Author: Engin ATALAY
Date: 27.04.2020 13:14:11
View Count: 1170

No comments yet. Be the first to comment who you are.
Your Name :
E-mail :
Your Message :
This project : ASP.NET MVC , RAZOR, Entity Framework , CSS , HTML , JQUERY(2.0.2) , AJAX the C# side-tier architecture was developed with logic.
Yukarı Çık