Writing the Android Client

Writing code for the Android client to send unlock commands to the Android server is easy. Let’s reuse code from the Web Enabled Light Switch Android client application to provide easy user access to the door latch function. This time, we will use a button instead of a toggle switch since we already programmed the lock to unlock for five seconds. This makes the toggle unnecessary. Another feature we will add to this application is to turn on the Wi-Fi radio if it isn’t already active.

Get Programming Your Home now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.