Code Monkey home page Code Monkey logo

Comments (6)

Over17 avatar Over17 commented on June 28, 2024

Hi!

Never heard of such thing before.

  • what is the permission in question?
  • what are you calling and how do you get the result?
  • do you completely remove the app or install it on top of the non-dev version?
  • is there a logcat of the dev build you can share?

from unityandroidpermissions.

JackM36 avatar JackM36 commented on June 28, 2024

I use it for android.permission.READ_EXTERNAL_STORAGE and android.permission.WRITE_EXTERNAL_STORAGE

Here is the part of the code i use for the permissions. The function is called in Awake:

private void CheckPermissions()
        {
            if (UnityEngine.Application.platform == RuntimePlatform.Android)
            {
                if (!AndroidPermissionsManager.IsPermissionGranted(READEXTERNAL_PERMISSION) || !AndroidPermissionsManager.IsPermissionGranted(WRITEEXTERNAL_PERMISSION))
                {
                    permissionsCount = 2;

                    AndroidPermissionsManager.RequestPermission(new[] { READEXTERNAL_PERMISSION, WRITEEXTERNAL_PERMISSION }, new AndroidPermissionCallback(
                        grantedPermission =>
                        {
                            allowedPermisionsCount++;
                        },
                        deniedPermission =>
                        {
                            deniedPermissionsCount++;
                        }));
                }
            }
        }

I completely remove the non-dev version and install the dev version after. There is nothing related in logcat that I can send you.

The window just never appears, and permissions are automatically denied. Note that the code of the whole app is exactly the same, the only difference is that I build it as a dev-build. The non-dev build works just fine.

from unityandroidpermissions.

Over17 avatar Over17 commented on June 28, 2024

I think there are two reasons for the RequestPermission to return immediately with a result of "denied":

  1. The user has tapped "deny" and selected "don't ask again"
  2. The permission is not declared in the manifest.

Since 1 is not your case, could you check 2? However I'd expect it to be vice versa - dev build adds read_external_storage automatically, while you need to add it manually for release builds.

from unityandroidpermissions.

JackM36 avatar JackM36 commented on June 28, 2024

I will check and let you know

from unityandroidpermissions.

JackM36 avatar JackM36 commented on June 28, 2024

I removed the permission tests, and my app is crashing (due to not having permissions to read data for example) in dev build. Therefore I don't think the dev build adds permissions on its own.

Is there maybe a way for the plugin to not enable SkipPermissionsDialog, without changing the plugin itself? Maybe I can use the default dialog just for the dev build.

from unityandroidpermissions.

Over17 avatar Over17 commented on June 28, 2024

Unfortunately there isn't. If skipPermissionsDialog is not set, then all the permissions are being prompted at the very first start, so there's little point in having any subsequent prompts (apart from if the user has denied the request).

from unityandroidpermissions.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.