CATEGORIES
>>
Dart(2)
>>
Errors(5)
>>
Android(11)
>>
Errors(1)
>>
Errors(2)
>>
Windows 8(3)
>>
iPhone7(1)
>>
Errors(4)
>>
Html(1)
RECOMMENDED SITES
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.
protected override void OnRestart()
{
base.OnRestart();
this.Finish();
}
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: 1175
COMMENTS
No comments yet. Be the first to comment who you are.