Android Question Ideas storing an app's global variables

Discussion in 'Android Questions' started by davemorris, Aug 8, 2019.

  1. davemorris

    davemorris Member Licensed User

    Hi, Guys
    Scanning through the forum it appears that (using V4B 8.3+) it is OK to define global variables in the Starter Server (in the sub Process_Globals) as it will not be removed by the OS whilst the App is running, Question - is that correct?

    Also, would I be safe to store global variables in the Main Activity (I cannot find any references to how this is handled by the OS).

    Very sorry it this has already been discussed in the forum (but I can't find it!) - just get too many "hits".

    I am trying to restructure my B4A App, so it is easier to convert it to B4i. I really like what Erel is doing with the B4X concept which certainly helps, but in some ways I am having to rethink my approach to the programming structure for Android Apps and any help would be appreciated.

    kind regards
  2. Erel

    Erel Administrator Staff Member Licensed User

    Watch the video tutorial: Android Process and activities life cycle

    Yes, only private variables.
  3. davemorris

    davemorris Member Licensed User

    Hi, Erel - thanks for the quick response.

    That has cleared up that question.

  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