Android Question App restarts on Bluetooth Connection reset

Discussion in 'Android Questions' started by Andrew King, Dec 20, 2018.

  1. Andrew King

    Andrew King Member Licensed User

    I have a project I am working on where I have a Bluetooth keyboard that times out (and it must, so it is not an option to try to get around that time out)

    But when it times out it disconnects and causes my app to restart.

    The app has absolutely no code dealing with Bluetooth connections.

    There are no errors in the log.

    I have seen that activity_resume and activity_create are called by putting a message box in the events. Also in the activity_create event, the FirstTime = false. But I must reinitialize my lists or they will throw an error saying list is not initialized.

    So basically the memory of the app is wiped clean and basically restarted simply because a keyboard Bluetooth connection goes online or offline. Being a .NET programmer, this really boggles my mind.

    Any ideas would be appreciated as to what is going on here.
  2. Erel

    Erel Administrator Staff Member Licensed User

    Don't use Msgbox for this. Use Log instead.

    This is incorrect.

    Watch the B4A life cycle video tutorial:
  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