Copaman
Lurker
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:
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
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:
if(mySpeed>=limitSpeed){
//long mess of programming here to enable Airplane Mode
}
if(mySpeed<limitSpeed){
//long mess of programming to disable Airplane Mode
}
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