Android Question Error in ResumableSub_ShowPrivacyPolicy.resume

D

Deleted member 103

Guest
Hi,

I have this bug in Google bug report, I can not reproduce it myself, so I do not know where that comes from.
It would be nice if someone had a hint.

(The View "cbxPrivacyPolicy" is a CheckBox.)

Huawei Mate 10 lite (HWRNE), 4096MB RAM, Android 7.0
Bericht 1 von 1
java.lang.RuntimeException
:
at anywheresoftware.b4a.AbsObjectWrapper.getObject (AbsObjectWrapper.java:50)
at anywheresoftware.b4a.objects.CompoundButtonWrapper.getChecked (CompoundButtonWrapper.java:51)
at fg.cronomillemiglia.main$ResumableSub_ShowPrivacyPolicy.resume (main.java:4533)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent (BA.java:240)
at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:180)
at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent (BA.java:166)
at anywheresoftware.b4a.agraham.dialogs.InputDialog$CustomLayoutDialog$1.onClick (InputDialog.java:2388)
at com.android.internal.app.AlertController$ButtonHandler.handleMessage (AlertController.java:166)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:156)
at android.app.ActivityThread.main (ActivityThread.java:6605)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:999)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:889)

mein.java:
upload_2018-6-7_10-5-3.png


Activity_Resume:
B4X:
    'Die Variable "IsFirstTime" prüfen damit die Policy nicht mehrmals angezeigt wird.
    If Starter.IsFirstTime And Not(Starter.manager.getBoolean("IsPrivacyPolicyAllowed")) Then
        CallSubDelayed(Me, "ShowPrivacyPolicy")
    End If

B4X:
Private Sub ShowPrivacyPolicy
    Dim dialog As CustomLayoutDialog

    Dim sf As Object = dialog.ShowAsync("", "OK", "", "", Null, False)
    Wait For (sf) Dialog_Ready (DialogPanel As Panel)
    DialogPanel.LoadLayout("frmprivacypolicy")
    
    'View beschriften
    wbvPrivacyPolicy.LoadHtml(File.GetText(File.DirAssets, Starter.Language.Value("Datenschutzfile")))
    cbxPrivacyPolicy.Text = Starter.Language.Value("PolicyAllowed")

    Wait For (sf) Dialog_Result (Result As Int)
    Starter.manager.setBoolean("IsPrivacyPolicyAllowed", cbxPrivacyPolicy.Checked)
 
    If Not(cbxPrivacyPolicy.Checked) Then
        Msgbox2Async(Starter.Language.Value("PrivacyPolicyMarked"), Starter.Language.Value("AppTerminated"), "OK","","",Null,False)
        Wait For Msgbox_Result (Result As Int)
        Activity.Finish
    End If
End Sub
 
D

Deleted member 103

Guest
My guess is that somehow this sub was called multiple times. Try to click on the home button and then return to your app when the dialog is visible.
After the home button, the dialog is not displayed again.
This is the log:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (smcrono) Create ***
IsLanguageSet= false
** Service (smcrono) Start **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
WakeLock already held.
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (CallSubDelayed - InitSpeedpilot)
sending message to waiting queue (CallSubDelayed - ShowPrivacyPolicy)
sending message to waiting queue (activity_permissionresult)
sending message to waiting queue (activity_permissionresult)
running waiting messages (4)
ShowPrivacyPolicy
** Activity (main) Resume **
WakeLock already held.
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
WakeLock already held.
 
Upvote 0
Top