Whats Our Status

Bear in mind that the phone capability might not always be on, even if Android is running. The phone might have the phone radio turned off in places where either it isn't allowed (airplanes, hospitals, etc.) or as a means of silencing the phone during meetings.

You can determine if the phone is ready for use by calling isRadioOn() on the IPhone interface. You can even call toggleRadioOnOff() to change the radio's status - though you really should make sure this is what the user wants, lest they accidentally toggle the phone on when they really shouldn't.

Of course, there's a more prosaic reason why you might not be able to use the phone - the user might already be on a call. The isOffhook() method -despite using the archaic "hook" terminology from a byegone era of phones - will tell if you if a call is in progress. Here, "off hook" means the phone is in use, so if isOffhook() returns true, you cannot place a call.

Self Publishing

Self Publishing

Have you always wanted to write your own book and get it published? Discover How to Write, Print Sell Your Own Book! Have you always wanted to write your own book and get it published? If you have written a book or even if you have a yen to be a writer, you are probably already aware of the competition in the writing field.

Get My Free Ebook


Post a comment