playMaker

Author Topic: Camera Permission for Android  (Read 2814 times)

gregacuna

  • Full Member
  • ***
  • Posts: 142
Camera Permission for Android
« 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!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Camera Permission for Android
« Reply #1 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

gregacuna

  • Full Member
  • ***
  • Posts: 142
Re: Camera Permission for Android
« Reply #2 on: August 10, 2017, 12:25:23 AM »
Thanks Jean!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Camera Permission for Android
« Reply #3 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 :)


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Camera Permission for Android
« Reply #4 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

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)

gregacuna

  • Full Member
  • ***
  • Posts: 142
Re: Camera Permission for Android
« Reply #5 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!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Camera Permission for Android
« Reply #6 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.

Plancksize

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 75
Re: Camera Permission for Android
« Reply #7 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)?