Xamarin Forms release apk blank screen on other device

Hi, I am trying to resolve this problem since three days. My Application working fine on my test device with Nougat 7.1. But when i install on other device 8.0, 8.1. after runtime permission , it stuck on white blank screen then close after a while.
I've done following troubleshooting but still same issue
1 - rename Mainpage
2- Disable Linker
3- remove all startup codes from Mainactivity
4- reset internet Permissions

Please help to resolve the issue.

Best Answer

  • JarvanJarvan Xamurai
    Accepted Answer

    Does the application require a dangerous permission? Like ReadPhoneState permission. If so, you need to grant it.

    if (ContextCompat.CheckSelfPermission(this, Permission) 0= (int)Android.Content.PM.Permission.Granted)
    {
        //execute you code
    }
    else
    {
        RequestPermissions(new string[] { Permission }, 0);
    }
    

    Besides, if you set screen orientation to the Activity, delete the code and try again.

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai
    Accepted Answer

    Does the application require a dangerous permission? Like ReadPhoneState permission. If so, you need to grant it.

    if (ContextCompat.CheckSelfPermission(this, Permission) 0= (int)Android.Content.PM.Permission.Granted)
    {
        //execute you code
    }
    else
    {
        RequestPermissions(new string[] { Permission }, 0);
    }
    

    Besides, if you set screen orientation to the Activity, delete the code and try again.

  • MzrAliMzrAli Member ✭✭

    @Jarvan Thank you. it seems to be correct answer. I have both enabled. Let me check and confirm.

  • MzrAliMzrAli Member ✭✭

    @Jarvan, No Luck, Same still stuck on Main screen at 8.0 . the application requesting following permissions:
    1 - Camera
    2- Read Phone state
    3- read & write storage
    4-Location
    5-sendsms

    Please help

Sign In or Register to comment.