iOS Question After adding quickaction, i got black screen in release

schimanski

Well-Known Member
Licensed User
Longtime User
After adding this

https://www.b4x.com/android/forum/threads/add-quickactions-to-your-app.74263/#content

to my project, my app doesn't starts. It only shows a black screen. This happens, if I add
B4X:
QuickActions.StartSettings
to the Application_Start or
B4X:
QuickActions.ActiveSettings
to Application_Active and only in release mode. In debug, it works. I think, that it is not releated to the quickaction-module, but I can't find out, why. I mentioned, that I had this problem times ago for a while, but I didn't understood the reason for this behavior.

I'm using hosted builder.


Here is my Appication_Start:

B4X:
Private Sub Application_Start (nav As NavigationController)
 
    'QuickAction-Buttons initialisieren:
    QuickActions.StartSettings
 
    'Firebase-Initialisierungen: Analytics ist die Grundinitialisierung und muss für jeden Firebase--Dienst initialisiert werden.
    analystics.Initialize
    'Firebase-Messaging (Push) initialisieren'
 
    App.RegisterUserNotifications(True, True, True)
    App.RegisterForRemoteNotifications
 
    fm.Initialize("fm")
 
    manager.Initialize
    If manager.GetAll.Size = 0 Then
        InitSettings
    End If
 
    'Verzeichnis erstellen
    If File.Exists(File.DirDocuments & "/XXX/Konferenzen", "")=False Then File.MakeDir(File.DirDocuments & "/XXX/Konferenzen" ,"")
    If File.Exists(File.DirDocuments & "/XXX/Kontakte", "")=False Then File.MakeDir(File.DirDocuments & "/XXX/Kontakte" ,"")
    If File.Exists(File.DirDocuments & "/XXX/Profilbilder", "")=False Then File.MakeDir(File.DirDocuments & "/XXX/Profilbilder" ,"")
    If File.Exists(File.DirDocuments & "/XXX/Backup", "")=False Then File.MakeDir(File.DirDocuments & "/XXX/Backup" ,"")
    'Hier werden die Custom-Notification-Sounds eingespielt.
    If File.Exists(File.DirLibrary & "/Sounds", "")=False Then File.MakeDir(File.DirLibrary & "/Sounds", "")
    'StandardSound zu Beginn festlegen.
    If File.Exists(File.DirLibrary & "/Sounds", "notification.wav")=False Then File.Copy(File.DirAssets, "standard.wav", File.DirLibrary & "/Sounds", "notification.wav")
    If File.Exists(File.DirLibrary & "/Sounds", "notification.wav") Then NotificationPlayer.Initialize(File.DirLibrary & "/Sounds", "notification.wav", "")

 
    Farben_initialisieren
    Bitmaps_initialisieren
 
    Initialisierungen
 
    ' Initialize the TabBarController
    TabControl.Initialize("TabControl")
    NavControl.Initialize("NavControl")
 
    ' Initialize Page 1 and load a layout file
    Konferenz.InitKonferenz
    Kontakt.InitKontakt
    Einstellungen.InitEinstellungen
    Info.InitInfo
 
    pageKonferenzen.Initialize("pageKonferenz")
    pageKonferenzen.RootPanel.LoadLayout("layoutkonferenz")
    pageKonferenzen.RootPanel.Color=ColorULVPanel
    pnlEingabe.Color=ColorPanelTexteingabe
    lblHint.TextColor=ColorHintTexteingabe
    Texteingabe.TextColor=ColorsTxtTexteingabe
    ivsend.Bitmap=senden_icon
    ivaudio.Bitmap=audio_icon
    ivsend.Visible=False
 
    '###########
    pProgress.Color=ColorULVSecondLine
    lblProgress.Textcolor=ColorTitle
    '###########
 
    'Farbe der Navigationbar setzen'
    Dim no As NativeObject = NavControl
    If SetTheme="light" Then
        no.GetField("navigationBar").RunMethod("setBarStyle:",Array(0))        'Schriftfarbe'
    Else
        no.GetField("navigationBar").RunMethod("setBarStyle:",Array(1))
    End If
    no.GetField("navigationBar").RunMethod("setTintColor:", Array(no.ColorToUIColor(ColorTitle)))    'Iconfarbe'
    no.GetField("navigationBar").RunMethod("setBarTintColor:", Array(no.ColorToUIColor(ColorToolbar)))    'Hintergrundfarbe'
 
    'Farbe der Tabcontrolbar setzen'
    Dim no As NativeObject = TabControl
    no.GetField("tabBar").SetField("tintColor", no.ColorToUIColor(ColorlblTextrechts)) 'active item
    no.GetField("tabBar").SetField("barTintColor", no.ColorToUIColor(ColorToolbar)) 'bar color
 
    Texteingabe.SizeToFit
    AddViewToKeyboard(Texteingabe)
 
    Hintergrundbild_Laden
 
    btnBack.InitializeText("< zurück", "zurueck")
    btnBack.TintColor=ColorTitle
    btnKontaktInfo.InitializeBitmap(info_icon, "KontaktInfo")
    Dim lst As List
    lst.Initialize
    lst.Add(btnBack)
    lst.Add(btnKontaktInfo)
    pageKonferenzen.TopLeftButtons = lst
     
    clv.Initialize(Me, "clv", 100%x)
    clv.AsView.Color=Colors.Transparent
    ivHintergrund.Color=ColorULV'####
    pageKonferenzen.RootPanel.AddView(clv.AsView, 0, 0, 100%x, 100%y-60dip)
 
    #If Test
        ImageView2.Initialize("")
        ImageView2.Bitmap=ic_action_show
        pageKonferenzen.RootPanel.AddView(ImageView2, 0,0, 100%x, 70%y-60dip)
    #End If
 
    NavControl.NavigationBarVisible = True    ' sets the NavigationBar to visible (by default)
     
    'Formulare der TabControl hinzufügen.
    TabControl.Pages = Array(Konferenz.pageKonferenz, Kontakt.pageKontakte, Einstellungen.pageEinstellungen, Info.pageInfo)


    App.IdleTimerDisabled = False    'Solange die App im Vordergrund ist, kann der Bildschirm-Timeout mit true abgeschaltet werden'
 
    Kamera.Initialize("Kamera", pageKonferenzen)
    Konferenzbild.Initialize("Konferenzbild", pageKonferenzen)
 
    If SchluesselDB.IsInitialized=False Then SchluesselDB.Initialize(File.DirLibrary, "SchluesselDB.XXX")
    If SchluesselDB2.IsInitialized=False Then SchluesselDB2.Initialize(File.DirLibrary, "SchluesselDB2.XXX")
    If ZeitstempelMap.IsInitialized=False Then ZeitstempelMap.Initialize(File.DirLibrary, "Zeitstempel.XXX")
    If Ungelesen.IsInitialized=False Then Ungelesen.Initialize(File.DirLibrary, "Ungelesen.XXX")
    If LautlosMap.IsInitialized=False Then LautlosMap.Initialize(File.DirLibrary, "Lautlos.XXX")
    If VerzeichnisMap.IsInitialized=False Then VerzeichnisMap.Initialize(File.DirLibrary, "Verzeichnis.XXX")
    If Gesendet.IsInitialized=False Then Gesendet.Initialize(File.DirLibrary, "Gesendet.XXX")
    If MenueMap.IsInitialized=False Then MenueMap.Initialize(File.DirLibrary, "Menue.XXX")
    If ZeitZuletztGelesen.IsInitialized=False Then ZeitZuletztGelesen.Initialize(File.DirLibrary, "ZuletztGelesenDB.XXX")
    If StatusKontakte.IsInitialized=False Then StatusKontakte.Initialize(File.DirLibrary, "StatusKontakteDB.XXX")

    If manager.GetString("Anmeldung")="aktiv" Then
        Kontakt.Kontakte_initialisieren
        Kontakt.ListeKontakte_erstellen
    End If
 
    'Hintergrundaktivitäten für den Uploadtimer zulassen'
    Dim no As NativeObject = App
    no.RunMethod("setMinimumBackgroundFetchInterval:", Array(0))
 
    'UploadTimer starten
    UploadTimer.Enabled=True
 
    TempFiles_loeschen
 
End Sub
 

schimanski

Well-Known Member
Licensed User
Longtime User
It works! I added sleep(300) in the StartSettings- and ActiveSettings-Subs of the QuickActions-Module. Thank you very much!
 
Upvote 0
Top