Find a Significant Other (Device)
At first sight, it seems there is not much of a difference between the compass app we’ve just made and one that guides us toward another mobile device. If we think about it, though, using a hard-coded latitude and longitude as we did in our previous sketch is quite different from retrieving another device’s location data in real time. We’ll explore networking techniques in detail in Chapter 6, Networking Devices with Wi-Fi. The difficulty is that two mobile devices separated by some distance will not share a common IP address that we can use to exchange our location data. So for this task, we need a shared place where each device can write its own latitude and longitude and where each can read the other device’s ...
Get Rapid Android Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.