Code Monkey home page Code Monkey logo

gps's Introduction

GPS

Turn GPS on programmatically and current location instantly with runtime permission.

Demo

Demo

Usage

Step 1 : Add "GPS" Library to your Android project.

1- Open your project in Android Studio. 2- Download the library

   (Download a zip File archive to unzip)

3- Create a folder "GPS" in your project. 4- Copy and paste the Code to your AnimatedLoadingIndicator folder 5- On the root of your project directory create/modify the settings.gradle file. It should contain something like the following:

  include 'MyApp', ':GPS'

6- Go to File > Project Structure > Modules. 7- App > Dependencies. 8- Click on the more on the left green "+" button > Module dependency. 9- Select "GPS Library".

### Step 2 : Add Code to your Project

Add Google Location Play Services Library in your build.gradle file:

compile 'com.google.android.gms:play-services-location:10.2.0'

Note: "10.2.0" Version at the Time of code Uploading. It may vary when you implement in your Code as per latest 
Google Location Play Services Library Version.

Add the Below File in your Code:

![MainActivity](MainFile/MainActivity.java)

#locationUpdates Method you will get the Latitude and Longitude value.

#Overrided Method #onStop Method you need to disconnectGoogleApiClient to Stop getting the Latitude and Longitude value.

Note:

    if(networkUtilObj != null)
    {
        networkUtilObj.disconnectGoogleApiClient();
    }
    
    Above Method is Used to Disconnect the Google Api Connection for getting the Latitude and Longitude value.

gps's People

Contributors

yash123482 avatar yash786agg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.