Bug? No Activity.AddMenuItem after CallSub from Service

Discussion in 'Bugs & wishlist' started by chrjak, May 14, 2018.

Thread Status:
Not open for further replies.
  1. chrjak

    chrjak Active Member Licensed User


    I call a Download Service in Activity_Create.
    Sub Activity_Create(FirstTime As Boolean)
        UniversalDownload.url = 
        UniversalDownload.Target = 
    File.OpenOutput(File.DirInternal, "file"False)
        UniversalDownload.CallSubInModuleWhenFinished = 
        UniversalDownload.CallSubWhenFinished = 
    Array As String("Down_Success""Down_Failed")
    End Sub
    After Download has been completed the Subs will be called by CallSubDelayed

    Sub Down_Success
    Dim Text As String
        Text = 
    File.ReadString(File.DirInternal, "file")
    End Try
    If Not(Text = ""Then
    Activity.AddMenuItem3("A1""a1"LoadBitmap(File.DirAssets, "image.jpg"), True)
    End If
    Activity.AddMenuItem3("In""in"LoadBitmap(File.DirAssets, "in.png"),True)
    End Sub
    Results in everything correctly loaded but not showing any menu items. Adding the Menuitems in Activity_Create does add them.

    CallSub instead of CallSubDelayed does not work. Activity.Invalidate neither

    Where is the problem?
  2. chrjak

    chrjak Active Member Licensed User

    I just noticed that clicking the Menu Button after everything got loaded (Which is a long tap on the back key when using the Galaxy S7 Edge) shows all MenuItems in the ActionBar... Why that?
  3. chrjak

    chrjak Active Member Licensed User

    Also i think it is probably not because of the app being busy. a timer being set after all was completed and ticking at 5000 ms once fires activity.openmenu and activity.invalidate and does not do any changes
  4. chrjak

    chrjak Active Member Licensed User

    This is just crazy. My Galaxy S4 running 5.0.1 shows the menus items when adding openmenu at the end of all loading processes. no timer needed - invalidate does not work

    An emulator running 5.1, 4.4, 6.0 does not show anything

    s7 is running on 7.0
  5. Erel

    Erel Administrator Staff Member Licensed User

    There is no bug here. For further discussion please start a new thread in the questions forum.
Thread Status:
Not open for further replies.
  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