8000 OnPermit / NotPermit not being called · Issue #11 · sanukin39/UniAndroidPermission · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

OnPermit / NotPermit not being called #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ctenuta opened this issue Jul 12, 2017 · 10 comments
Open

OnPermit / NotPermit not being called #11

ctenuta opened this issue Jul 12, 2017 · 10 comments

Comments

@ctenuta
Copy link
ctenuta commented Jul 12, 2017

The OnPermit / NotPermit callback is not being called on my application.

Do I need to do something to make it happen? Because it seems that after the activity is paused/suspended execution is lost.

Thanks if you could help me with this.

here is my code...

UniAndroidPermission.RequestPremission (AndroidPermission.ACCESS_COARSE_LOCATION, () => {
ShowMessage ("Por favor aguarde...","Procurando Dispositivos");
AppController.instance.SearchDevice();
}, () => {
AppController.instance.ShowAlert("ALERTA","Essa permissão é necessária para o funcionamento");
});

@ctenuta
Copy link
Author
ctenuta commented Jul 12, 2017

The project generate two icons on my device. It seems to be a conflict between the two activities. But the default activity is the UnityPlayerNativeActivity.

I'm following my manifest....
AndroidManifest.xml.zip

@ctenuta
Copy link
Author
ctenuta commented Jul 12, 2017

I remove the "launcher" intent filter from the UnityPlayerNativeActivity and now It's working very well.

Never mind. My bad!

@OnurKalkan
Copy link

It was happening to me too. Thanks for the tip ;)

@allan-m-smith
Copy link

Hey, I am having the same issue as ctenuta apparently, the callbacks are not being called at all, however I tried removing the whole intent filter area from your plugin, tried removing only the "category" tag, tried removing the Unity's intent filter (which is not good because I dont want the app to run in all orientations which seems to be related to that... but I can't get the app to work. It worked when I removed the full "intent-filter" tag of your plugin, but callbacks are not called, and if I leave it whole, I get 2 icons of my app.

How should the activity tag be exactly for your code to work properly?

Btw, thanks for sharing this code, it is very helpful!

@allan-m-smith
Copy link

Hey, I took a look at your open project in android studio and figured it out. We are supposed to remove the Unity activity from the manifest entirely, not only the intent. I actually replaced the name of the unity activity with yours, so it still respects the configs from unity (orientation and so on). Thanks for the code once again!

@Myworkema
Copy link
Myworkema 8000 commented Jan 18, 2018

Mee Too, I am having the same issue ????

@karanvariya
Copy link
karanvariya commented Feb 28, 2018

Please Check your prefab name change.
UniAndroidPermission.prefab at boot scene ※ Don't rename object name!!
See Doc File for this project.

Also compare this manifest.

@rotter
Copy link
rotter commented Apr 27, 2018

I cant get the callbacks to work as well.

What do you mean by "boot scene"? I have never heard that concept in Unity. Do you mean the first loaded scene? If so I have done that, and haven't changed the prefab name (simply dragged it to the scene).

But just to be clear, in my case the scene that needs the permission is not the first scene, so should I add the prefab to the other scenes as well?

Thanks

@birdkingz
Copy link

This plugin callback is not working at all!
Please fix it!

@Archi97
Copy link
Archi97 commented Jun 22, 2020

Any idea how to solve the problem on Unity 2019.3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
0