iOS Question [SOLVED] iMedia/LLCamera.AuthorizationDenied not working

JackKirk

Well-Known Member
Licensed User
Longtime User
Hi,

I can not get iMedia/LLCamera.AuthorizationDenied to work properly - if app is denied access to camera then subsequently allowed access to camera AuthorizationDenied always reads True.

Steps to reproduce:

(1) Install app (Test2) in attached zip as a release app.
(2) Launch Test2 app for first time - it will ask for permission to access camera - respond [OK].
(3) Launch Test2 app for second time - it will display "false" in middle of screen - reflecting AuthorizationDenied state.
(4) [Settings] > [Test2] > [disallow access to camera].
(5) Launch Test2 app for third time - it will display "true".

ALL OK TO HERE

(6) [Settings] > [Test2] > [allow access to camera].
(7) Launch Test2 app for fourth time - it will display "true" - it should be "false".
(8) No matter what you do from here AuthorizationDenied will always be "true".

Thanks...

B4X:
#Region  Project Attributes
    #ApplicationLabel: Test2
    #Version: 1.0.0
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
    #iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
    #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public App As Application
    Public NavControl As NavigationController
    Private Page1 As Page
    Private Label1 As Label
    Private LLCamera1 As LLCamera
End Sub

Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.Title = "Page 1"
    Page1.RootPanel.Color = Colors.White
    NavControl.ShowPage(Page1)
End Sub

Private Sub Page1_Resize(Width As Int, Height As Int)
    Page1.RootPanel.Color = Colors.White
    Log(LLCamera1.AuthorizationDenied)
    If Not(LLCamera1.AuthorizationDenied) Then LLCamera1.Initialize(Page1.RootPanel, "", False)
    Label1.Initialize("")
    Page1.RootPanel.AddView(Label1, Width / 2, Height / 2, Width, 10)
    Label1.Text = LLCamera1.AuthorizationDenied
    Label1.SizeToFit
    Label1.Left=Page1.RootPanel.Width / 2 - Label1.Width / 2
    Label1.Top=Page1.RootPanel.Height / 2 - Label1.Height / 2
End Sub
 

Attachments

  • Test2.zip
    1,004 bytes · Views: 294

JackKirk

Well-Known Member
Licensed User
Longtime User
Now works as documented.

Impressive support.

Thanks Erel...
 
Upvote 0
Top