Java 17: More about Java and Android by Poul Klausen

Java 17: More about Java and Android by Poul Klausen

Author:Poul Klausen
Language: eng
Format: epub
Publisher: Bookboon.com Ltd.
Published: 2018-08-03T00:00:00+00:00


The application TheLocation uses the first two of the above three providers to determine the location of the device (see the window below). The program opens a window that determines the coordinates of the device location (longitude and latitude). The window has two buttons, both from start showing the text Start. Clicking on the top button changes the text to Stop, and the program will periodically update the values for Longitude and Latitude with the current location using the GPS provider. The bottom button works the same way, but instead, the network provider is used.

Regarding the application’s user interface, there is nothing new and the layout consists of 8 widgets placed using a RelativeLayout and I do not want to display the code here. In order for an application to use the device’s GPS, it must be allowed in the manifest:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.