Giter VIP home page Giter VIP logo

location-kit-android's Introduction

Location Kit

Maven Central javadoc license

Location Kit is an abstraction wrapper that encapsulates Google Location Services and HUAWEI Location Kit.

Architecture

The library consists of 3 artifacts; location-core, location-google, and location-huawei.

location-core artifact provides an abstraction interface to interact with Location APIs.

location-google artifact provides the Google Location Services integration to Location Kit.

location-huawei artifact provides the HUAWEI Location Kit integration to Location Kit.

Each artifact transitively depended on its corresponding base artifacts.

Declaring dependencies

To add a dependency on Location Kit, you must add the Maven Central repository together with the Google Maven repository and/or the Huawei Maven repository to your project.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
    // To use the Google Location Services via Location Kit
    implementation 'dev.supasintatiyanupanwong.libraries.android.kits.location:location-google:1.0.0'

    // To use the HUAWEI Location Kit via Location Kit
    implementation 'dev.supasintatiyanupanwong.libraries.android.kits.location:location-huawei:1.0.0'
}

If both of integration artifacts are included in your final build, the implementation will be selected based on API availability upon application startup.

However, it is recommended to separate builds between them as next:

android {
    // ...
    flavorDimensions 'vendor'
    productFlavors {
        google
        huawei { applicationIdSuffix '.huawei' }
    }
}

dependencies {
    googleImplementation 'dev.supasintatiyanupanwong.libraries.android.kits.location:location-google:1.0.0'
    huaweiImplementation 'dev.supasintatiyanupanwong.libraries.android.kits.location:location-huawei:1.0.0'
}

But, make sure to have one of the integration artifacts included in your final build, otherwise an exception will be thrown at runtime.

For more information about dependencies, see Add build dependencies.

Additional documentation

Feedback

Your feedback helps make Location Kit better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues or the existing discussions in this library before you create a new one.

License

Copyright 2020 Supasin Tatiyanupanwong

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

location-kit-android's People

Contributors

supasintatiyanupanwong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tavorcl inqbarna

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.