Android Question Detecting if Phone On/Offline and Reading/Writing to file

Discussion in 'Android Questions' started by JacquesD, Sep 11, 2018.

  1. JacquesD

    JacquesD New Member

    Just a couple of quick questions:

    1. How do I save the contents of textboxes and the state of a checkbox to a file?
    2. How do I detect when the phone is offline?
    3. When the phone goes online again, I need to read the file which was saved in question 1 and then send it in an email. So how do I read the file again?

    Last edited by a moderator: Sep 11, 2018
  2. Erel

    Erel Administrator Staff Member Licensed User

    1. Simplest way is with KVS2.

    2 / 3. This can only be done if your app is running all the time in the background (search for foreground services). You can do it with PhoneEvents.
  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