Android Question xCLV Expandable - Sleep not resumed (context is paused)

Discussion in 'Android Questions' started by yiankos1, Aug 25, 2019.

  1. yiankos1

    yiankos1 Active Member Licensed User

    Hello,
    I use xCLV expandable items. When i click an item there is a possibility(random number) to show an advertisement. If ad shown, at log says this
    Code:
    Sleep not resumed (context is paused): anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub
    Sleep 
    not resumed (context is paused): b4a.example3.customlistview$ResumableSub_PanelClickHandler
    and item does not collapse or expand, it stucks.
    if i comment out this line at CLVExpandable Class:
    Code:
    'Sleep(mCLV.AnimationDuration)
    it works fine even if shows an ad, but animation is really bad.

    Code at my app is this:
    Code:
    Sub clvSaved_ItemClick (Index As Int, Value As Object)
        expandable.ToggleItem(Index)
        intAder
    End Sub
    Code:
    Sub intAder

        
    Dim random As Int
        random=
    Rnd(0,28)
        
    Log(random)
        
    If random=21 Then
            
    If IAd.Ready Then
                IAd.Show
            
    End If
        
    End If

    End Sub
    I tried callsubdelayd calling intAder but with no luck. Any ideas?
    Thank you for your time.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    A simple way to solve it is by calling Sleep(mCLV.AnimationDuration + 10) before starting the next activity.
     
    yiankos1 likes this.
  3. yiankos1

    yiankos1 Active Member Licensed User

    so if i understand well, i should add this sleep before calling intAder. Right?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Yes.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice