1. Are you ready for the Galaxy S20? Here is everything we know so far!

Help with (fairly simple?) application

Discussion in 'Android Development' started by Copaman, Jun 5, 2010.

  1. Copaman

    Copaman Lurker
    Thread Starter

    Hey guys.

    I'm currently working on an application for a course I'm taking. It's due on the 14th, when I will have to somehow demonstrate it to a panel of engineers at my school.

    Please understand that I have very little Java experience.

    at the moment, my program uses getSpeed() to get the speed of the handset. It then displays the speed of the handset, and the maximum speed the handset has gone since the program started.

    I need the program to enable or disable Airplane Mode if mySpeed [gotten by getSpeed()] is above or below a certain value (limitSpeed, set arbitrarily by me).

    I was thinking something like:

    Code (Text):
    1. if(mySpeed>=limitSpeed){
    2. //long mess of programming here to enable Airplane Mode
    3. }
    5. if(mySpeed<limitSpeed){
    6. //long mess of programming to disable Airplane Mode
    7. }
    How can I do this? If the above method will work, how do I get it to work? If it won't, what should I do instead?



  2. mkeath

    mkeath Well-Known Member


Share This Page