1. Download our Official Android App: Forums for Android!

Apps Help with (fairly simple?) application

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

  1. Copaman

    Copaman Lurker
    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    4
    Joined:
    Jun 5, 2010

    Jun 5, 2010
    4
    0
    25
    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. }
    4.  
    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?

    Thanks

    Copa
     

    Advertisement

  2. mkeath

    mkeath Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    209
    Joined:
    May 14, 2010

    May 14, 2010
    209
    15
    38

Share This Page

Loading...