...

/

Phone Application Breakdown

Phone Application Breakdown

Learn about the detailed steps required for turning the outdoor lights on from the perspective of the phone application.

The phone application

Previously, we discussed the problem of turning the outdoor lights on and how it can be solved using a smartphone’s GPS. In this lesson, we’ll closely examine the steps required to implement this one by one and what we need to do for each of them.

So, how can we know if the phone is within the predefined range? To understand this, we must first do some research. The first thing we need to understand is how the phone GPS knows where it is. Searching online will soon reveal that a GPS works with two coordinates—longitude and latitude. These two coordinates will pinpoint any location on Earth. This means that when we request the current location from the GPS, we’ll be given these coordinates.

When we have these ...