Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: gregacuna on May 16, 2017, 05:19:33 AM

Title: Camera Permission for Android
Post by: gregacuna on May 16, 2017, 05:19:33 AM
We're using Playmaker to create a game which allows players to take a photo and post it to Facebook. All's working well except if the player has NOT authorized the game to use the camera it throws up a black screen.

Is there a way using Playmaker to check if the game has been authorized to access the camera and to change the authorization if not once the player clicks on a button in a popup?

Thanks in advance!
Title: Re: Camera Permission for Android
Post by: jeanfabre on August 09, 2017, 04:11:09 AM
Hi,

 I think you'll need to use this:

https://docs.unity3d.com/ScriptReference/Application.HasUserAuthorization.html

There are some actions on this on the Ecosystem, I'll see if djaydino can add the one for your case.

 Bye,

 Jean
Title: Re: Camera Permission for Android
Post by: gregacuna on August 10, 2017, 12:25:23 AM
Thanks Jean!
Title: Re: Camera Permission for Android
Post by: djaydino on August 16, 2017, 09:20:25 AM
Hi,
https://docs.unity3d.com/ScriptReference/Application.HasUserAuthorization.html
is actually for webplayer only.

give me a little time to research :)

Title: Re: Camera Permission for Android
Post by: djaydino on August 17, 2017, 12:07:15 AM
Hi,
It is not that simple to add actions for this.
The best way is to get android native or ultimate mobile from Stan's Assets (https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=popularity/query=publisher:2256)

it also handles permissions.
I did not find the actions yet
but i wrote to Stan and waiting for an answer,
if i don't get a reply i can make them if you want (for that asset)
Title: Re: Camera Permission for Android
Post by: gregacuna on August 17, 2017, 01:45:33 AM
Hey djaydino...thanks for looking into this. I've interacted with Stan about it a little, but there was some confusion for me as to how to handle it.

Do let me know what you find out. Cheers!
Title: Re: Camera Permission for Android
Post by: djaydino on August 21, 2017, 09:52:13 AM
Hi,
I got a reply from stan's Assets.
Quote
We will think about it. Our customers don't ask about this implementation. So, when they will ask us about it, We will start to implement it.

Best thing is to contact them again and specifically ask for "Runtime Permissions Actions"

in the worst case i can try to make some actions for you to use.
Title: Re: Camera Permission for Android
Post by: Plancksize on July 24, 2018, 10:50:50 AM
Hi,
I got a reply from stan's Assets.
Quote
We will think about it. Our customers don't ask about this implementation. So, when they will ask us about it, We will start to implement it.

Best thing is to contact them again and specifically ask for "Runtime Permissions Actions"

in the worst case i can try to make some actions for you to use.

I'm sorry for reviving an year old topic, but this seems to be the only thread about this particular topic around here.
I do own Stan's Assets Android Native Plugin but it seems that it's been over a year and that kind of actions were not introduced yet (and judging by some recent reviews I'm not sure they'll ever be).

Did this actions ended up being created or is there an alternative for achieving this (getting permissions in runtime)?