Android Question Check if smartphone/tablet has enabled security option

Magma

Expert
Licensed User
Longtime User
@Erel i am having problem when the device wake up and need slide or pin with my app (my app has service for gps + mariadb sql writing) - when the app wake up without pin and slide - works perfect.. but when need pin or slide going dead... :-(
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
To be more specific... the problem is when having PIN screen type...

I can give you the activity resume and pause but no more (it 's a big project and for time i don't want to share it, understand me):

B4X:
Sub Activity_Pause (UserClosed As Boolean)

'If UserClosed=True Then
    showactiva=0
       
    If TTSON=True Then
    If TTS1.IsInitialized=True Then TTS1.Release
    End If
    If camEx.IsInitialized=True Then
        camEx.Release
    End If

        'audiorec.releaseRecorder
    If goon="1" Then

        timer2.Enabled=False
        timer3.Enabled=False
        timer4.Enabled=False
        rectimer.Enabled=False
        timerexit.Enabled=False
   
    End If
'End If
   
   
End Sub

Sub Activity_Resume
Log("realfirst:" & realfirst)
    If mustexit=1 Then
        ExitApplication
    End If
    If goon="1" Then
        showactiva=1
        If realfirst>0 Then
            If TTSON=True Then
                If TTS1.IsInitialized = False Then
                    TTS1.Initialize("TTS1")
                    'Sleep(1000)
                    'selecttts
                End If
            End If
            'If camEx.IsInitialized=False Then
           
                InitializeCamera
   

            timer2.Enabled=True
            timer3.Enabled=True
            timer4.Enabled=True
            Else
            startall
        End If
       
        Else
        StartActivity("check")
    End If
End Sub


The problem is only when i have pin lock type (slide works ok)

FROM Logs after pressing power-button to close screen and need to set pin after re-open - seems to resuming ???


what happening.... as i said at slide works perfect... at pin... get the above... TABSTRIP error


Forgot tell you that using this code:

B4X:
Sub SetShowWhenLocked
    Dim r As Reflector
    r.Target = r.GetActivity
    r.Target = r.RunMethod("getWindow")
    r.RunMethod2("addFlags", 6815872, "java.lang.int")
   
End Sub

+If before pressing power button - press home to hide activity and go at home..after pressing power button will not get/take error...
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…