iOS Question Application start up problem

stevenindon

Active Member
Licensed User
Please find video (link below) of my application. Please note that everytime when i start the application, It will show a glimpse of my history page.. only then it will start a fresh from begining.

How can i solve this problem?

 

stevenindon

Active Member
Licensed User
Erel,

Thank you for your advice. I tried many ways to solve this issue (Running on my iPhone 6)... even WKWebView visible to false... and after loading, WKWebView.BaseView.Visible=True.... but the problem still exist.

Where can i put this code?

Main.App.As(NativeObject).RunMethod("ignoreSnapshotOnNextApplicationLaunch", Null)

as you can see my application init is as such :

B4X:
'******************************************************
'APPLICATION START
'******************************************************
Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Pagemain.Initialize("main")
    Pagemain.RootPanel.LoadLayout("main")
    NavControl.NavigationBarVisible = False
    NavControl.ShowPage(Pagemain)
    AllFunc.Initialize
    AllFunc.ReadAllInitoMemory(MemLoc)
    InitApp
    InitWebview
End Sub
'******************************************************
'INIT APP BASIC
'******************************************************
Sub InitApp()
    IntScreenWidth=GetDeviceLayoutValues.Width/GetDeviceLayoutValues.Scale
    IntScreenHeight=GetDeviceLayoutValues.Height/GetDeviceLayoutValues.Scale
    cam.Initialize("cam", Pagemain)
End Sub
'******************************************************
'INIT WEB BROWSER
'******************************************************
Sub InitWebview()
    FullScreen
    Exec_Webview_Navlocal("Splash.html")
    WKWebView.BaseView.Visible=True
End Sub
 
Upvote 0

stevenindon

Active Member
Licensed User
I have added the code as below :

B4X:
'******************************************************
'APPLICATION START
'******************************************************
Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Pagemain.Initialize("main")
    Pagemain.RootPanel.LoadLayout("main")
    NavControl.NavigationBarVisible = False
    NavControl.ShowPage(Pagemain)
    AllFunc.Initialize
    AllFunc.ReadAllInitoMemory(MemLoc)
    InitApp
    InitWebview
End Sub
'******************************************************
'INIT APP BASIC
'******************************************************
Sub InitApp()
    IntScreenWidth=GetDeviceLayoutValues.Width/GetDeviceLayoutValues.Scale
    IntScreenHeight=GetDeviceLayoutValues.Height/GetDeviceLayoutValues.Scale
    cam.Initialize("cam", Pagemain)
End Sub
'******************************************************
'INIT WEB BROWSER
'******************************************************
Sub InitWebview()
    FullScreen
    Exec_Webview_Navlocal("Splash.html")
    WKWebView.BaseView.Visible=True
End Sub
'******************************************************
'EXECUTE FULL SCREEN
'******************************************************
Sub FullScreen()
    Dim no As NativeObject = App
    no.RunMethod("setStatusBarHidden:animated:", Array(True, False))
    no.RunMethod("ignoreSnapshotOnNextApplicationLaunch", Null)   <<<<<<---------------------------- Added this
End Sub

But the problem still exist..
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Make the first page display faster:
B4X:
Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Pagemain.Initialize("main")
    Pagemain.RootPanel.LoadLayout("main")
    NavControl.NavigationBarVisible = False
    NavControl.ShowPage(Pagemain)
    Sleep(100)
    AllFunc.Initialize
    AllFunc.ReadAllInitoMemory(MemLoc)
    InitApp
    InitWebview
End Sub
 
Upvote 0
Top