[
  {
    "path": ".github/workflows/android.yml",
    "content": "name: Android CI\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\njobs:\n  test:\n    name: Unit Test\n    runs-on: ubuntu-latest\n    \n    steps:\n    - uses: actions/checkout@v2\n    - name: set up JDK 1.8\n      uses: actions/setup-java@v1\n      with:\n        java-version: 1.8\n    - name: Grant execute permission for gradlew\n      run: chmod +x gradlew\n      \n    - name: Run Unit test\n      run: ./gradlew test\n"
  },
  {
    "path": ".gitignore",
    "content": "# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\n\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Android Studio Navigation editor temp files\n.navigation/\n\n# Android Studio captures folder\ncaptures/\n\n# IntelliJ\n*.iml\n.idea\n\n# Keystore files\n# Uncomment the following line if you do not want to check your keystore files in.\n#*.jks\n\n# External native build folder generated in Android Studio 2.2 and later\n.externalNativeBuild\n\n# Google Services (e.g. APIs or Firebase)\ngoogle-services.json\n\n# Freeline\nfreeline.py\nfreeline/\nfreeline_project_description.json\n\n# fastlane\nfastlane/report.xml\nfastlane/Preview.html\nfastlane/screenshots\nfastlane/test_output\nfastlane/readme.md\n*.gpg\n.DS_Store\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "Release Notes\n====\n\n1.2.1\n-- \n* Update target and compile SDK version 30 \n* Add @StringDef to all parameters\n* Add traffic model and transit routing preference parameters support\n* Fix incorrect Romanian language value\n\n1.2.0\n----\n* Update minimum SDK version to 16\n* Update target and compile SDK version 29\n* Migrate to AndroidX\n* Migrate the sample code to Kotlin\n* Add total distance and duration calculation in route\n* Remove raw string from success callback\n* Add more customizable polyline in DirectionConverter\n* Fix issue #70\n"
  },
  {
    "path": "LICENSE.txt",
    "content": "\n                              Apache License\n                        Version 2.0, January 2004\n                     http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n   \"License\" shall mean the terms and conditions for use, reproduction,\n   and distribution as defined by Sections 1 through 9 of this document.\n\n   \"Licensor\" shall mean the copyright owner or entity authorized by\n   the copyright owner that is granting the License.\n\n   \"Legal Entity\" shall mean the union of the acting entity and all\n   other entities that control, are controlled by, or are under common\n   control with that entity. For the purposes of this definition,\n   \"control\" means (i) the power, direct or indirect, to cause the\n   direction or management of such entity, whether by contract or\n   otherwise, or (ii) ownership of fifty percent (50%) or more of the\n   outstanding shares, or (iii) beneficial ownership of such entity.\n\n   \"You\" (or \"Your\") shall mean an individual or Legal Entity\n   exercising permissions granted by this License.\n\n   \"Source\" form shall mean the preferred form for making modifications,\n   including but not limited to software source code, documentation\n   source, and configuration files.\n\n   \"Object\" form shall mean any form resulting from mechanical\n   transformation or translation of a Source form, including but\n   not limited to compiled object code, generated documentation,\n   and conversions to other media types.\n\n   \"Work\" shall mean the work of authorship, whether in Source or\n   Object form, made available under the License, as indicated by a\n   copyright notice that is included in or attached to the work\n   (an example is provided in the Appendix below).\n\n   \"Derivative Works\" shall mean any work, whether in Source or Object\n   form, that is based on (or derived from) the Work and for which the\n   editorial revisions, annotations, elaborations, or other modifications\n   represent, as a whole, an original work of authorship. For the purposes\n   of this License, Derivative Works shall not include works that remain\n   separable from, or merely link (or bind by name) to the interfaces of,\n   the Work and Derivative Works thereof.\n\n   \"Contribution\" shall mean any work of authorship, including\n   the original version of the Work and any modifications or additions\n   to that Work or Derivative Works thereof, that is intentionally\n   submitted to Licensor for inclusion in the Work by the copyright owner\n   or by an individual or Legal Entity authorized to submit on behalf of\n   the copyright owner. For the purposes of this definition, \"submitted\"\n   means any form of electronic, verbal, or written communication sent\n   to the Licensor or its representatives, including but not limited to\n   communication on electronic mailing lists, source code control systems,\n   and issue tracking systems that are managed by, or on behalf of, the\n   Licensor for the purpose of discussing and improving the Work, but\n   excluding communication that is conspicuously marked or otherwise\n   designated in writing by the copyright owner as \"Not a Contribution.\"\n\n   \"Contributor\" shall mean Licensor and any individual or Legal Entity\n   on behalf of whom a Contribution has been received by Licensor and\n   subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   copyright license to reproduce, prepare Derivative Works of,\n   publicly display, publicly perform, sublicense, and distribute the\n   Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   (except as stated in this section) patent license to make, have made,\n   use, offer to sell, sell, import, and otherwise transfer the Work,\n   where such license applies only to those patent claims licensable\n   by such Contributor that are necessarily infringed by their\n   Contribution(s) alone or by combination of their Contribution(s)\n   with the Work to which such Contribution(s) was submitted. If You\n   institute patent litigation against any entity (including a\n   cross-claim or counterclaim in a lawsuit) alleging that the Work\n   or a Contribution incorporated within the Work constitutes direct\n   or contributory patent infringement, then any patent licenses\n   granted to You under this License for that Work shall terminate\n   as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n   Work or Derivative Works thereof in any medium, with or without\n   modifications, and in Source or Object form, provided that You\n   meet the following conditions:\n\n   (a) You must give any other recipients of the Work or\n       Derivative Works a copy of this License; and\n\n   (b) You must cause any modified files to carry prominent notices\n       stating that You changed the files; and\n\n   (c) You must retain, in the Source form of any Derivative Works\n       that You distribute, all copyright, patent, trademark, and\n       attribution notices from the Source form of the Work,\n       excluding those notices that do not pertain to any part of\n       the Derivative Works; and\n\n   (d) If the Work includes a \"NOTICE\" text file as part of its\n       distribution, then any Derivative Works that You distribute must\n       include a readable copy of the attribution notices contained\n       within such NOTICE file, excluding those notices that do not\n       pertain to any part of the Derivative Works, in at least one\n       of the following places: within a NOTICE text file distributed\n       as part of the Derivative Works; within the Source form or\n       documentation, if provided along with the Derivative Works; or,\n       within a display generated by the Derivative Works, if and\n       wherever such third-party notices normally appear. The contents\n       of the NOTICE file are for informational purposes only and\n       do not modify the License. You may add Your own attribution\n       notices within Derivative Works that You distribute, alongside\n       or as an addendum to the NOTICE text from the Work, provided\n       that such additional attribution notices cannot be construed\n       as modifying the License.\n\n   You may add Your own copyright statement to Your modifications and\n   may provide additional or different license terms and conditions\n   for use, reproduction, or distribution of Your modifications, or\n   for any such Derivative Works as a whole, provided Your use,\n   reproduction, and distribution of the Work otherwise complies with\n   the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n   any Contribution intentionally submitted for inclusion in the Work\n   by You to the Licensor shall be under the terms and conditions of\n   this License, without any additional terms or conditions.\n   Notwithstanding the above, nothing herein shall supersede or modify\n   the terms of any separate license agreement you may have executed\n   with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n   names, trademarks, service marks, or product names of the Licensor,\n   except as required for reasonable and customary use in describing the\n   origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n   agreed to in writing, Licensor provides the Work (and each\n   Contributor provides its Contributions) on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n   implied, including, without limitation, any warranties or conditions\n   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n   PARTICULAR PURPOSE. You are solely responsible for determining the\n   appropriateness of using or redistributing the Work and assume any\n   risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n   whether in tort (including negligence), contract, or otherwise,\n   unless required by applicable law (such as deliberate and grossly\n   negligent acts) or agreed to in writing, shall any Contributor be\n   liable to You for damages, including any direct, indirect, special,\n   incidental, or consequential damages of any character arising as a\n   result of this License or out of the use or inability to use the\n   Work (including but not limited to damages for loss of goodwill,\n   work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses), even if such Contributor\n   has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n   the Work or Derivative Works thereof, You may choose to offer,\n   and charge a fee for, acceptance of support, warranty, indemnity,\n   or other liability obligations and/or rights consistent with this\n   License. However, in accepting such obligations, You may act only\n   on Your own behalf and on Your sole responsibility, not on behalf\n   of any other Contributor, and only if You agree to indemnify,\n   defend, and hold each Contributor harmless for any liability\n   incurred by, or claims asserted against, such Contributor by reason\n   of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n   To apply the Apache License to your work, attach the following\n   boilerplate notice, with the fields enclosed by brackets \"[]\"\n   replaced with your own identifying information. (Don't include\n   the brackets!)  The text should be enclosed in the appropriate\n   comment syntax for the file format. We also recommend that a\n   file or class name and description of purpose be included on the\n   same \"printed page\" as the copyright notice for easier\n   identification within third-party archives.\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License."
  },
  {
    "path": "README.md",
    "content": "[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Android--GoogleDirectionAndPlaceLibrary-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/1374)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akexorcist/google-direction-library/badge.svg)](https://search.maven.org/artifact/com.akexorcist/google-direction-library)\n![Minimum SDK Version](https://img.shields.io/badge/minSdkVersion-16-brightgreen) \n[![Workflow Status](https://github.com/akexorcist/GoogleDirectionLibrary/actions/workflows/android.yml/badge.svg)](https://github.com/akexorcist/GoogleDirectionLibrary/actions)\n\n# Android-GoogleDirectionLibrary\n![Google Direction Library](https://raw.githubusercontent.com/akexorcist/Android-GoogleDirectionLibrary/master/image/google-direction-library_header.jpg)\n\nGoogle Maps Direction API helper for Android\n\n![Google Direction Library](https://raw.githubusercontent.com/akexorcist/Android-GoogleDirectionLibrary/master/image/google-direction-library_01.jpg)\n\n![Google Direction Library](https://raw.githubusercontent.com/akexorcist/Android-GoogleDirectionLibrary/master/image/google-direction-library_02.jpg)\n\n\nDownload\n===============================\nSince version 2.1.2 will [move from JCenter to MavenCentral](https://developer.android.com/studio/build/jcenter-migration)\n```groovy\n// build.gradle (project)\nallprojects {\n    repositories {\n        mavenCentral()\n        /* ... */\n    }\n}\n```\n\n**Gradle**\n```\nimplementation 'com.akexorcist:google-direction-library:1.2.1'\n```\n\n\nSample Code\n===============================\n\nSimple Direction Request\n```kotlin\nGoogleDirection.withServerKey(\"YOUR_SERVER_API_KEY\")\n        .from(LatLng(37.7681994, -122.444538))\n        .to(LatLng(37.7749003,-122.4034934))\n        .avoid(AvoidType.FERRIES)\n        .avoid(AvoidType.HIGHWAYS)\n        .execute(\n            onDirectionSuccess = { direction: Direction? -> \n                if(direction.isOK()) {\n                    // Do something\n                } else {\n                    // Do something\n                }\n            }, \n            onDirectionFailure = { t: Throwable -> \n                // Do something\n            }\n        )\n```\n\n\nMultiple Waypoints Direction Request\n```kotlin\nGoogleDirection.withServerKey(\"YOUR_SERVER_API_KEY\")\n        .from(LatLng(41.8838111, -87.6657851))\n        .and(LatLng(41.8766061, -87.6556908))\n        .and(LatLng(41.8909056, -87.6467561))\n        .to(LatLng(41.9007082, -87.6488802))\n        .transportMode(TransportMode.DRIVING)\n        .execute(\n            onDirectionSuccess = { direction: Direction? -> \n                if(direction.isOK()) {\n                    // Do something\n                } else {\n                    // Do something\n                }\n            }, \n            onDirectionFailure = { t: Throwable -> \n                // Do something\n            }\n        )\n```\n\nor \n\n```kotlin\nval waypoints: List<LatLng> = listOf(\n        LatLng(41.8766061, -87.6556908), \n        LatLng(41.8909056, -87.6467561)\n)\nGoogleDirection.withServerKey(\"YOUR_SERVER_API_KEY\")\n        .from(LatLng(41.8838111, -87.6657851))\n        .and(waypoints)\n        .to(LatLng(41.9007082, -87.6488802))\n        .transportMode(TransportMode.DRIVING)\n        .execute(\n            onDirectionSuccess = { direction: Direction? -> \n                if(direction.isOK()) {\n                    // Do something\n                } else {\n                    // Do something\n                }\n            }, \n            onDirectionFailure = { t: Throwable -> \n                // Do something\n            }\n        )\n```\n\nSee example code for more detail\n\nTo get API key, please read [Get Google Maps Direction API Key](https://developers.google.com/maps/documentation/directions/get-api-key)\n\n\nDemo\n===============================\n\nTry it at [Google Play](https://play.google.com/store/apps/details?id=com.akexorcist.googledirection.sample)\n\n\nProGuard\n===========================\n```\n-keep class com.google.android.gms.maps.** { *; }\n-keep interface com.google.android.gms.maps.* { *; }\n\n-dontwarn retrofit2.**\n-keep class retrofit2.** { *; }\n-keepattributes Signature\n-keepattributes Exceptions\n\n-keepclasseswithmembers class * {\n    @retrofit2.http.* <methods>;\n}\n\n-keep class com.akexorcist.googledirection.model.** { *;}\n```\n\n\nChange Log\n====\nSee [CHANGELOG.md](CHANGELOG.md)\n\n\nLicence\n===========================\nCopyright 2021 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless 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.\n\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\napply plugin: 'kotlin-android'\n\nandroid {\n    compileSdkVersion project.compileSdkVersion\n\n    defaultConfig {\n        applicationId \"com.akexorcist.googledirection.sample\"\n        minSdkVersion project.minSdkVersion\n        targetSdkVersion project.targetSdkVersion\n        versionCode project.versionCode\n        versionName project.versionName\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled true\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n\n    kotlinOptions {\n        jvmTarget = \"1.8\"\n    }\n\n    buildFeatures {\n        viewBinding = true\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation project(':google-direction')\n    testImplementation 'junit:junit:4.13.2'\n    implementation 'androidx.appcompat:appcompat:1.2.0'\n    implementation 'com.google.android.material:material:1.3.0'\n    implementation 'com.google.android.gms:play-services-maps:17.0.0'\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /Applications/ADT/sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n-keep class com.google.android.gms.maps.** { *; }\n-keep interface com.google.android.gms.maps.* { *; }\n\n-dontwarn okhttp3.**\n-dontwarn okio.**\n\n-dontwarn retrofit2.**\n-keep class retrofit2.** { *; }\n-keepattributes Signature\n-keepattributes Exceptions\n\n-keepclasseswithmembers class * {\n    @retrofit2.http.* <methods>;\n}\n"
  },
  {
    "path": "app/src/androidTest/java/com/akexorcist/library/googledirectionandplace/sample/ApplicationTest.java",
    "content": "package com.akexorcist.library.googledirectionandplace.sample;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"http://d.android.com/tools/testing/testing_android.html\">Testing Fundamentals</a>\n */\npublic class ApplicationTest extends ApplicationTestCase<Application> {\n    public ApplicationTest() {\n        super(Application.class);\n    }\n}"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    package=\"com.akexorcist.googledirection.sample\">\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\n    <uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\n\n    <uses-feature\n        android:glEsVersion=\"0x00020000\"\n        android:required=\"true\" />\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\"\n        tools:ignore=\"AllowBackup,GoogleAppIndexingWarning\">\n        <activity android:name=\".MainActivity\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n\n        <activity\n            android:name=\".SimpleDirectionActivity\"\n            android:label=\"@string/simple_direction\" />\n\n        <activity\n            android:name=\".TransitDirectionActivity\"\n            android:label=\"@string/transit_direction\" />\n\n        <activity\n            android:name=\".AlternativeDirectionActivity\"\n            android:label=\"@string/alternative_direction\" />\n\n        <activity\n            android:name=\".WaypointsDirectionActivity\"\n            android:label=\"@string/waypoints_direction\" />\n\n        <meta-data\n            android:name=\"com.google.android.gms.version\"\n            android:value=\"@integer/google_play_services_version\" />\n\n        <meta-data\n            android:name=\"com.google.android.maps.v2.API_KEY\"\n            android:value=\"YOUR_GOOGLE_MAPS_API_KEY\" />\n\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "app/src/main/java/com/akexorcist/googledirection/sample/AlternativeDirectionActivity.kt",
    "content": "package com.akexorcist.googledirection.sample\n\nimport android.os.Bundle\nimport android.view.View\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.core.content.ContextCompat\nimport com.akexorcist.googledirection.GoogleDirection\nimport com.akexorcist.googledirection.config.GoogleDirectionConfiguration\nimport com.akexorcist.googledirection.constant.TransportMode\nimport com.akexorcist.googledirection.model.Direction\nimport com.akexorcist.googledirection.model.Route\nimport com.akexorcist.googledirection.sample.databinding.ActivityAlternativeDirectionBinding\nimport com.akexorcist.googledirection.util.DirectionConverter\nimport com.akexorcist.googledirection.util.execute\nimport com.google.android.gms.maps.CameraUpdateFactory\nimport com.google.android.gms.maps.GoogleMap\nimport com.google.android.gms.maps.SupportMapFragment\nimport com.google.android.gms.maps.model.LatLng\nimport com.google.android.gms.maps.model.LatLngBounds\nimport com.google.android.gms.maps.model.MarkerOptions\nimport com.google.android.material.snackbar.Snackbar\n\nclass AlternativeDirectionActivity : AppCompatActivity() {\n    private val binding: ActivityAlternativeDirectionBinding by lazy {\n        ActivityAlternativeDirectionBinding.inflate(layoutInflater)\n    }\n\n    companion object {\n        private const val serverKey = \"YOUR_SERVER_KEY\"\n        private val origin = LatLng(35.1766982, 136.9413508)\n        private val destination = LatLng(35.1735305, 136.9484515)\n        private val pathColors = arrayOf(\n            R.color.path_color_1,\n            R.color.path_color_2,\n            R.color.path_color_3\n        )\n    }\n\n    private var googleMap: GoogleMap? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(binding.root)\n\n        binding.buttonRequestDirection.setOnClickListener { requestDirection() }\n\n        (supportFragmentManager.findFragmentById(R.id.maps) as SupportMapFragment).getMapAsync { googleMap ->\n            this.googleMap = googleMap\n        }\n    }\n\n    private fun requestDirection() {\n        showSnackbar(getString(R.string.direction_requesting))\n        GoogleDirectionConfiguration.getInstance().isLogEnabled = BuildConfig.DEBUG\n        GoogleDirection.withServerKey(serverKey)\n            .from(origin)\n            .to(destination)\n            .transportMode(TransportMode.DRIVING)\n            .alternativeRoute(true)\n            .execute(\n                onDirectionSuccess = { direction -> onDirectionSuccess(direction) },\n                onDirectionFailure = { t -> onDirectionFailure(t) }\n            )\n    }\n\n    private fun onDirectionSuccess(direction: Direction?) {\n        direction?.let {\n            showSnackbar(getString(R.string.success_with_status, direction.status))\n            if (direction.isOK) {\n                googleMap?.addMarker(MarkerOptions().position(origin))\n                googleMap?.addMarker(MarkerOptions().position(destination))\n                for (i in 0 until direction.routeList.size) {\n                    val route = direction.routeList[i]\n                    val color = ContextCompat.getColor(this, pathColors[i % pathColors.size])\n                    val directionPositionList = route.legList[0].directionPoint\n                    googleMap?.addPolyline(\n                        DirectionConverter.createPolyline(\n                            this,\n                            directionPositionList,\n                            5,\n                            color\n                        )\n                    )\n                }\n                setCameraWithCoordinationBounds(direction.routeList[0])\n                binding.buttonRequestDirection.visibility = View.GONE\n            } else {\n                showSnackbar(direction.status)\n            }\n        } ?: run {\n            showSnackbar(getString(R.string.success_with_empty))\n        }\n    }\n\n    private fun onDirectionFailure(t: Throwable) {\n        showSnackbar(t.message)\n    }\n\n    private fun setCameraWithCoordinationBounds(route: Route) {\n        val southwest = route.bound.southwestCoordination.coordination\n        val northeast = route.bound.northeastCoordination.coordination\n        val bounds = LatLngBounds(southwest, northeast)\n        googleMap?.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100))\n    }\n\n    private fun showSnackbar(message: String?) {\n        message?.let {\n            Snackbar.make(findViewById(android.R.id.content), message, Snackbar.LENGTH_SHORT).show()\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/akexorcist/googledirection/sample/MainActivity.kt",
    "content": "package com.akexorcist.googledirection.sample\n\nimport android.content.Intent\nimport android.os.Bundle\nimport androidx.appcompat.app.AppCompatActivity\nimport com.akexorcist.googledirection.sample.databinding.ActivityMainBinding\n\nclass MainActivity : AppCompatActivity() {\n    private val binding: ActivityMainBinding by lazy {\n        ActivityMainBinding.inflate(layoutInflater)\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(binding.root)\n\n        binding.buttonSimple.setOnClickListener { goToSimpleDirection() }\n        binding.buttonTransit.setOnClickListener { goToTransitDirection() }\n        binding.buttonAlternative.setOnClickListener { goToAlternativeDirection() }\n        binding.buttonWaypoints.setOnClickListener { goToWaypointsDirection() }\n    }\n\n    private fun goToSimpleDirection() {\n        openActivity(SimpleDirectionActivity::class.java)\n    }\n\n    private fun goToTransitDirection() {\n        openActivity(TransitDirectionActivity::class.java)\n    }\n\n    private fun goToAlternativeDirection() {\n        openActivity(AlternativeDirectionActivity::class.java)\n    }\n\n    private fun goToWaypointsDirection() {\n        openActivity(WaypointsDirectionActivity::class.java)\n    }\n\n    private fun openActivity(cs: Class<*>) {\n        startActivity(Intent(this, cs))\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/akexorcist/googledirection/sample/SimpleDirectionActivity.kt",
    "content": "package com.akexorcist.googledirection.sample\n\nimport android.graphics.Color\nimport android.os.Bundle\nimport android.view.View\nimport androidx.appcompat.app.AppCompatActivity\nimport com.akexorcist.googledirection.GoogleDirection\nimport com.akexorcist.googledirection.config.GoogleDirectionConfiguration\nimport com.akexorcist.googledirection.constant.TransportMode\nimport com.akexorcist.googledirection.model.Direction\nimport com.akexorcist.googledirection.model.Route\nimport com.akexorcist.googledirection.sample.databinding.ActivitySimpleDirectionBinding\nimport com.akexorcist.googledirection.util.DirectionConverter\nimport com.akexorcist.googledirection.util.execute\nimport com.google.android.gms.maps.CameraUpdateFactory\nimport com.google.android.gms.maps.GoogleMap\nimport com.google.android.gms.maps.SupportMapFragment\nimport com.google.android.gms.maps.model.LatLng\nimport com.google.android.gms.maps.model.LatLngBounds\nimport com.google.android.gms.maps.model.MarkerOptions\nimport com.google.android.material.snackbar.Snackbar\n\nclass SimpleDirectionActivity : AppCompatActivity() {\n    private val binding: ActivitySimpleDirectionBinding by lazy {\n        ActivitySimpleDirectionBinding.inflate(layoutInflater)\n    }\n\n    companion object {\n        private const val serverKey = \"YOUR_SERVER_KEY\"\n        private val origin = LatLng(37.7849569, -122.4068855)\n        private val destination = LatLng(37.7814432, -122.4460177)\n    }\n\n    private var googleMap: GoogleMap? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(binding.root)\n\n        binding.buttonRequestDirection.setOnClickListener { requestDirection() }\n\n        (supportFragmentManager.findFragmentById(R.id.maps) as SupportMapFragment).getMapAsync { googleMap ->\n            this.googleMap = googleMap\n        }\n    }\n\n    private fun requestDirection() {\n        showSnackbar(getString(R.string.direction_requesting))\n        GoogleDirectionConfiguration.getInstance().isLogEnabled = BuildConfig.DEBUG\n        GoogleDirection.withServerKey(serverKey)\n            .from(origin)\n            .to(destination)\n            .transportMode(TransportMode.DRIVING)\n            .execute(\n                onDirectionSuccess = { direction -> onDirectionSuccess(direction) },\n                onDirectionFailure = { t -> onDirectionFailure(t) }\n            )\n    }\n\n    private fun onDirectionSuccess(direction: Direction?) {\n        direction?.let {\n            showSnackbar(getString(R.string.success_with_status, direction.status))\n            if (direction.isOK) {\n                val route = direction.routeList[0]\n                googleMap?.addMarker(MarkerOptions().position(origin))\n                googleMap?.addMarker(MarkerOptions().position(destination))\n                val directionPositionList = route.legList[0].directionPoint\n                googleMap?.addPolyline(\n                    DirectionConverter.createPolyline(\n                        this,\n                        directionPositionList,\n                        5,\n                        Color.RED\n                    )\n                )\n                setCameraWithCoordinationBounds(route)\n                binding.buttonRequestDirection.visibility = View.GONE\n            } else {\n                showSnackbar(direction.status)\n            }\n        } ?: run {\n            showSnackbar(getString(R.string.success_with_empty))\n        }\n    }\n\n    private fun onDirectionFailure(t: Throwable) {\n        showSnackbar(t.message)\n    }\n\n    private fun setCameraWithCoordinationBounds(route: Route) {\n        val southwest = route.bound.southwestCoordination.coordination\n        val northeast = route.bound.northeastCoordination.coordination\n        val bounds = LatLngBounds(southwest, northeast)\n        googleMap?.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100))\n    }\n\n    private fun showSnackbar(message: String?) {\n        message?.let {\n            Snackbar.make(findViewById(android.R.id.content), message, Snackbar.LENGTH_SHORT).show()\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/akexorcist/googledirection/sample/TransitDirectionActivity.kt",
    "content": "package com.akexorcist.googledirection.sample\n\nimport android.graphics.Color\nimport android.os.Bundle\nimport android.view.View\n\nimport androidx.appcompat.app.AppCompatActivity\n\nimport com.akexorcist.googledirection.GoogleDirection\nimport com.akexorcist.googledirection.config.GoogleDirectionConfiguration\nimport com.akexorcist.googledirection.constant.TransportMode\nimport com.akexorcist.googledirection.model.Direction\nimport com.akexorcist.googledirection.model.Route\nimport com.akexorcist.googledirection.sample.databinding.ActivityTransitDirectionBinding\nimport com.akexorcist.googledirection.util.DirectionConverter\nimport com.akexorcist.googledirection.util.execute\nimport com.google.android.gms.maps.CameraUpdateFactory\nimport com.google.android.gms.maps.GoogleMap\nimport com.google.android.gms.maps.SupportMapFragment\nimport com.google.android.gms.maps.model.LatLng\nimport com.google.android.gms.maps.model.LatLngBounds\nimport com.google.android.gms.maps.model.MarkerOptions\nimport com.google.android.material.snackbar.Snackbar\n\nclass TransitDirectionActivity : AppCompatActivity() {\n    private val binding: ActivityTransitDirectionBinding by lazy {\n        ActivityTransitDirectionBinding.inflate(layoutInflater)\n    }\n\n    companion object {\n        private const val serverKey = \"YOUR_SERVER_KEY\"\n        private val origin = LatLng(13.7371063, 100.5642539)\n        private val destination = LatLng(13.7604896, 100.5594266)\n    }\n\n    private var googleMap: GoogleMap? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(binding.root)\n\n        binding.buttonRequestDirection.setOnClickListener { requestDirection() }\n\n        (supportFragmentManager.findFragmentById(R.id.maps) as SupportMapFragment).getMapAsync { googleMap ->\n            this.googleMap = googleMap\n        }\n    }\n\n    private fun requestDirection() {\n        showSnackbar(getString(R.string.direction_requesting))\n        GoogleDirectionConfiguration.getInstance().isLogEnabled = BuildConfig.DEBUG\n        GoogleDirection.withServerKey(serverKey)\n            .from(origin)\n            .to(destination)\n            .transportMode(TransportMode.TRANSIT)\n            .execute(\n                onDirectionSuccess = { direction -> onDirectionSuccess(direction) },\n                onDirectionFailure = { t -> onDirectionFailure(t) }\n            )\n    }\n\n    private fun onDirectionSuccess(direction: Direction?) {\n        direction?.let {\n            showSnackbar(getString(R.string.success_with_status, direction.status))\n            if (direction.isOK) {\n                val route = direction.routeList[0]\n                val leg = route.legList[0]\n                val sectionPositionList = leg.sectionPoint\n                for (position in sectionPositionList) {\n                    googleMap?.addMarker(MarkerOptions().position(position))\n                }\n                val stepList = leg.stepList\n                val polylineOptionList = DirectionConverter.createTransitPolyline(\n                    this,\n                    stepList,\n                    5,\n                    Color.RED,\n                    3,\n                    Color.BLUE\n                )\n                for (polylineOption in polylineOptionList) {\n                    googleMap?.addPolyline(polylineOption)\n                }\n                setCameraWithCoordinationBounds(route)\n                binding.buttonRequestDirection.visibility = View.GONE\n            } else {\n                showSnackbar(direction.status)\n            }\n        } ?: run {\n            showSnackbar(getString(R.string.success_with_empty))\n        }\n    }\n\n    private fun onDirectionFailure(t: Throwable) {\n        showSnackbar(t.message)\n    }\n\n    private fun setCameraWithCoordinationBounds(route: Route) {\n        val southwest = route.bound.southwestCoordination.coordination\n        val northeast = route.bound.northeastCoordination.coordination\n        val bounds = LatLngBounds(southwest, northeast)\n        googleMap?.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100))\n    }\n\n    private fun showSnackbar(message: String?) {\n        message?.let {\n            Snackbar.make(findViewById(android.R.id.content), message, Snackbar.LENGTH_SHORT).show()\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/akexorcist/googledirection/sample/WaypointsDirectionActivity.kt",
    "content": "package com.akexorcist.googledirection.sample\n\nimport android.graphics.Color\nimport android.os.Bundle\nimport android.view.View\nimport androidx.appcompat.app.AppCompatActivity\nimport com.akexorcist.googledirection.GoogleDirection\nimport com.akexorcist.googledirection.config.GoogleDirectionConfiguration\nimport com.akexorcist.googledirection.constant.TransportMode\nimport com.akexorcist.googledirection.model.Direction\nimport com.akexorcist.googledirection.model.Route\nimport com.akexorcist.googledirection.sample.databinding.ActivityWaypointsDirectionBinding\nimport com.akexorcist.googledirection.util.DirectionConverter\nimport com.akexorcist.googledirection.util.execute\nimport com.google.android.gms.maps.CameraUpdateFactory\nimport com.google.android.gms.maps.GoogleMap\nimport com.google.android.gms.maps.SupportMapFragment\nimport com.google.android.gms.maps.model.LatLng\nimport com.google.android.gms.maps.model.LatLngBounds\nimport com.google.android.gms.maps.model.MarkerOptions\nimport com.google.android.material.snackbar.Snackbar\n\nclass WaypointsDirectionActivity : AppCompatActivity() {\n    private val binding: ActivityWaypointsDirectionBinding by lazy {\n        ActivityWaypointsDirectionBinding.inflate(layoutInflater)\n    }\n\n    companion object {\n        private const val serverKey = \"YOUR_SERVER_KEY\"\n        private val park = LatLng(41.8838111, -87.6657851)\n        private val shopping = LatLng(41.8766061, -87.6556908)\n        private val dinner = LatLng(41.8909056, -87.6467561)\n        private val gallery = LatLng(41.9007082, -87.6488802)\n    }\n\n    private var googleMap: GoogleMap? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_waypoints_direction)\n\n        binding.buttonRequestDirection.setOnClickListener { requestDirection() }\n\n        (supportFragmentManager.findFragmentById(R.id.maps) as SupportMapFragment).getMapAsync { googleMap ->\n            this.googleMap = googleMap\n        }\n    }\n\n    private fun requestDirection() {\n        showSnackbar(getString(R.string.direction_requesting))\n        GoogleDirectionConfiguration.getInstance().isLogEnabled = BuildConfig.DEBUG\n        GoogleDirection.withServerKey(serverKey)\n            .from(park)\n            .and(shopping)\n            .and(dinner)\n            .to(gallery)\n            .transportMode(TransportMode.DRIVING)\n            .execute(\n                onDirectionSuccess = { direction -> onDirectionSuccess(direction) },\n                onDirectionFailure = { t -> onDirectionFailure(t) }\n            )\n    }\n\n    private fun onDirectionSuccess(direction: Direction?) {\n        direction?.let {\n            showSnackbar(getString(R.string.success_with_status, direction.status))\n            if (direction.isOK) {\n                val route = direction.routeList[0]\n                val legCount = route.legList.size\n                for (index in 0 until legCount) {\n                    val leg = route.legList[index]\n                    googleMap?.addMarker(MarkerOptions().position(leg.startLocation.coordination))\n                    if (index == legCount - 1) {\n                        googleMap?.addMarker(MarkerOptions().position(leg.endLocation.coordination))\n                    }\n                    val stepList = leg.stepList\n                    val polylineOptionList = DirectionConverter.createTransitPolyline(\n                        this,\n                        stepList,\n                        5,\n                        Color.RED,\n                        3,\n                        Color.BLUE\n                    )\n                    for (polylineOption in polylineOptionList) {\n                        googleMap?.addPolyline(polylineOption)\n                    }\n                }\n                setCameraWithCoordinationBounds(route)\n                binding.buttonRequestDirection.visibility = View.GONE\n            } else {\n                showSnackbar(direction.status)\n            }\n        } ?: run {\n            showSnackbar(getString(R.string.success_with_empty))\n        }\n    }\n\n    private fun onDirectionFailure(t: Throwable) {\n        showSnackbar(t.message)\n    }\n\n    private fun setCameraWithCoordinationBounds(route: Route) {\n        val southwest = route.bound.southwestCoordination.coordination\n        val northeast = route.bound.northeastCoordination.coordination\n        val bounds = LatLngBounds(southwest, northeast)\n        googleMap?.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100))\n    }\n\n    private fun showSnackbar(message: String?) {\n        message?.let {\n            Snackbar.make(findViewById(android.R.id.content), message, Snackbar.LENGTH_SHORT).show()\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/res/layout/activity_alternative_direction.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".AlternativeDirectionActivity\">\n\n    <fragment\n        android:id=\"@+id/maps\"\n        android:name=\"com.google.android.gms.maps.SupportMapFragment\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        tools:context=\".MapsActivity\" />\n\n    <com.google.android.material.button.MaterialButton\n        android:id=\"@+id/buttonRequestDirection\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"bottom|center_horizontal\"\n        android:layout_marginBottom=\"@dimen/default_margin_padding\"\n        android:text=\"@string/request_direction\" />\n\n</FrameLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".MainActivity\">\n\n    <LinearLayout\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:orientation=\"vertical\">\n\n        <Button\n            android:id=\"@+id/buttonSimple\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:text=\"@string/simple_direction\" />\n\n        <Button\n            android:id=\"@+id/buttonTransit\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:text=\"@string/transit_direction\" />\n\n        <Button\n            android:id=\"@+id/buttonAlternative\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:text=\"@string/alternative_direction\" />\n\n        <Button\n            android:id=\"@+id/buttonWaypoints\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:text=\"@string/waypoints_direction\" />\n\n    </LinearLayout>\n</FrameLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_simple_direction.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".SimpleDirectionActivity\">\n\n    <fragment\n        android:id=\"@+id/maps\"\n        android:name=\"com.google.android.gms.maps.SupportMapFragment\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        tools:context=\".MapsActivity\" />\n\n    <Button\n        android:id=\"@+id/buttonRequestDirection\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"bottom|center_horizontal\"\n        android:layout_marginBottom=\"@dimen/default_margin_padding\"\n        android:text=\"@string/request_direction\" />\n\n</FrameLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_transit_direction.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".TransitDirectionActivity\">\n\n    <fragment\n        android:id=\"@+id/maps\"\n        android:name=\"com.google.android.gms.maps.SupportMapFragment\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        tools:context=\".MapsActivity\" />\n\n    <Button\n        android:id=\"@+id/buttonRequestDirection\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"bottom|center_horizontal\"\n        android:layout_marginBottom=\"@dimen/default_margin_padding\"\n        android:text=\"@string/request_direction\" />\n\n</FrameLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_waypoints_direction.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".WaypointsDirectionActivity\">\n\n    <fragment\n        android:id=\"@+id/maps\"\n        android:name=\"com.google.android.gms.maps.SupportMapFragment\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        tools:context=\".MapsActivity\" />\n\n    <Button\n        android:id=\"@+id/buttonRequestDirection\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"bottom|center_horizontal\"\n        android:layout_marginBottom=\"@dimen/default_margin_padding\"\n        android:text=\"@string/request_direction\" />\n\n</FrameLayout>\n"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@mipmap/ic_launcher_background\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@mipmap/ic_launcher_background\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"colorPrimaryDark\">#303F9F</color>\n    <color name=\"colorAccent\">#FF4081</color>\n\n    <color name=\"path_color_1\">#7fff7272</color>\n    <color name=\"path_color_2\">#7f31c7c5</color>\n    <color name=\"path_color_3\">#7fff8a00</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <dimen name=\"default_margin_padding\">16dp</dimen>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Google Direction Library Demo</string>\n    <string name=\"simple_direction\">Simple Direction</string>\n    <string name=\"transit_direction\">Transit Direction</string>\n    <string name=\"alternative_direction\">Alternative Direction</string>\n    <string name=\"waypoints_direction\">Waypoints Direction</string>\n    <string name=\"request_direction\">Request Direction</string>\n    <string name=\"success_with_status\">Success with status : %1$s</string>\n    <string name=\"success_with_empty\">Success with empty result</string>\n    <string name=\"direction_requesting\">Direction Requesting...</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.MaterialComponents.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "app/src/test/java/com/akexorcist/library/googledirectionandplace/sample/ExampleUnitTest.java",
    "content": "package com.akexorcist.library.googledirectionandplace;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * To work on unit tests, switch the Test Artifact in the Build Variants view.\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    project.ext {\n        kotlin_version = '1.4.32'\n        compileSdkVersion = 30\n        targetSdkVersion = 30\n        minSdkVersion = 16\n\n        versionName = '1.2.1'\n        versionCode = 10201\n\n        libraryName = 'Google Direction Library'\n        libraryDescription = 'Google Direction API for Android'\n\n        groupId = 'com.akexorcist'\n        artifactId = 'google-direction-library'\n\n        siteUrl = 'https://github.com/akexorcist/Android-GoogleDirectionLibrary'\n        gitUrl = 'https://github.com/akexorcist/Android-GoogleDirectionLibrary.git'\n\n        developerId = 'akexorcist'\n        developName = 'Somkiat Khitwongwattana'\n        developerEmail = 'akexorcist@gmail.com'\n\n        licenseName = 'The Apache License, Version 2.0'\n        licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'\n    }\n    repositories {\n        google()\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:4.1.3'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$project.kotlin_version\"\n        classpath \"org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.17\"\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        jcenter()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "google-direction/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\napply plugin: 'org.jetbrains.dokka-android'\n\nandroid {\n    compileSdkVersion project.compileSdkVersion\n\n    defaultConfig {\n        minSdkVersion project.minSdkVersion\n        targetSdkVersion project.targetSdkVersion\n        versionCode project.versionCode\n        versionName project.versionName\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n    sourceSets {\n        main {\n            manifest.srcFile 'src/main/AndroidManifest.xml'\n            java.srcDirs = ['src/main/java']\n        }\n    }\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n    kotlinOptions {\n        jvmTarget = \"1.8\"\n    }\n}\n\ndokka {\n    outputFormat = 'html'\n    outputDirectory = \"$buildDir/javadoc\"\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    testImplementation 'junit:junit:4.13.2'\n    implementation 'androidx.annotation:annotation:1.2.0'\n    implementation 'com.squareup.retrofit2:retrofit:2.9.0'\n    implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'\n    implementation('com.squareup.retrofit2:converter-gson:2.9.0') {\n        exclude module: 'retrofit'\n    }\n    implementation('com.google.android.gms:play-services-maps:17.0.0') {\n        exclude module: 'support-annotations'\n        exclude module: 'support-v4'\n        exclude module: 'play-services-base'\n    }\n    implementation 'com.google.maps.android:android-maps-utils:0.5'\n}\n\n//apply from: '../publish/mavencentral.gradle'\n"
  },
  {
    "path": "google-direction/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /Applications/ADT/sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Retrofit library\n-dontwarn retrofit.**\n-keep class retrofit.** { *; }\n-keepattributes Signature\n-keepattributes Exceptions\n\n# Parcel library\n-keep class * implements android.os.Parcelable {\n  public static final android.os.Parcelable$Creator *;\n}\n\n-keep class org.parceler.Parceler$$Parcels"
  },
  {
    "path": "google-direction/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.akexorcist.googledirection\">\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n\n</manifest>\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/DirectionCallback.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\n\nimport com.akexorcist.googledirection.model.Direction;\n\n/**\n * Interface for the response from the direction request of the Google Direction API.\n *\n * @since 1.0.0\n */\npublic interface DirectionCallback {\n    /**\n     * Retrieve the response from direction request successfully.\n     *\n     * @param direction The direction result from the Google Direction API\n     * @since 1.0.0\n     */\n    void onDirectionSuccess(@Nullable Direction direction);\n\n    /**\n     * Retrieve the response from direction request with error result.\n     *\n     * @param t A throwable from the response of Google Direction API.\n     * @since 1.0.0\n     */\n    void onDirectionFailure(@NonNull Throwable t);\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/GoogleDirection.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection;\n\nimport androidx.annotation.NonNull;\n\nimport com.akexorcist.googledirection.request.DirectionOriginRequest;\n\n/**\n * Initiate class for direction request of the Google Direction API.\n *\n * @since 1.0.0\n */\npublic class GoogleDirection {\n    /**\n     * Create the Google Direction with Google Direction API Key.\n     * <BR />\n     * <B>Notes</B> - Do not put your Web API Key in the code directly.\n     * The key may be stole and misused by malicious parties.\n     *\n     * @param apiKey Web API Key for the Google Direction API\n     * @return The origin request object\n     * @since 1.0.0\n     */\n    public static DirectionOriginRequest withServerKey(@NonNull String apiKey) {\n        return new DirectionOriginRequest(apiKey);\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/config/GoogleDirectionConfiguration.java",
    "content": "package com.akexorcist.googledirection.config;\n\nimport okhttp3.OkHttpClient;\n\n/**\n * Configuration class for the Google Direction Library.\n *\n * @since 1.0.0\n */\n\n@SuppressWarnings(\"unused\")\npublic class GoogleDirectionConfiguration {\n    private static GoogleDirectionConfiguration configuration;\n\n    /**\n     * Call the class with singleton pattern\n     *\n     * @return The singleton object of this class\n     * @since 1.0.0\n     */\n    public static GoogleDirectionConfiguration getInstance() {\n        if (configuration == null) {\n            configuration = new GoogleDirectionConfiguration();\n        }\n        return configuration;\n    }\n\n    private OkHttpClient customClient;\n    private boolean isLogEnabled = false;\n\n    /**\n     * Get the custom OkHttpClient\n     *\n     * @return The OkHttpClient object\n     * @since 1.0.0\n     */\n    public OkHttpClient getCustomClient() {\n        return customClient;\n    }\n\n    /**\n     * Set the custom OkHttpClient to replace the default client in this library\n     *\n     * @param customClient The OkHttpClient object\n     * @since 1.0.0\n     */\n    public void setCustomClient(OkHttpClient customClient) {\n        this.customClient = customClient;\n    }\n\n    /**\n     * Is the API request logging enable or disable\n     *\n     * @return The value will be true for enable and false for disable\n     * @since 1.0.0\n     */\n    public boolean isLogEnabled() {\n        return isLogEnabled;\n    }\n\n    /**\n     * Enable or disable the API request logging (Powered by OkHttp Logging Interceptor)\n     *\n     * @param logEnabled true for enable and false for disable\n     * @since 1.0.0\n     */\n    public void setLogEnabled(boolean logEnabled) {\n        isLogEnabled = logEnabled;\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/AvoidType.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.constant;\n\nimport androidx.annotation.StringDef;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n/**\n * Route restriction to avoid.\n *\n * @since 1.0.0\n */\npublic class AvoidType {\n    /**\n     * Indicates that the calculated route should avoid toll roads/bridges.\n     *\n     * @since 1.0.0\n     */\n    public static final String TOLLS = \"tolls\";\n    /**\n     * Indicates that the calculated route should avoid highways.\n     *\n     * @since 1.0.0\n     */\n    public static final String HIGHWAYS = \"highways\";\n    /**\n     * Indicates that the calculated route should avoid ferries.\n     *\n     * @since 1.0.0\n     */\n    public static final String FERRIES = \"ferries\";\n    /**\n     * Indicates that the calculated route should avoid indoor\n     * steps for walking and transit directions.\n     *\n     * @since 1.0.0\n     */\n    public static final String INDOOR = \"indoor\";\n\n    @Retention(RetentionPolicy.SOURCE)\n    @StringDef({\n            TOLLS,\n            HIGHWAYS,\n            FERRIES,\n            INDOOR\n    })\n    public @interface Value {\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/DirectionUrl.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.constant;\n\n/**\n * For internal use.\n */\npublic class DirectionUrl {\n    public static final String MAPS_API_URL = \"https://maps.googleapis.com/maps/api/\";\n    public static final String DIRECTION_API_URL = \"directions/json\";\n\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/Language.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.constant;\n\nimport androidx.annotation.StringDef;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n/**\n * Supported languages in the Google Direction API.\n *\n * @since 1.0.0\n */\npublic class Language {\n    public static final String AFRIKAANS = \"af\";\n    public static final String ALBANIAN = \"sq\";\n    public static final String AMHARIC = \"am\";\n    public static final String ARABIC = \"ar\";\n    public static final String ARMENIAN = \"hy\";\n    public static final String AZERBAIJANI = \"az\";\n    public static final String BASQUE = \"eu\";\n    public static final String BELARUSIAN = \"be\";\n    public static final String BENGALI = \"bn\";\n    public static final String BOSNIAN = \"bs\";\n    public static final String BULGARIAN = \"bg\";\n    public static final String BURMESE = \"my\";\n    public static final String CATALAN = \"ca\";\n    public static final String CHINESE = \"zh\";\n    public static final String CHINESE_Simplified = \"zh-CN\";\n    public static final String CHINESE_HONG_KONG = \"zh-HK\";\n    public static final String CHINESE_TRADITIONAL = \"zh-TW\";\n    public static final String CROATIAN = \"hr\";\n    public static final String CZECH = \"cs\";\n    public static final String DANISH = \"da\";\n    public static final String DUTCH = \"nl\";\n    public static final String ENGLISH = \"en\";\n    public static final String ENGLISH_AUSTRALIAN = \"en-AU\";\n    public static final String ENGLISH_GREAT_BRITAIN = \"en-GB\";\n    public static final String ESTONIAN = \"et\";\n    public static final String FARSI = \"fa\";\n    public static final String FINNISH = \"fi\";\n    public static final String FILIPINO = \"fil\";\n    public static final String FRENCH = \"fr\";\n    public static final String FRENCH_CANADA = \"fr-CA\";\n    public static final String GALICIAN = \"gl\";\n    public static final String GEORGIAN = \"ka\";\n    public static final String GERMAN = \"de\";\n    public static final String GREEK = \"el\";\n    public static final String GUJARATI = \"gu\";\n    public static final String HEBREW = \"iw\";\n    public static final String HINDI = \"hi\";\n    public static final String HUNGARIAN = \"hu\";\n    public static final String ICELANDIC = \"is\";\n    public static final String INDONESIAN = \"id\";\n    public static final String ITALIAN = \"it\";\n    public static final String JAPANESE = \"ja\";\n    public static final String KANNADA = \"kn\";\n    public static final String KAZAKH = \"kk\";\n    public static final String KHMER = \"km\";\n    public static final String KOREAN = \"ko\";\n    public static final String KYRGYZ = \"ky\";\n    public static final String LAO = \"lo\";\n    public static final String LATVIAN = \"lv\";\n    public static final String LITHUANIAN = \"lt\";\n    public static final String MACEDONIAN = \"mk\";\n    public static final String MALAY = \"ms\";\n    public static final String MALAYALAM = \"ml\";\n    public static final String MARATHI = \"mr\";\n    public static final String MONGOLIAN = \"mn\";\n    public static final String NEPALI = \"ne\";\n    public static final String NORWEGIAN = \"no\";\n    public static final String POLISH = \"pl\";\n    public static final String PORTUGUESE = \"pt\";\n    public static final String PORTUGUESE_BRAZIL = \"pt-BR\";\n    public static final String PORTUGUESE_PORTUGAL = \"pt-PT\";\n    public static final String PUNJABI = \"pa\";\n    public static final String ROMANIAN = \"ro\";\n    public static final String RUSSIAN = \"ru\";\n    public static final String SERBIAN = \"sr\";\n    public static final String SINHALESE = \"si\";\n    public static final String SLOVAK = \"sk\";\n    public static final String SLOVENIAN = \"sl\";\n    public static final String SPANISH = \"es\";\n    public static final String SPANISH_LATIN_AMERICA = \"es-419\";\n    public static final String SWAHILI = \"sw\";\n    public static final String SWEDISH = \"sv\";\n    public static final String TAMIL = \"ta\";\n    public static final String TELUGU = \"te\";\n    public static final String THAI = \"th\";\n    public static final String TURKISH = \"tr\";\n    public static final String UKRAINIAN = \"uk\";\n    public static final String URDU = \"ur\";\n    public static final String UZBEK = \"uz\";\n    public static final String VIETNAMESE = \"vi\";\n    public static final String ZULU = \"zu\";\n\n\n    @Retention(RetentionPolicy.SOURCE)\n    @StringDef({\n            AFRIKAANS,\n            ALBANIAN,\n            AMHARIC,\n            ARABIC,\n            ARMENIAN,\n            AZERBAIJANI,\n            BASQUE,\n            BELARUSIAN,\n            BENGALI,\n            BOSNIAN,\n            BULGARIAN,\n            BURMESE,\n            CATALAN,\n            CHINESE,\n            CHINESE_Simplified,\n            CHINESE_HONG_KONG,\n            CHINESE_TRADITIONAL,\n            CROATIAN,\n            CZECH,\n            DANISH,\n            DUTCH,\n            ENGLISH,\n            ENGLISH_AUSTRALIAN,\n            ENGLISH_GREAT_BRITAIN,\n            ESTONIAN,\n            FARSI,\n            FINNISH,\n            FILIPINO,\n            FRENCH,\n            FRENCH_CANADA,\n            GALICIAN,\n            GEORGIAN,\n            GERMAN,\n            GREEK,\n            GUJARATI,\n            HEBREW,\n            HINDI,\n            HUNGARIAN,\n            ICELANDIC,\n            INDONESIAN,\n            ITALIAN,\n            JAPANESE,\n            KANNADA,\n            KAZAKH,\n            KHMER,\n            KOREAN,\n            KYRGYZ,\n            LAO,\n            LATVIAN,\n            LITHUANIAN,\n            MACEDONIAN,\n            MALAY,\n            MALAYALAM,\n            MARATHI,\n            MONGOLIAN,\n            NEPALI,\n            NORWEGIAN,\n            POLISH,\n            PORTUGUESE,\n            PORTUGUESE_BRAZIL,\n            PORTUGUESE_PORTUGAL,\n            PUNJABI,\n            ROMANIAN,\n            RUSSIAN,\n            SERBIAN,\n            SINHALESE,\n            SLOVAK,\n            SLOVENIAN,\n            SPANISH,\n            SPANISH_LATIN_AMERICA,\n            SWAHILI,\n            SWEDISH,\n            TAMIL,\n            TELUGU,\n            THAI,\n            TURKISH,\n            UKRAINIAN,\n            URDU,\n            UZBEK,\n            VIETNAMESE,\n            ZULU\n    })\n    public @interface Value {\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/Maneuver.java",
    "content": "package com.akexorcist.googledirection.constant;\n\n/**\n * Action to take for the current step.\n *\n * @since 1.0.0\n */\n@SuppressWarnings(\"unused\")\npublic class Maneuver {\n    public static final String MERGE = \"merge\";\n    public static final String STRAIGHT = \"straight\";\n    public static final String ROUNDABOUT_LEFT = \"roundabout-left\";\n    public static final String ROUNDABOUT_RIGHT = \"roundabout-right\";\n    public static final String U_TURN_LEFT = \"uturn-left\";\n    public static final String U_TURN_RIGHT = \"uturn-right\";\n    public static final String TURN_SLIGHT_LEFT = \"turn-slight-left\";\n    public static final String TURN_SLIGHT_RIGHT = \"turn-slight-right\";\n    public static final String RAMP_LEFT = \"ramp-left\";\n    public static final String RAMP_RIGHT = \"ramp-right\";\n    public static final String TURN_LEFT = \"turn-left\";\n    public static final String TURN_RIGHT = \"turn-right\";\n    public static final String FORK_LEFT = \"fork-left\";\n    public static final String FORK_RIGHT = \"fork-right\";\n    public static final String TURN_SHARP_LEFT = \"turn-sharp-left\";\n    public static final String TURN_SHARP_RIGHT = \"turn-sharp-right\";\n    public static final String KEEP_LEFT = \"keep-left\";\n    public static final String KEEP_RIGHT = \"keep-right\";\n    public static final String FERRY = \"ferry\";\n    public static final String FERRT_TRAIN = \"ferry-train\";\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/RequestResult.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.constant;\n\n/**\n * The status of the request, and may contain debugging information to\n * help you track down why the Directions service failed.\n *\n * @since 1.0.0\n */\n@SuppressWarnings(\"unused\")\npublic class RequestResult {\n    /**\n     * Indicates the response contains a valid result.\n     *\n     * @since 1.0.0\n     */\n    public static final String OK = \"OK\";\n    /**\n     * Indicates at least one of the locations specified in the request's origin,\n     * destination, or waypoints could not be geocoded.\n     *\n     * @since 1.0.0\n     */\n    public static final String NOT_FOUND = \"NOT_FOUND\";\n    /**\n     * Indicates no route could be found between the origin and destination.\n     *\n     * @since 1.0.0\n     */\n    public static final String ZERO_RESULTS = \"ZERO_RESULTS\";\n    /**\n     * Indicates that too many waypoints were provided in the request.\n     *\n     * @since 1.0.0\n     */\n    public static final String MAX_WAYPOINTS_EXCEEDED = \"MAX_WAYPOINTS_EXCEEDED\";\n    /**\n     * Indicates the requested route is too long and cannot be processed.\n     * This error occurs when more complex directions are returned.\n     * Try reducing the number of waypoints, turns, or instructions.\n     *\n     * @since 1.0.0\n     */\n    public static final String MAX_ROUTE_LENGTH_EXCEEDED = \"MAX_ROUTE_LENGTH_EXCEEDED\";\n    /**\n     * Indicates that the provided request was invalid. Common causes of\n     * this status include an invalid parameter or parameter value.\n     *\n     * @since 1.0.0\n     */\n    public static final String INVALID_REQUEST = \"INVALID_REQUEST\";\n    /**\n     * Indicates any of the following:\n     * <BR />• The API key is missing or invalid.\n     * <BR />• Billing has not been enabled on your account.\n     * <BR />• A self-imposed usage cap has been exceeded.\n     * <BR />• The provided method of payment is no longer valid (for example, a credit card has expired).\n     *\n     * @since 1.0.0\n     */\n    public static final String OVER_DAILY_LIMIT = \"OVER_QUERY_LIMIT\";\n    /**\n     * Indicates the service has received too many requests from\n     * your application within the allowed time period.\n     *\n     * @since 1.0.0\n     */\n    public static final String OVER_QUERY_LIMIT = \"OVER_QUERY_LIMIT\";\n    /**\n     * Indicates that the service denied use of the directions service by your application.\n     *\n     * @since 1.0.0\n     */\n    public static final String REQUEST_DENIED = \"REQUEST_DENIED\";\n    /**\n     * Indicates a directions request could not be processed due to\n     * a server error. The request may succeed if you try again.\n     *\n     * @since 1.0.0\n     */\n    public static final String UNKNOWN_ERROR = \"UNKNOWN_ERROR\";\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/TrafficModel.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.constant;\n\nimport androidx.annotation.StringDef;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n/**\n * Traffic Model.\n *\n * @since 1.2.1\n */\npublic class TrafficModel {\n    /**\n     * (default) Indicates that the returned duration_in_traffic should be the best estimate\n     * of travel time given what is known about both historical traffic conditions and live\n     * traffic. Live traffic becomes more important the closer the departure_time is to now.\n     *\n     * @since 1.2.1\n     */\n    public static final String BEST_GUESS = \"best_guess\";\n    /**\n     * Indicates that the returned duration_in_traffic should be longer than the actual travel\n     * time on most days, though occasional days with particularly bad traffic conditions may\n     * exceed this value.\n     *\n     * @since 1.2.1\n     */\n    public static final String PESSIMISTIC = \"pessimistic\";\n    /**\n     * Indicates that the returned duration_in_traffic should be shorter than the actual travel\n     * time on most days, though occasional days with particularly good traffic conditions may\n     * be faster than this value.\n     *\n     * @since 1.2.1\n     */\n    public static final String OPTIMISTIC = \"optimistic\";\n\n    @Retention(RetentionPolicy.SOURCE)\n    @StringDef({\n            BEST_GUESS,\n            PESSIMISTIC,\n            OPTIMISTIC\n    })\n    public @interface Value {\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/TransitMode.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.constant;\n\nimport androidx.annotation.StringDef;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n/**\n * Transit mode.\n *\n * @since 1.0.0\n */\npublic class TransitMode {\n    /**\n     * Indicates that the calculated route should prefer travel by bus.\n     *\n     * @since 1.0.0\n     */\n    public static final String BUS = \"bus\";\n    /**\n     * indicates that the calculated route should prefer travel by subway.\n     *\n     * @since 1.0.0\n     */\n    public static final String SUBWAY = \"subway\";\n    /**\n     * Indicates that the calculated route should prefer travel by train.\n     *\n     * @since 1.0.0\n     */\n    public static final String TRAIN = \"train\";\n    /**\n     * Indicates that the calculated route should prefer travel by tram and light rail.\n     *\n     * @since 1.0.0\n     */\n    public static final String TRAM = \"tram\";\n    /**\n     * Indicates that the calculated route should prefer travel by train, tram, light rail, and subway.\n     *\n     * @since 1.0.0\n     */\n    public static final String RAIL = \"rail\";\n\n    @Retention(RetentionPolicy.SOURCE)\n    @StringDef({\n            BUS,\n            SUBWAY,\n            TRAIN,\n            TRAM,\n            RAIL\n    })\n    public @interface Value {\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/TransitRoutingPreference.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.constant;\n\nimport androidx.annotation.StringDef;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n/**\n * Traffic Model.\n *\n * @since 1.2.1\n */\npublic class TransitRoutingPreference {\n    /**\n     * Indicates that the calculated route should prefer limited amounts of walking.\n     *\n     * @since 1.2.1\n     */\n    public static final String LESS_WALKING = \"less_walking\";\n    /**\n     * Indicates that the calculated route should prefer a limited number of transfers.\n     *\n     * @since 1.2.1\n     */\n    public static final String FEWER_TRANSFERS = \"fewer_transfers\";\n\n    @Retention(RetentionPolicy.SOURCE)\n    @StringDef({\n            LESS_WALKING,\n            FEWER_TRANSFERS\n    })\n    public @interface Value {\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/TransportMode.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.constant;\n\nimport androidx.annotation.StringDef;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n/**\n * Transport mode.\n *\n * @since 1.0.0\n */\npublic class TransportMode {\n    /**\n     * (default) Indicates standard driving directions using the road network.\n     *\n     * @since 1.0.0\n     */\n    public static final String DRIVING = \"driving\";\n    /**\n     * Requests walking directions via pedestrian paths & sidewalks (where available).\n     *\n     * @since 1.0.0\n     */\n    public static final String WALKING = \"walking\";\n    /**\n     * Requests bicycling directions via bicycle paths & preferred streets (where available).\n     *\n     * @since 1.0.0\n     */\n    public static final String BICYCLING = \"bicycling\";\n    /**\n     * Requests directions via public transit routes (where available).\n     *\n     * @since 1.0.0\n     */\n    public static final String TRANSIT = \"transit\";\n\n    @Retention(RetentionPolicy.SOURCE)\n    @StringDef({\n            DRIVING,\n            WALKING,\n            BICYCLING,\n            TRANSIT\n    })\n    public @interface Value {\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/Unit.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.constant;\n\nimport androidx.annotation.StringDef;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n/**\n * Unit.\n *\n * @since 1.0.0\n */\npublic class Unit {\n    /**\n     * Specifies usage of the metric system. Textual distances are returned using kilometers and meters.\n     *\n     * @since 1.0.0\n     */\n    public static final String METRIC = \"metric\";\n    /**\n     * Specifies usage of the Imperial (English) system. Textual distances are returned using miles and feet.\n     *\n     * @since 1.0.0\n     */\n    public static final String IMPERIAL = \"imperial\";\n\n    @Retention(RetentionPolicy.SOURCE)\n    @StringDef({\n            METRIC,\n            IMPERIAL\n    })\n    public @interface Value {\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/constant/VehicleType.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.constant;\n\n/**\n * Vehicle type.\n *\n * @since 1.0.0\n */\n@SuppressWarnings(\"unused\")\npublic class VehicleType {\n    /**\n     * Rail.\n     *\n     * @since 1.0.0\n     */\n    public static final String RAIL = \"RAIL\";\n    /**\n     * Light rail transit.\n     *\n     * @since 1.0.0\n     */\n    public static final String METRO_RAIL = \"METRO_RAIL\";\n    /**\n     * Underground light rail.\n     *\n     * @since 1.0.0\n     */\n    public static final String SUBWAY = \"SUBWAY\";\n    /**\n     * Above ground light rail.\n     *\n     * @since 1.0.0\n     */\n    public static final String TRAM = \"TRAM\";\n    /**\n     * Monorail.\n     *\n     * @since 1.0.0\n     */\n    public static final String MONORAIL = \"MONORAIL\";\n    /**\n     * Heavy rail.\n     *\n     * @since 1.0.0\n     */\n    public static final String HEAVY_RAIL = \"HEAVY_RAIL\";\n    /**\n     * Commuter rail.\n     *\n     * @since 1.0.0\n     */\n    public static final String COMMUTER_TRAIN = \"COMMUTER_TRAIN\";\n    /**\n     * High speed train.\n     *\n     * @since 1.0.0\n     */\n    public static final String HIGH_SPEED_TRAIN = \"HIGH_SPEED_TRAIN\";\n    /**\n     * Long distance train.\n     *\n     * @since 1.2.1\n     */\n    public static final String LONG_DISTANCE_TRAIN = \"LONG_DISTANCE_TRAIN\";\n    /**\n     * Bus.\n     *\n     * @since 1.0.0\n     */\n    public static final String BUS = \"BUS\";\n    /**\n     * Intercity bus.\n     *\n     * @since 1.0.0\n     */\n    public static final String INTERCITY_BUS = \"INTERCITY_BUS\";\n    /**\n     * Trolleybus.\n     *\n     * @since 1.0.0\n     */\n    public static final String TROLLEYBUS = \"TROLLEYBUS\";\n    /**\n     * Share taxi is a kind of bus with the ability to drop\n     * off and pick up passengers anywhere on its route.\n     *\n     * @since 1.0.0\n     */\n    public static final String SHARE_TAXI = \"SHARE_TAXI\";\n    /**\n     * Ferry.\n     *\n     * @since 1.0.0\n     */\n    public static final String FERRY = \"FERRY\";\n    /**\n     * A vehicle that operates on a cable, usually on the ground.\n     * Aerial cable cars may be of the type {@value #GONDOLA_LIFT}.\n     *\n     * @since 1.0.0\n     */\n    public static final String CABLE_CAR = \"CABLE_CAR\";\n    /**\n     * An aerial cable car.\n     *\n     * @since 1.0.0\n     */\n    public static final String GONDOLA_LIFT = \"GONDOLA_LIFT\";\n    /**\n     * A vehicle that is pulled up a steep incline by a cable.\n     * A Funicular typically consists of two cars, with each car\n     * acting as a counterweight for the other.\n     *\n     * @since 1.0.0\n     */\n    public static final String FUNICULAR = \"FUNICULAR\";\n    /**\n     * All other vehicles will return this type.\n     *\n     * @since 1.0.0\n     */\n    public static final String OTHER = \"OTHER\";\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Agency.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Agency implements Parcelable {\n    @SerializedName(\"name\")\n    private String name;\n    @SerializedName(\"url\")\n    private String url;\n\n    public Agency() {\n    }\n\n    protected Agency(Parcel in) {\n        name = in.readString();\n        url = in.readString();\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getUrl() {\n        return url;\n    }\n\n    public void setUrl(String url) {\n        this.url = url;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeString(name);\n        dest.writeString(url);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<Agency> CREATOR = new Creator<Agency>() {\n        @Override\n        public Agency createFromParcel(Parcel in) {\n            return new Agency(in);\n        }\n\n        @Override\n        public Agency[] newArray(int size) {\n            return new Agency[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Bound.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Bound implements Parcelable {\n    @SerializedName(\"northeast\")\n    private Coordination northeast;\n    @SerializedName(\"southwest\")\n    private Coordination southwest;\n\n    public Bound() {\n    }\n\n    protected Bound(Parcel in) {\n        northeast = in.readParcelable(Coordination.class.getClassLoader());\n        southwest = in.readParcelable(Coordination.class.getClassLoader());\n    }\n\n    public Coordination getNortheastCoordination() {\n        return northeast;\n    }\n\n    public void setNortheast(Coordination northeast) {\n        this.northeast = northeast;\n    }\n\n    public Coordination getSouthwestCoordination() {\n        return southwest;\n    }\n\n    public void setSouthwest(Coordination southwest) {\n        this.southwest = southwest;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeParcelable(northeast, flags);\n        dest.writeParcelable(southwest, flags);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<Bound> CREATOR = new Creator<Bound>() {\n        @Override\n        public Bound createFromParcel(Parcel in) {\n            return new Bound(in);\n        }\n\n        @Override\n        public Bound[] newArray(int size) {\n            return new Bound[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Coordination.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.android.gms.maps.model.LatLng;\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Coordination implements Parcelable {\n    @SerializedName(\"lat\")\n    private double latitude;\n    @SerializedName(\"lng\")\n    private double longitude;\n\n    public Coordination() {\n    }\n\n    protected Coordination(Parcel in) {\n        latitude = in.readDouble();\n        longitude = in.readDouble();\n    }\n\n    public double getLatitude() {\n        return latitude;\n    }\n\n    public void setLatitude(double latitude) {\n        this.latitude = latitude;\n    }\n\n    public double getLongitude() {\n        return longitude;\n    }\n\n    public void setLongitude(double longitude) {\n        this.longitude = longitude;\n    }\n\n    public LatLng getCoordination() {\n        return new LatLng(latitude, longitude);\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeDouble(latitude);\n        dest.writeDouble(longitude);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<Coordination> CREATOR = new Creator<Coordination>() {\n        @Override\n        public Coordination createFromParcel(Parcel in) {\n            return new Coordination(in);\n        }\n\n        @Override\n        public Coordination[] newArray(int size) {\n            return new Coordination[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Direction.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.akexorcist.googledirection.constant.RequestResult;\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.List;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Direction implements Parcelable {\n    @SerializedName(\"geocoded_waypoints\")\n    private List<GeocodedWaypoint> geocodedWaypointList;\n    @SerializedName(\"routes\")\n    private List<Route> routeList;\n    @SerializedName(\"status\")\n    private String status;\n    @SerializedName(\"error_message\")\n    private String errorMessage;\n\n    public Direction() {\n    }\n\n    protected Direction(Parcel in) {\n        status = in.readString();\n        errorMessage = in.readString();\n    }\n\n    public void setGeocodedWaypointList(List<GeocodedWaypoint> geocodedWaypointList) {\n        this.geocodedWaypointList = geocodedWaypointList;\n    }\n\n    public List<GeocodedWaypoint> getGeocodedWaypointList() {\n        return geocodedWaypointList;\n    }\n\n    public void setRouteList(List<Route> routeList) {\n        this.routeList = routeList;\n    }\n\n    public List<Route> getRouteList() {\n        return routeList;\n    }\n\n    public void setStatus(String status) {\n        this.status = status;\n    }\n\n    public String getStatus() {\n        return status;\n    }\n\n    public void setErrorMessage(String errorMessage) {\n        this.errorMessage = errorMessage;\n    }\n\n    public String getErrorMessage() {\n        return errorMessage;\n    }\n\n    public boolean isOK() {\n        return RequestResult.OK.equals(status);\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeString(status);\n        dest.writeString(errorMessage);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<Direction> CREATOR = new Creator<Direction>() {\n        @Override\n        public Direction createFromParcel(Parcel in) {\n            return new Direction(in);\n        }\n\n        @Override\n        public Direction[] newArray(int size) {\n            return new Direction[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Fare.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Fare implements Parcelable {\n    @SerializedName(\"currency\")\n    private String currency;\n    @SerializedName(\"value\")\n    private String value;\n    @SerializedName(\"text\")\n    private String text;\n\n    public Fare() {\n    }\n\n    protected Fare(Parcel in) {\n        currency = in.readString();\n        value = in.readString();\n        text = in.readString();\n    }\n\n    public String getCurrency() {\n        return currency;\n    }\n\n    public void setCurrency(String currency) {\n        this.currency = currency;\n    }\n\n    public String getValue() {\n        return value;\n    }\n\n    public void setValue(String value) {\n        this.value = value;\n    }\n\n    public String getText() {\n        return text;\n    }\n\n    public void setText(String text) {\n        this.text = text;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeString(currency);\n        dest.writeString(value);\n        dest.writeString(text);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<Fare> CREATOR = new Creator<Fare>() {\n        @Override\n        public Fare createFromParcel(Parcel in) {\n            return new Fare(in);\n        }\n\n        @Override\n        public Fare[] newArray(int size) {\n            return new Fare[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/GeocodedWaypoint.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.List;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class GeocodedWaypoint implements Parcelable {\n    @SerializedName(\"geocoder_status\")\n    private String status;\n    @SerializedName(\"place_id\")\n    private String placeId;\n    @SerializedName(\"types\")\n    private List<String> typeList;\n\n    public GeocodedWaypoint() {\n    }\n\n    protected GeocodedWaypoint(Parcel in) {\n        status = in.readString();\n        placeId = in.readString();\n        typeList = in.createStringArrayList();\n    }\n\n    public String getStatus() {\n        return status;\n    }\n\n    public void setStatus(String status) {\n        this.status = status;\n    }\n\n    public String getPlaceId() {\n        return placeId;\n    }\n\n    public void setPlaceId(String placeId) {\n        this.placeId = placeId;\n    }\n\n    public List<String> getTypeList() {\n        return typeList;\n    }\n\n    public void setTypeList(List<String> typeList) {\n        this.typeList = typeList;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeString(status);\n        dest.writeString(placeId);\n        dest.writeStringList(typeList);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<GeocodedWaypoint> CREATOR = new Creator<GeocodedWaypoint>() {\n        @Override\n        public GeocodedWaypoint createFromParcel(Parcel in) {\n            return new GeocodedWaypoint(in);\n        }\n\n        @Override\n        public GeocodedWaypoint[] newArray(int size) {\n            return new GeocodedWaypoint[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Info.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Info implements Parcelable {\n    @SerializedName(\"text\")\n    private String text;\n    @SerializedName(\"value\")\n    private Long value;\n\n    public Info() {\n    }\n\n    protected Info(Parcel in) {\n        text = in.readString();\n        value = in.readLong();\n    }\n\n    public String getText() {\n        return text;\n    }\n\n    public void setText(String text) {\n        this.text = text;\n    }\n\n    public Long getValue() {\n        return value;\n    }\n\n    public void setValue(Long value) {\n        this.value = value;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeString(text);\n        dest.writeLong(value);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<Info> CREATOR = new Creator<Info>() {\n        @Override\n        public Info createFromParcel(Parcel in) {\n            return new Info(in);\n        }\n\n        @Override\n        public Info[] newArray(int size) {\n            return new Info[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Leg.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport com.akexorcist.googledirection.util.DirectionConverter;\nimport com.google.android.gms.maps.model.LatLng;\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\npublic class Leg {\n    @SerializedName(\"arrival_time\")\n    private TimeInfo arrivalTime;\n    @SerializedName(\"departure_time\")\n    private TimeInfo departureTime;\n    @SerializedName(\"distance\")\n    private Info distance;\n    @SerializedName(\"duration\")\n    private Info duration;\n    @SerializedName(\"duration_in_traffic\")\n    private Info durationInTraffic;\n    @SerializedName(\"end_address\")\n    private String endAddress;\n    @SerializedName(\"end_location\")\n    private Coordination endLocation;\n    @SerializedName(\"start_address\")\n    private String startAddress;\n    @SerializedName(\"start_location\")\n    private Coordination startLocation;\n    @SerializedName(\"steps\")\n    private List<Step> stepList;\n    @SerializedName(\"via_waypoint\")\n    private List<Waypoint> viaWaypointList;\n\n    public TimeInfo getArrivalTime() {\n        return arrivalTime;\n    }\n\n    public void setArrivalTime(TimeInfo arrivalTime) {\n        this.arrivalTime = arrivalTime;\n    }\n\n    public TimeInfo getDepartureTime() {\n        return departureTime;\n    }\n\n    public void setDepartureTime(TimeInfo departureTime) {\n        this.departureTime = departureTime;\n    }\n\n    public Info getDistance() {\n        return distance;\n    }\n\n    public void setDistance(Info distance) {\n        this.distance = distance;\n    }\n\n    public Info getDuration() {\n        return duration;\n    }\n\n    public void setDuration(Info duration) {\n        this.duration = duration;\n    }\n\n    public Info getDurationInTraffic() {\n        return durationInTraffic;\n    }\n\n    public void setDurationInTraffic(Info durationInTraffic) {\n        this.durationInTraffic = durationInTraffic;\n    }\n\n    public String getEndAddress() {\n        return endAddress;\n    }\n\n    public void setEndAddress(String endAddress) {\n        this.endAddress = endAddress;\n    }\n\n    public Coordination getEndLocation() {\n        return endLocation;\n    }\n\n    public void setEndLocation(Coordination endLocation) {\n        this.endLocation = endLocation;\n    }\n\n    public String getStartAddress() {\n        return startAddress;\n    }\n\n    public void setStartAddress(String startAddress) {\n        this.startAddress = startAddress;\n    }\n\n    public Coordination getStartLocation() {\n        return startLocation;\n    }\n\n    public void setStartLocation(Coordination startLocation) {\n        this.startLocation = startLocation;\n    }\n\n    public List<Step> getStepList() {\n        return stepList;\n    }\n\n    public void setStepList(List<Step> stepList) {\n        this.stepList = stepList;\n    }\n\n    public List<Waypoint> getViaWaypointList() {\n        return viaWaypointList;\n    }\n\n    public void setViaWaypointList(List<Waypoint> viaWaypointList) {\n        this.viaWaypointList = viaWaypointList;\n    }\n\n    public ArrayList<LatLng> getDirectionPoint() {\n        return DirectionConverter.getDirectionPoint(stepList);\n    }\n\n    public ArrayList<LatLng> getSectionPoint() {\n        return DirectionConverter.getSectionPoint(stepList);\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Line.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.List;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Line implements Parcelable {\n    @SerializedName(\"agencies\")\n    private List<Agency> agencyList;\n    @SerializedName(\"color\")\n    private String color;\n    @SerializedName(\"name\")\n    private String name;\n    @SerializedName(\"short_name\")\n    private String shortName;\n    @SerializedName(\"text_color\")\n    private String textColor;\n    @SerializedName(\"vehicle\")\n    private Vehicle vehicle;\n\n    public Line() {\n    }\n\n    protected Line(Parcel in) {\n        agencyList = in.createTypedArrayList(Agency.CREATOR);\n        color = in.readString();\n        name = in.readString();\n        shortName = in.readString();\n        textColor = in.readString();\n    }\n\n    public List<Agency> getAgencyList() {\n        return agencyList;\n    }\n\n    public void setAgencyList(List<Agency> agencyList) {\n        this.agencyList = agencyList;\n    }\n\n    public String getColor() {\n        return color;\n    }\n\n    public void setColor(String color) {\n        this.color = color;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getShortName() {\n        return shortName;\n    }\n\n    public void setShortName(String shortName) {\n        this.shortName = shortName;\n    }\n\n    public String getTextColor() {\n        return textColor;\n    }\n\n    public void setTextColor(String textColor) {\n        this.textColor = textColor;\n    }\n\n    public Vehicle getVehicle() {\n        return vehicle;\n    }\n\n    public void setVehicle(Vehicle vehicle) {\n        this.vehicle = vehicle;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeTypedList(agencyList);\n        dest.writeString(color);\n        dest.writeString(name);\n        dest.writeString(shortName);\n        dest.writeString(textColor);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<Line> CREATOR = new Creator<Line>() {\n        @Override\n        public Line createFromParcel(Parcel in) {\n            return new Line(in);\n        }\n\n        @Override\n        public Line[] newArray(int size) {\n            return new Line[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Route.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.List;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Route implements Parcelable {\n    @SerializedName(\"bounds\")\n    private Bound bound;\n    @SerializedName(\"copyrights\")\n    private String copyrights;\n    @SerializedName(\"legs\")\n    private List<Leg> legList;\n    @SerializedName(\"overview_polyline\")\n    private RoutePolyline overviewPolyline;\n    @SerializedName(\"summary\")\n    private String summary;\n    @SerializedName(\"fare\")\n    private Fare fare;\n    @SerializedName(\"warnings\")\n    private List<String> warningList;\n    @SerializedName(\"waypoint_order\")\n    private List<Long> waypointOrderList;\n\n    public Route() {\n    }\n\n    protected Route(Parcel in) {\n        bound = in.readParcelable(Bound.class.getClassLoader());\n        copyrights = in.readString();\n        overviewPolyline = in.readParcelable(RoutePolyline.class.getClassLoader());\n        summary = in.readString();\n        fare = in.readParcelable(Fare.class.getClassLoader());\n        warningList = in.createStringArrayList();\n    }\n\n    public Bound getBound() {\n        return bound;\n    }\n\n    public void setBound(Bound bound) {\n        this.bound = bound;\n    }\n\n    public String getCopyrights() {\n        return copyrights;\n    }\n\n    public void setCopyrights(String copyrights) {\n        this.copyrights = copyrights;\n    }\n\n    public List<Leg> getLegList() {\n        return legList;\n    }\n\n    public void setLegList(List<Leg> legList) {\n        this.legList = legList;\n    }\n\n    public RoutePolyline getOverviewPolyline() {\n        return overviewPolyline;\n    }\n\n    public void setOverviewPolyline(RoutePolyline overviewPolyline) {\n        this.overviewPolyline = overviewPolyline;\n    }\n\n    public String getSummary() {\n        return summary;\n    }\n\n    public void setSummary(String summary) {\n        this.summary = summary;\n    }\n\n    public Fare getFare() {\n        return fare;\n    }\n\n    public void setFare(Fare fare) {\n        this.fare = fare;\n    }\n\n    public List<String> getWarningList() {\n        return warningList;\n    }\n\n    public void setWarningList(List<String> warningList) {\n        this.warningList = warningList;\n    }\n\n    public List<Long> getWaypointOrderList() {\n        return waypointOrderList;\n    }\n\n    public void setWaypointOrderList(List<Long> waypointOrderList) {\n        this.waypointOrderList = waypointOrderList;\n    }\n\n    /**\n     * Get the total duration in meters\n     */\n    public Long getTotalDistance() {\n        if (legList == null || legList.size() == 0) {\n            return 0L;\n        }\n        Long totalDistance = 0L;\n        for (Leg leg : legList) {\n            totalDistance += leg.getDistance().getValue();\n        }\n        return totalDistance;\n    }\n\n    /**\n     * Get the total duration in seconds\n     */\n    public Long getTotalDuration() {\n        if (legList == null || legList.size() == 0) {\n            return 0L;\n        }\n        Long totalDuration = 0L;\n        for (Leg leg : legList) {\n            totalDuration += leg.getDuration().getValue();\n        }\n        return totalDuration;\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    @Override\n    public void writeToParcel(Parcel parcel, int i) {\n        parcel.writeParcelable(bound, i);\n        parcel.writeString(copyrights);\n        parcel.writeParcelable(overviewPolyline, i);\n        parcel.writeString(summary);\n        parcel.writeParcelable(fare, i);\n        parcel.writeStringList(warningList);\n    }\n\n    public static final Creator<Route> CREATOR = new Creator<Route>() {\n        @Override\n        public Route createFromParcel(Parcel in) {\n            return new Route(in);\n        }\n\n        @Override\n        public Route[] newArray(int size) {\n            return new Route[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/RoutePolyline.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.android.gms.maps.model.LatLng;\nimport com.google.gson.annotations.SerializedName;\nimport com.google.maps.android.PolyUtil;\n\nimport java.util.List;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class RoutePolyline implements Parcelable {\n    @SerializedName(\"points\")\n    private String rawPointList;\n\n    public RoutePolyline() {\n    }\n\n    protected RoutePolyline(Parcel in) {\n        rawPointList = in.readString();\n    }\n\n    public String getRawPointList() {\n        return rawPointList;\n    }\n\n    public void setRawPointList(String rawPointList) {\n        this.rawPointList = rawPointList;\n    }\n\n    public List<LatLng> getPointList() {\n        return PolyUtil.decode(rawPointList);\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeString(rawPointList);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<RoutePolyline> CREATOR = new Creator<RoutePolyline>() {\n        @Override\n        public RoutePolyline createFromParcel(Parcel in) {\n            return new RoutePolyline(in);\n        }\n\n        @Override\n        public RoutePolyline[] newArray(int size) {\n            return new RoutePolyline[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Step.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.List;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Step implements Parcelable {\n    @SerializedName(\"distance\")\n    private Info distance;\n    @SerializedName(\"duration\")\n    private Info duration;\n    @SerializedName(\"end_location\")\n    private Coordination endLocation;\n    @SerializedName(\"html_instructions\")\n    private String htmlInstruction;\n    @SerializedName(\"maneuver\")\n    private String maneuver;\n    @SerializedName(\"start_location\")\n    private Coordination startLocation;\n    @SerializedName(\"transit_details\")\n    private TransitDetail transitDetail;\n    @SerializedName(\"steps\")\n    private List<Step> stepList;\n    @SerializedName(\"polyline\")\n    private RoutePolyline polyline;\n    @SerializedName(\"travel_mode\")\n    private String travelMode;\n\n    public Step() {\n    }\n\n    protected Step(Parcel in) {\n        distance = in.readParcelable(Info.class.getClassLoader());\n        duration = in.readParcelable(Info.class.getClassLoader());\n        endLocation = in.readParcelable(Coordination.class.getClassLoader());\n        htmlInstruction = in.readString();\n        maneuver = in.readString();\n        startLocation = in.readParcelable(Coordination.class.getClassLoader());\n        stepList = in.createTypedArrayList(Step.CREATOR);\n        travelMode = in.readString();\n    }\n\n    public Info getDistance() {\n        return distance;\n    }\n\n    public void setDistance(Info distance) {\n        this.distance = distance;\n    }\n\n    public Info getDuration() {\n        return duration;\n    }\n\n    public void setDuration(Info duration) {\n        this.duration = duration;\n    }\n\n    public Coordination getEndLocation() {\n        return endLocation;\n    }\n\n    public void setEndLocation(Coordination endLocation) {\n        this.endLocation = endLocation;\n    }\n\n    public String getHtmlInstruction() {\n        return htmlInstruction;\n    }\n\n    public void setHtmlInstruction(String htmlInstruction) {\n        this.htmlInstruction = htmlInstruction;\n    }\n\n    public String getManeuver() {\n        return maneuver;\n    }\n\n    public void setManeuver(String maneuver) {\n        this.maneuver = maneuver;\n    }\n\n    public Coordination getStartLocation() {\n        return startLocation;\n    }\n\n    public void setStartLocation(Coordination startLocation) {\n        this.startLocation = startLocation;\n    }\n\n    public TransitDetail getTransitDetail() {\n        return transitDetail;\n    }\n\n    public void setTransitDetail(TransitDetail transitDetail) {\n        this.transitDetail = transitDetail;\n    }\n\n    public List<Step> getStepList() {\n        return stepList;\n    }\n\n    public void setStepList(List<Step> stepList) {\n        this.stepList = stepList;\n    }\n\n    public boolean isContainStepList() {\n        return stepList != null && stepList.size() > 0;\n    }\n\n    public RoutePolyline getPolyline() {\n        return polyline;\n    }\n\n    public void setPolyline(RoutePolyline polyline) {\n        this.polyline = polyline;\n    }\n\n    public String getTravelMode() {\n        return travelMode;\n    }\n\n    public void setTravelMode(String travelMode) {\n        this.travelMode = travelMode;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeParcelable(distance, flags);\n        dest.writeParcelable(duration, flags);\n        dest.writeParcelable(endLocation, flags);\n        dest.writeString(htmlInstruction);\n        dest.writeString(maneuver);\n        dest.writeParcelable(startLocation, flags);\n        dest.writeTypedList(stepList);\n        dest.writeString(travelMode);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<Step> CREATOR = new Creator<Step>() {\n        @Override\n        public Step createFromParcel(Parcel in) {\n            return new Step(in);\n        }\n\n        @Override\n        public Step[] newArray(int size) {\n            return new Step[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/StopPoint.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class StopPoint implements Parcelable {\n    @SerializedName(\"location\")\n    private Coordination location;\n    @SerializedName(\"name\")\n    private String name;\n\n    public StopPoint() {\n    }\n\n    protected StopPoint(Parcel in) {\n        location = in.readParcelable(Coordination.class.getClassLoader());\n        name = in.readString();\n    }\n\n    public Coordination getLocation() {\n        return location;\n    }\n\n    public void setLocation(Coordination location) {\n        this.location = location;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeParcelable(location, flags);\n        dest.writeString(name);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<StopPoint> CREATOR = new Creator<StopPoint>() {\n        @Override\n        public StopPoint createFromParcel(Parcel in) {\n            return new StopPoint(in);\n        }\n\n        @Override\n        public StopPoint[] newArray(int size) {\n            return new StopPoint[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/TimeInfo.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class TimeInfo implements Parcelable {\n    @SerializedName(\"text\")\n    private String text;\n    @SerializedName(\"time_zone\")\n    private String timeZone;\n    @SerializedName(\"value\")\n    private String value;\n\n    public TimeInfo() {\n    }\n\n    protected TimeInfo(Parcel in) {\n        text = in.readString();\n        timeZone = in.readString();\n        value = in.readString();\n    }\n\n    public String getText() {\n        return text;\n    }\n\n    public void setText(String text) {\n        this.text = text;\n    }\n\n    public String getTimeZone() {\n        return timeZone;\n    }\n\n    public void setTimeZone(String timeZone) {\n        this.timeZone = timeZone;\n    }\n\n    public String getValue() {\n        return value;\n    }\n\n    public void setValue(String value) {\n        this.value = value;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeString(text);\n        dest.writeString(timeZone);\n        dest.writeString(value);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<TimeInfo> CREATOR = new Creator<TimeInfo>() {\n        @Override\n        public TimeInfo createFromParcel(Parcel in) {\n            return new TimeInfo(in);\n        }\n\n        @Override\n        public TimeInfo[] newArray(int size) {\n            return new TimeInfo[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/TransitDetail.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class TransitDetail implements Parcelable {\n    @SerializedName(\"arrival_stop\")\n    private StopPoint arrivalStopPoint;\n    @SerializedName(\"arrival_time\")\n    private TimeInfo arrivalTime;\n    @SerializedName(\"departure_stop\")\n    private StopPoint departureStopPoint;\n    @SerializedName(\"departure_time\")\n    private TimeInfo departureTime;\n    @SerializedName(\"line\")\n    private Line line;\n    @SerializedName(\"headsign\")\n    private String headsign;\n    @SerializedName(\"num_stops\")\n    private String stopNumber;\n\n    public TransitDetail() {\n    }\n\n    protected TransitDetail(Parcel in) {\n        arrivalStopPoint = in.readParcelable(StopPoint.class.getClassLoader());\n        arrivalTime = in.readParcelable(TimeInfo.class.getClassLoader());\n        departureStopPoint = in.readParcelable(StopPoint.class.getClassLoader());\n        departureTime = in.readParcelable(TimeInfo.class.getClassLoader());\n        line = in.readParcelable(Line.class.getClassLoader());\n        headsign = in.readString();\n        stopNumber = in.readString();\n    }\n\n    public StopPoint getArrivalStopPoint() {\n        return arrivalStopPoint;\n    }\n\n    public void setArrivalStopPoint(StopPoint arrivalStopPoint) {\n        this.arrivalStopPoint = arrivalStopPoint;\n    }\n\n    public TimeInfo getArrivalTime() {\n        return arrivalTime;\n    }\n\n    public void setArrivalTime(TimeInfo arrivalTime) {\n        this.arrivalTime = arrivalTime;\n    }\n\n    public StopPoint getDepartureStopPoint() {\n        return departureStopPoint;\n    }\n\n    public void setDepartureStopPoint(StopPoint departureStopPoint) {\n        this.departureStopPoint = departureStopPoint;\n    }\n\n    public TimeInfo getDepartureTime() {\n        return departureTime;\n    }\n\n    public void setDepartureTime(TimeInfo departureTime) {\n        this.departureTime = departureTime;\n    }\n\n    public Line getLine() {\n        return line;\n    }\n\n    public void setLine(Line line) {\n        this.line = line;\n    }\n\n    public String getHeadsign() {\n        return headsign;\n    }\n\n    public void setHeadsign(String headsign) {\n        this.headsign = headsign;\n    }\n\n    public String getStopNumber() {\n        return stopNumber;\n    }\n\n    public void setStopNumber(String stopNumber) {\n        this.stopNumber = stopNumber;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeParcelable(arrivalStopPoint, flags);\n        dest.writeParcelable(arrivalTime, flags);\n        dest.writeParcelable(departureStopPoint, flags);\n        dest.writeParcelable(departureTime, flags);\n        dest.writeParcelable(line, flags);\n        dest.writeString(headsign);\n        dest.writeString(stopNumber);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<TransitDetail> CREATOR = new Creator<TransitDetail>() {\n        @Override\n        public TransitDetail createFromParcel(Parcel in) {\n            return new TransitDetail(in);\n        }\n\n        @Override\n        public TransitDetail[] newArray(int size) {\n            return new TransitDetail[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Vehicle.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Vehicle implements Parcelable {\n    @SerializedName(\"icon\")\n    private String iconUrl;\n    @SerializedName(\"name\")\n    private String name;\n    @SerializedName(\"type\")\n    private String type;\n\n    public Vehicle() {\n    }\n\n    protected Vehicle(Parcel in) {\n        iconUrl = in.readString();\n        name = in.readString();\n        type = in.readString();\n    }\n\n    public String getIconUrl() {\n        return iconUrl;\n    }\n\n    public void setIconUrl(String iconUrl) {\n        this.iconUrl = iconUrl;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getType() {\n        return type;\n    }\n\n    public void setType(String type) {\n        this.type = type;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeString(iconUrl);\n        dest.writeString(name);\n        dest.writeString(type);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<Vehicle> CREATOR = new Creator<Vehicle>() {\n        @Override\n        public Vehicle createFromParcel(Parcel in) {\n            return new Vehicle(in);\n        }\n\n        @Override\n        public Vehicle[] newArray(int size) {\n            return new Vehicle[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/model/Waypoint.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.model;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport com.google.gson.annotations.SerializedName;\n\n\n/**\n * Created by Akexorcist on 11/29/15 AD.\n */\n\n@SuppressWarnings(\"WeakerAccess\")\npublic class Waypoint implements Parcelable {\n    @SerializedName(\"location\")\n    private Coordination location;\n    @SerializedName(\"step_index\")\n    private int index;\n    @SerializedName(\"step_interpolation\")\n    private double interpolation;\n\n    public Waypoint() {\n    }\n\n    protected Waypoint(Parcel in) {\n        location = in.readParcelable(Coordination.class.getClassLoader());\n        index = in.readInt();\n        interpolation = in.readDouble();\n    }\n\n    public Coordination getLocation() {\n        return location;\n    }\n\n    public void setLocation(Coordination location) {\n        this.location = location;\n    }\n\n    public int getIndex() {\n        return index;\n    }\n\n    public void setIndex(int index) {\n        this.index = index;\n    }\n\n    public double getInterpolation() {\n        return interpolation;\n    }\n\n    public void setInterpolation(double interpolation) {\n        this.interpolation = interpolation;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeParcelable(location, flags);\n        dest.writeInt(index);\n        dest.writeDouble(interpolation);\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<Waypoint> CREATOR = new Creator<Waypoint>() {\n        @Override\n        public Waypoint createFromParcel(Parcel in) {\n            return new Waypoint(in);\n        }\n\n        @Override\n        public Waypoint[] newArray(int size) {\n            return new Waypoint[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/network/DirectionConnection.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.network;\n\nimport com.akexorcist.googledirection.config.GoogleDirectionConfiguration;\nimport com.akexorcist.googledirection.constant.DirectionUrl;\n\nimport okhttp3.OkHttpClient;\nimport okhttp3.logging.HttpLoggingInterceptor;\nimport retrofit2.Retrofit;\nimport retrofit2.converter.gson.GsonConverterFactory;\n\n/**\n * For internal use.\n */\npublic class DirectionConnection {\n    private static DirectionConnection connection;\n\n    public static DirectionConnection getInstance() {\n        if (connection == null) {\n            connection = new DirectionConnection();\n        }\n        return connection;\n    }\n\n    private DirectionService service;\n\n    public DirectionService createService() {\n        if (service == null) {\n            Retrofit retrofit = new Retrofit.Builder()\n                    .client(getClient())\n                    .baseUrl(DirectionUrl.MAPS_API_URL)\n                    .addConverterFactory(GsonConverterFactory.create())\n                    .build();\n            service = retrofit.create(DirectionService.class);\n        }\n        return service;\n    }\n\n    private OkHttpClient getClient() {\n        OkHttpClient client = GoogleDirectionConfiguration.getInstance().getCustomClient();\n        if (client != null) {\n            return client;\n        }\n        return createDefaultClient();\n    }\n\n    private OkHttpClient createDefaultClient() {\n        OkHttpClient.Builder builder = new OkHttpClient.Builder();\n        if (GoogleDirectionConfiguration.getInstance().isLogEnabled()) {\n            HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n            interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n            builder.addInterceptor(interceptor);\n        }\n        return builder.build();\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/network/DirectionService.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.network;\n\nimport com.akexorcist.googledirection.constant.DirectionUrl;\nimport com.akexorcist.googledirection.model.Direction;\n\nimport retrofit2.Call;\nimport retrofit2.http.GET;\nimport retrofit2.http.Query;\n\n/**\n * For internal use.\n */\npublic interface DirectionService {\n\n    @GET(DirectionUrl.DIRECTION_API_URL)\n    Call<Direction> getDirection(@Query(\"origin\") String origin,\n                                 @Query(\"destination\") String destination,\n                                 @Query(\"waypoints\") String waypoints,\n                                 @Query(\"mode\") String transportMode,\n                                 @Query(\"departure_time\") String departureTime,\n                                 @Query(\"language\") String language,\n                                 @Query(\"units\") String units,\n                                 @Query(\"avoid\") String avoid,\n                                 @Query(\"transit_mode\") String transitMode,\n                                 @Query(\"traffic_model\") String trafficModel,\n                                 @Query(\"transit_routing_preference\") String transitRoutingPreference,\n                                 @Query(\"alternatives\") boolean alternatives,\n                                 @Query(\"key\") String apiKey);\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/request/DirectionDestinationRequest.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.request;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\n\nimport com.google.android.gms.maps.model.LatLng;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * The class for assign the waypoints and destination position.\n *\n * @since 1.0.0\n */\npublic class DirectionDestinationRequest {\n    @NonNull\n    private String apiKey;\n    @NonNull\n    private LatLng origin;\n    @Nullable\n    private List<LatLng> waypointList;\n\n    public DirectionDestinationRequest(@NonNull String apiKey, @NonNull LatLng origin) {\n        this.apiKey = apiKey;\n        this.origin = origin;\n    }\n\n    /**\n     * Assign the waypoint position of the request\n     *\n     * @param waypoint The latitude and longitude of waypoint position.\n     * @return This destination request object.\n     * @since 1.0.0\n     */\n    public DirectionDestinationRequest and(@NonNull LatLng waypoint) {\n        if (waypointList == null) {\n            waypointList = new ArrayList<>();\n        }\n        waypointList.add(waypoint);\n        return this;\n    }\n\n    /**\n     * Assign the waypoint position of the request as a list.\n     *\n     * @param waypointList The list of latitude and longitude of waypoint position.\n     * @return This destination request object.\n     * @since 1.0.0\n     */\n    public DirectionDestinationRequest and(@NonNull List<LatLng> waypointList) {\n        if (this.waypointList == null) {\n            this.waypointList = new ArrayList<>();\n        }\n        this.waypointList.addAll(waypointList);\n        return this;\n    }\n\n    /**\n     * Assign the destination position of the request.\n     *\n     * @param destination The latitude and longitude of destination position.\n     * @return The direction request object.\n     * @since 1.0.0\n     */\n    public DirectionRequest to(@NonNull LatLng destination) {\n        return new DirectionRequest(apiKey, origin, destination, waypointList);\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/request/DirectionOriginRequest.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.request;\n\nimport androidx.annotation.NonNull;\n\nimport com.google.android.gms.maps.model.LatLng;\n\n/**\n * The class for assign the origin position.\n *\n * @since 1.0.0\n */\npublic class DirectionOriginRequest {\n    @NonNull\n    private String apiKey;\n\n    public DirectionOriginRequest(@NonNull String apiKey) {\n        this.apiKey = apiKey;\n    }\n\n    /**\n     * Assign the origin coordination of the request.\n     *\n     * @param origin The latitude and longitude of origin position\n     * @return The destination request object.\n     * @since 1.0.0\n     */\n    public DirectionDestinationRequest from(@NonNull LatLng origin) {\n        return new DirectionDestinationRequest(apiKey, origin);\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/request/DirectionRequest.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.request;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\n\nimport com.akexorcist.googledirection.DirectionCallback;\nimport com.akexorcist.googledirection.constant.AvoidType;\nimport com.akexorcist.googledirection.constant.Language;\nimport com.akexorcist.googledirection.constant.TrafficModel;\nimport com.akexorcist.googledirection.constant.TransitMode;\nimport com.akexorcist.googledirection.constant.TransitRoutingPreference;\nimport com.akexorcist.googledirection.constant.TransportMode;\nimport com.akexorcist.googledirection.constant.Unit;\nimport com.akexorcist.googledirection.model.Direction;\nimport com.akexorcist.googledirection.network.DirectionConnection;\nimport com.google.android.gms.maps.model.LatLng;\n\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\nimport retrofit2.Call;\nimport retrofit2.Callback;\nimport retrofit2.Response;\n\n/**\n * The class for assign the addition parameter for the request and request execution.\n *\n * @since 1.0.0\n */\n@SuppressWarnings(\"unused\")\npublic class DirectionRequest {\n    private DirectionRequestParam param;\n\n    public DirectionRequest(@NonNull String apiKey, @NonNull LatLng origin, @NonNull LatLng destination, @Nullable List<LatLng> waypointList) {\n        param = new DirectionRequestParam().setApiKey(apiKey).setOrigin(origin).setDestination(destination).setWaypoints(waypointList);\n    }\n\n    /**\n     * Assign the transport mode of the request.\n     *\n     * @param transportMode the language value from @see {@link com.akexorcist.googledirection.constant.TransportMode}.\n     * @return This direction request object.\n     * @since 1.0.0\n     */\n    public DirectionRequest transportMode(@Nullable @TransportMode.Value String transportMode) {\n        param.setTransportMode(transportMode);\n        return this;\n    }\n\n    /**\n     * Assign the language of the request.\n     *\n     * @param language the language value from @see {@link com.akexorcist.googledirection.constant.Language}.\n     * @return This direction request object.\n     * @since 1.0.0\n     */\n    public DirectionRequest language(@Nullable @Language.Value String language) {\n        param.setLanguage(language);\n        return this;\n    }\n\n    /**\n     * Assign the unit of the request.\n     *\n     * @param unit the unit value from @see {@link com.akexorcist.googledirection.constant.Unit}.\n     * @return This direction request object.\n     * @since 1.0.0\n     */\n    public DirectionRequest unit(@Nullable @Unit.Value String unit) {\n        param.setUnit(unit);\n        return this;\n    }\n\n    /**\n     * Assign the route restriction to avoid of the request.\n     *\n     * @param avoid the route restriction to avoid value from @see {@link com.akexorcist.googledirection.constant.AvoidType}.\n     * @return This direction request object.\n     * @since 1.0.0\n     */\n    public DirectionRequest avoid(@Nullable @AvoidType.Value String avoid) {\n        String oldAvoid = param.getAvoid();\n        if (oldAvoid != null && !oldAvoid.isEmpty()) {\n            oldAvoid += \"|\";\n        } else {\n            oldAvoid = \"\";\n        }\n        oldAvoid += avoid;\n        param.setAvoid(oldAvoid);\n        return this;\n    }\n\n    /**\n     * Assign the transit mode of the request.\n     *\n     * @param transitMode the transit mode value from @see {@link com.akexorcist.googledirection.constant.TransitMode}.\n     * @return This direction request object.\n     * @since 1.0.0\n     */\n    public DirectionRequest transitMode(@Nullable @TransitMode.Value String transitMode) {\n        String oldTransitMode = param.getTransitMode();\n        if (oldTransitMode != null && !oldTransitMode.isEmpty()) {\n            oldTransitMode += \"|\";\n        } else {\n            oldTransitMode = \"\";\n        }\n        oldTransitMode += transitMode;\n        param.setTransitMode(oldTransitMode);\n        return this;\n    }\n\n    /**\n     * Specifies the assumptions to use when calculating time in traffic.\n     *\n     * @param trafficModel the traffic model value from @see {@link com.akexorcist.googledirection.constant.TrafficModel}.\n     * @return This direction request object.\n     * @since 1.2.1\n     */\n    public DirectionRequest trafficMode(@Nullable @TrafficModel.Value String trafficModel) {\n        param.setTrafficModel(trafficModel);\n        return this;\n    }\n\n    /**\n     * Specifies preferences for transit routes. Using this parameter, you can bias the\n     * options returned, rather than accepting the default best route chosen by the API.\n     *\n     * @param transitRoutingPreference the transit routing preference value from @see {@link com.akexorcist.googledirection.constant.TransitRoutingPreference}.\n     * @return This direction request object.\n     * @since 1.2.1\n     */\n    public DirectionRequest transitRoutingPreference(@Nullable @TransitRoutingPreference.Value String transitRoutingPreference) {\n        param.setTransitRoutingPreference(transitRoutingPreference);\n        return this;\n    }\n\n    /**\n     * Specifies whether require the alternative route result of the request.\n     *\n     * @param alternative True for include and false for exclude.\n     * @return This direction request object.\n     * @since 1.0.0\n     */\n    public DirectionRequest alternativeRoute(boolean alternative) {\n        param.setAlternatives(alternative);\n        return this;\n    }\n\n    /**\n     * Assign the departure time of the request.\n     *\n     * @param time The departure time.\n     * @return This direction request object.\n     * @since 1.0.0\n     */\n    public DirectionRequest departureTime(@Nullable String time) {\n        param.setDepartureTime(time);\n        return this;\n    }\n\n    /**\n     * Specifies whether require the optimized waypoint by reorder the waypoint in result.\n     *\n     * @param optimize True for optimize the waypoint and false for do not.\n     * @return This direction request object.\n     * @since 1.0.0\n     */\n    public DirectionRequest optimizeWaypoints(boolean optimize) {\n        param.setOptimizeWaypoints(optimize);\n        return this;\n    }\n\n    /**\n     * Require the optimized waypoint by reorder the waypoint in result.\n     *\n     * @param callback Callback for the direction request.\n     * @return The task for direction request.\n     * @since 1.0.0\n     */\n    public DirectionTask execute(@Nullable final DirectionCallback callback) {\n        String origin = null;\n        if (param.getOrigin() != null) {\n            origin = param.getOrigin().latitude + \",\" + param.getOrigin().longitude;\n        }\n        String destination = null;\n        if (param.getDestination() != null) {\n            destination = param.getDestination().latitude + \",\" + param.getDestination().longitude;\n        }\n        Call<Direction> direction = DirectionConnection.getInstance()\n                .createService()\n                .getDirection(origin,\n                        destination,\n                        waypointsToString(param.getWaypoints()),\n                        param.getTransportMode(),\n                        param.getDepartureTime(),\n                        param.getLanguage(),\n                        param.getUnit(),\n                        param.getAvoid(),\n                        param.getTransitMode(),\n                        param.getTrafficModel(),\n                        param.getTransitRoutingPreference(),\n                        param.isAlternatives(),\n                        param.getApiKey());\n\n        direction.enqueue(new Callback<Direction>() {\n            @Override\n            public void onResponse(@NotNull Call<Direction> call, @NotNull Response<Direction> response) {\n                if (callback != null) {\n                    callback.onDirectionSuccess(response.body());\n                }\n            }\n\n            @Override\n            public void onFailure(@NotNull Call<Direction> call, @NotNull Throwable t) {\n                if (callback != null) {\n                    callback.onDirectionFailure(t);\n                }\n            }\n        });\n        return new DirectionTask(direction);\n    }\n\n    /**\n     * For internal use.\n     */\n    private String waypointsToString(@Nullable List<LatLng> waypoints) {\n        if (waypoints != null && !waypoints.isEmpty()) {\n            StringBuilder string = new StringBuilder(param.isOptimizeWaypoints() ? \"optimize:true|\" : \"\");\n            string.append(waypoints.get(0).latitude).append(\",\").append(waypoints.get(0).longitude);\n            for (int i = 1; i < waypoints.size(); i++) {\n                string.append(\"|\").append(waypoints.get(i).latitude).append(\",\").append(waypoints.get(i).longitude);\n            }\n            return string.toString();\n        }\n        return null;\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/request/DirectionRequestParam.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.request;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\n\nimport com.google.android.gms.maps.model.LatLng;\n\nimport java.util.List;\n\n/**\n * For internal use.\n */\n@SuppressWarnings({\"WeakerAccess\", \"UnusedReturnValue\"})\npublic class DirectionRequestParam implements Parcelable {\n    private LatLng origin;\n    private LatLng destination;\n    private String transportMode;\n    private String departureTime;\n    private String language;\n    private String unit;\n    private String avoid;\n    private String transitMode;\n    private String trafficModel;\n    private String transitRoutingPreference;\n    private boolean alternatives;\n    private String apiKey;\n    private List<LatLng> waypoints;\n    private boolean optimizeWaypoints;\n\n    public DirectionRequestParam() {\n    }\n\n    protected DirectionRequestParam(Parcel in) {\n        origin = in.readParcelable(LatLng.class.getClassLoader());\n        destination = in.readParcelable(LatLng.class.getClassLoader());\n        transportMode = in.readString();\n        departureTime = in.readString();\n        language = in.readString();\n        unit = in.readString();\n        avoid = in.readString();\n        transitMode = in.readString();\n        trafficModel = in.readString();\n        transitRoutingPreference = in.readString();\n        alternatives = in.readByte() != 0;\n        apiKey = in.readString();\n        waypoints = in.createTypedArrayList(LatLng.CREATOR);\n        optimizeWaypoints = in.readByte() != 0;\n    }\n\n    @Nullable\n    public LatLng getOrigin() {\n        return origin;\n    }\n\n    public DirectionRequestParam setOrigin(@Nullable LatLng origin) {\n        this.origin = origin;\n        return this;\n    }\n\n    @Nullable\n    public LatLng getDestination() {\n        return destination;\n    }\n\n    public DirectionRequestParam setDestination(@Nullable LatLng destination) {\n        this.destination = destination;\n        return this;\n    }\n\n    @Nullable\n    public String getTransportMode() {\n        return transportMode;\n    }\n\n    public void setTransportMode(@Nullable String transportMode) {\n        this.transportMode = transportMode;\n    }\n\n    @Nullable\n    public String getLanguage() {\n        return language;\n    }\n\n    public void setLanguage(@Nullable String language) {\n        this.language = language;\n    }\n\n    @Nullable\n    public String getUnit() {\n        return unit;\n    }\n\n    public void setUnit(@Nullable String unit) {\n        this.unit = unit;\n    }\n\n    @Nullable\n    public String getAvoid() {\n        return avoid;\n    }\n\n    public void setAvoid(@Nullable String avoid) {\n        this.avoid = avoid;\n    }\n\n    @Nullable\n    public String getTransitMode() {\n        return transitMode;\n    }\n\n    public void setTransitMode(@Nullable String transitMode) {\n        this.transitMode = transitMode;\n    }\n\n    @Nullable\n    public String getTrafficModel() {\n        return trafficModel;\n    }\n\n    public void setTrafficModel(@Nullable String trafficModel) {\n        this.trafficModel = trafficModel;\n    }\n\n    @Nullable\n    public String getTransitRoutingPreference() {\n        return transitRoutingPreference;\n    }\n\n    public void setTransitRoutingPreference(@Nullable String transitRoutingPreference) {\n        this.transitRoutingPreference = transitRoutingPreference;\n    }\n\n    public boolean isAlternatives() {\n        return alternatives;\n    }\n\n    public void setAlternatives(boolean alternatives) {\n        this.alternatives = alternatives;\n    }\n\n    @Nullable\n    public String getApiKey() {\n        return apiKey;\n    }\n\n    public DirectionRequestParam setApiKey(@Nullable String apiKey) {\n        this.apiKey = apiKey;\n        return this;\n    }\n\n    @Nullable\n    public String getDepartureTime() {\n        return departureTime;\n    }\n\n    public DirectionRequestParam setDepartureTime(@Nullable String departureTime) {\n        this.departureTime = departureTime;\n        return this;\n    }\n\n    @Nullable\n    public List<LatLng> getWaypoints() {\n        return waypoints;\n    }\n\n    public DirectionRequestParam setWaypoints(@Nullable List<LatLng> waypoints) {\n        this.waypoints = waypoints;\n        return this;\n    }\n\n    public boolean isOptimizeWaypoints() {\n        return optimizeWaypoints;\n    }\n\n    public DirectionRequestParam setOptimizeWaypoints(boolean optimizeWaypoints) {\n        this.optimizeWaypoints = optimizeWaypoints;\n        return this;\n    }\n\n    @Override\n    public void writeToParcel(Parcel dest, int flags) {\n        dest.writeParcelable(origin, flags);\n        dest.writeParcelable(destination, flags);\n        dest.writeString(transportMode);\n        dest.writeString(departureTime);\n        dest.writeString(language);\n        dest.writeString(unit);\n        dest.writeString(avoid);\n        dest.writeString(transitMode);\n        dest.writeString(trafficModel);\n        dest.writeString(transitRoutingPreference);\n        dest.writeByte((byte) (alternatives ? 1 : 0));\n        dest.writeString(apiKey);\n        dest.writeTypedList(waypoints);\n        dest.writeByte((byte) (optimizeWaypoints ? 1 : 0));\n    }\n\n    @Override\n    public int describeContents() {\n        return 0;\n    }\n\n    public static final Creator<DirectionRequestParam> CREATOR = new Creator<DirectionRequestParam>() {\n        @Override\n        public DirectionRequestParam createFromParcel(Parcel in) {\n            return new DirectionRequestParam(in);\n        }\n\n        @Override\n        public DirectionRequestParam[] newArray(int size) {\n            return new DirectionRequestParam[size];\n        }\n    };\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/request/DirectionTask.java",
    "content": "package com.akexorcist.googledirection.request;\n\nimport com.akexorcist.googledirection.model.Direction;\n\nimport retrofit2.Call;\n\n/**\n * Direction request task that given from execution of {@link DirectionRequest}.\n * For handle the request task when the request has started.\n *\n * @since 1.0.0\n */\n\n@SuppressWarnings(\"unused\")\npublic class DirectionTask {\n    private Call<Direction> directionCall;\n\n    public DirectionTask(Call<Direction> directionCall) {\n        this.directionCall = directionCall;\n    }\n\n    /**\n     * Cancel the task of direction request if currently running.\n     *\n     * @since 1.0.0\n     */\n    public void cancel() {\n        if (directionCall != null && !directionCall.isCanceled()) {\n            directionCall.cancel();\n        }\n    }\n\n    /**\n     * Check the direction request task completion.\n     *\n     * @return True for finished and false for unfinished.\n     * @since 1.0.0\n     */\n    public boolean isFinished() {\n        return directionCall != null && directionCall.isExecuted();\n    }\n\n    /**\n     * Get the Retrofit's call object of the direction request.\n     *\n     * @return The {@link Call} object of direction request.\n     * @since 1.0.0\n     */\n    public Call<Direction> toRetrofitCall() {\n        return directionCall;\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/util/DirectionConverter.java",
    "content": "/*\n\nCopyright 2015 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n\npackage com.akexorcist.googledirection.util;\n\nimport android.content.Context;\nimport android.util.DisplayMetrics;\n\nimport androidx.annotation.ColorInt;\nimport androidx.annotation.Dimension;\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\n\nimport com.akexorcist.googledirection.model.Step;\nimport com.google.android.gms.maps.model.Cap;\nimport com.google.android.gms.maps.model.JointType;\nimport com.google.android.gms.maps.model.LatLng;\nimport com.google.android.gms.maps.model.PatternItem;\nimport com.google.android.gms.maps.model.PolylineOptions;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n\n/**\n * Utility class for value convert in the Google Direction Library.\n *\n * @since 1.0.0\n */\n@SuppressWarnings(\"unused\")\npublic class DirectionConverter {\n    /**\n     * Convert the route paths to list of latitude and longitude.\n     *\n     * @param stepList The list of steps.\n     * @return The list of latitude and longitude that converted from the list of steps.\n     * @since 1.0.0\n     */\n    public static ArrayList<LatLng> getDirectionPoint(List<Step> stepList) {\n        ArrayList<LatLng> directionPointList = new ArrayList<>();\n        if (stepList != null && stepList.size() > 0) {\n            for (Step step : stepList) {\n                convertStepToPosition(step, directionPointList);\n            }\n        }\n        return directionPointList;\n    }\n\n    /**\n     * For internal use.\n     */\n    private static void convertStepToPosition(Step step, ArrayList<LatLng> directionPointList) {\n        // Get start location\n        directionPointList.add(step.getStartLocation().getCoordination());\n\n        // Get encoded points location\n        if (step.getPolyline() != null) {\n            List<LatLng> decodedPointList = step.getPolyline().getPointList();\n            if (decodedPointList != null && decodedPointList.size() > 0) {\n                directionPointList.addAll(decodedPointList);\n            }\n        }\n\n        // Get end location\n        directionPointList.add(step.getEndLocation().getCoordination());\n    }\n\n    /**\n     * Convert the position of each step to list of latitude and longitude.\n     *\n     * @param stepList The list of steps.\n     * @return The list of latitude and longitude that converted from the list of steps.\n     * @since 1.0.0\n     */\n    public static ArrayList<LatLng> getSectionPoint(List<Step> stepList) {\n        ArrayList<LatLng> directionPointList = new ArrayList<>();\n        if (stepList != null && stepList.size() > 0) {\n            // Get start location only first position\n            directionPointList.add(stepList.get(0).getStartLocation().getCoordination());\n            for (Step step : stepList) {\n                // Get end location\n                directionPointList.add(step.getEndLocation().getCoordination());\n            }\n        }\n        return directionPointList;\n    }\n\n    /**\n     * Convert the path option to the polyline options.\n     *\n     * @param context    A context.\n     * @param pathOption Path options of the steps.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static PolylineOptions createPolyline(\n            @NonNull Context context,\n            @NonNull PathOption pathOption\n    ) {\n        return createPolyline(\n                context,\n                pathOption.locationList,\n                pathOption.width,\n                pathOption.color,\n                pathOption.clickable,\n                pathOption.jointType,\n                pathOption.startCap,\n                pathOption.endCap,\n                pathOption.patternItemList\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options.\n     *\n     * @param context      A context.\n     * @param locationList A list of latitude and longitude.\n     * @param width        Width of the polyline in screen pixels.\n     * @param color        Color of the polyline as a 32-bit ARGB color.\n     * @return Options for a polyline.\n     * @since 1.0.0\n     */\n    public static PolylineOptions createPolyline(\n            @NonNull Context context,\n            @Nullable ArrayList<LatLng> locationList,\n            @Dimension(unit = Dimension.DP) int width,\n            @ColorInt int color\n    ) {\n        return createPolyline(\n                context,\n                locationList,\n                width,\n                color,\n                true,\n                JointType.DEFAULT,\n                null,\n                null,\n                null\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options.\n     *\n     * @param context      A context.\n     * @param locationList A list of latitude and longitude.\n     * @param width        Width of the polyline in screen pixels.\n     * @param color        Color of the polyline as a 32-bit ARGB color.\n     * @param clickable    Is polyline clickable.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static PolylineOptions createPolyline(\n            @NonNull Context context,\n            @Nullable ArrayList<LatLng> locationList,\n            @Dimension(unit = Dimension.DP) int width,\n            @ColorInt int color,\n            boolean clickable\n    ) {\n        return createPolyline(\n                context,\n                locationList,\n                width,\n                color,\n                clickable,\n                JointType.DEFAULT,\n                null,\n                null,\n                null\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options.\n     *\n     * @param context      A context.\n     * @param locationList A list of latitude and longitude.\n     * @param width        Width of the polyline in screen pixels.\n     * @param color        Color of the polyline as a 32-bit ARGB color.\n     * @param clickable    Is polyline clickable.\n     * @param jointType    Joint type for all vertices of the polyline except the start and end vertices.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static PolylineOptions createPolyline(\n            @NonNull Context context,\n            @Nullable ArrayList<LatLng> locationList,\n            @Dimension(unit = Dimension.DP) int width,\n            @ColorInt int color,\n            boolean clickable,\n            int jointType\n    ) {\n        return createPolyline(\n                context,\n                locationList,\n                width,\n                color,\n                clickable,\n                jointType,\n                null,\n                null,\n                null\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options.\n     *\n     * @param context      A context.\n     * @param locationList A list of latitude and longitude.\n     * @param width        Width of the polyline in screen pixels.\n     * @param color        Color of the polyline as a 32-bit ARGB color.\n     * @param clickable    Is polyline clickable.\n     * @param startCap     Cap at the start vertex of the polyline.\n     * @param endCap       Cap at the end vertex of the polyline.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static PolylineOptions createPolyline(\n            @NonNull Context context,\n            @Nullable ArrayList<LatLng> locationList,\n            @Dimension(unit = Dimension.DP) int width,\n            @ColorInt int color,\n            boolean clickable,\n            @Nullable Cap startCap,\n            @Nullable Cap endCap\n    ) {\n        return createPolyline(\n                context,\n                locationList,\n                width,\n                color,\n                clickable,\n                JointType.DEFAULT,\n                startCap,\n                endCap,\n                null\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options.\n     *\n     * @param context         A context.\n     * @param locationList    A list of latitude and longitude.\n     * @param width           Width of the polyline in screen pixels.\n     * @param color           Color of the polyline as a 32-bit ARGB color.\n     * @param clickable       Is polyline clickable.\n     * @param patternItemList Stroke pattern for the polyline.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static PolylineOptions createPolyline(\n            @NonNull Context context,\n            @Nullable ArrayList<LatLng> locationList,\n            @Dimension(unit = Dimension.DP) int width,\n            @ColorInt int color,\n            boolean clickable,\n            @Nullable List<PatternItem> patternItemList\n    ) {\n        return createPolyline(\n                context,\n                locationList,\n                width,\n                color,\n                clickable,\n                JointType.DEFAULT,\n                null,\n                null,\n                patternItemList\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options.\n     *\n     * @param context         A context.\n     * @param locationList    A list of latitude and longitude.\n     * @param width           Width of the polyline in screen pixels.\n     * @param color           Color of the polyline as a 32-bit ARGB color.\n     * @param clickable       Is polyline clickable.\n     * @param jointType       Joint type for all vertices of the polyline except the start and end vertices.\n     * @param startCap        Cap at the start vertex of the polyline.\n     * @param endCap          Cap at the end vertex of the polyline.\n     * @param patternItemList Stroke pattern for the polyline.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static PolylineOptions createPolyline(\n            @NonNull Context context,\n            @Nullable ArrayList<LatLng> locationList,\n            @Dimension(unit = Dimension.DP) int width,\n            @ColorInt int color,\n            boolean clickable,\n            int jointType,\n            @Nullable Cap startCap,\n            @Nullable Cap endCap,\n            @Nullable List<PatternItem> patternItemList) {\n        PolylineOptions rectLine = new PolylineOptions().width(dpToPx(context, width)).color(color).geodesic(true);\n        rectLine.clickable(clickable);\n        rectLine.jointType(jointType);\n        if (patternItemList != null) {\n            rectLine.pattern(patternItemList);\n        }\n        if (startCap != null) {\n            rectLine.startCap(startCap);\n        }\n        if (endCap != null) {\n            rectLine.endCap(endCap);\n        }\n        if (locationList != null && locationList.size() > 0) {\n            for (LatLng location : locationList) {\n                rectLine.add(location);\n            }\n        }\n        return rectLine;\n    }\n\n    /**\n     * Convert the path option to the polyline options.\n     *\n     * @param context           A context.\n     * @param transitPathOption Path options of the steps for transit result.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static ArrayList<PolylineOptions> createTransitPolyline(\n            @NonNull Context context,\n            @NonNull TransitPathOption transitPathOption) {\n        return createTransitPolyline(\n                context,\n                transitPathOption.stepList,\n                transitPathOption.transitWidth,\n                transitPathOption.transitColor,\n                transitPathOption.transitPatternItemList,\n                transitPathOption.walkingWidth,\n                transitPathOption.walkingColor,\n                transitPathOption.walkingPatternItemList,\n                transitPathOption.clickable,\n                transitPathOption.jointType,\n                transitPathOption.startCap,\n                transitPathOption.endCap\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options in transit mode.\n     *\n     * @param context      A context.\n     * @param stepList     A list of latitude and longitude for the steps.\n     * @param transitWidth Width of the polyline in screen pixels for transit polyline.\n     * @param transitColor Color of the polyline as a 32-bit ARGB color for transit polyline.\n     * @param walkingWidth Width of the polyline in screen pixels for walking polyline.\n     * @param walkingColor Color of the polyline as a 32-bit ARGB color for walking polyline.\n     * @return Options for a polyline.\n     * @since 1.0.0\n     */\n    public static ArrayList<PolylineOptions> createTransitPolyline(\n            @NonNull Context context,\n            @Nullable List<Step> stepList,\n            @Dimension(unit = Dimension.DP) int transitWidth,\n            @ColorInt int transitColor,\n            @Dimension(unit = Dimension.DP) int walkingWidth,\n            @ColorInt int walkingColor) {\n        return createTransitPolyline(\n                context,\n                stepList,\n                transitWidth,\n                transitColor,\n                null,\n                walkingWidth,\n                walkingColor,\n                null,\n                true,\n                JointType.DEFAULT,\n                null,\n                null\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options in transit mode.\n     *\n     * @param context                A context.\n     * @param stepList               A list of latitude and longitude for the steps.\n     * @param transitWidth           Width of the polyline in screen pixels for transit polyline.\n     * @param transitColor           Color of the polyline as a 32-bit ARGB color for transit polyline.\n     * @param transitPatternItemList Stroke pattern for the polyline for transit polyline.\n     * @param walkingWidth           Width of the polyline in screen pixels for walking polyline.\n     * @param walkingColor           Color of the polyline as a 32-bit ARGB color for walking polyline.\n     * @param walkingPatternItemList Stroke pattern for the polyline for walking polyline.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static ArrayList<PolylineOptions> createTransitPolyline(\n            @NonNull Context context,\n            @Nullable List<Step> stepList,\n            @Dimension(unit = Dimension.DP) int transitWidth,\n            @Nullable List<PatternItem> transitPatternItemList,\n            @ColorInt int transitColor,\n            @Dimension(unit = Dimension.DP) int walkingWidth,\n            @ColorInt int walkingColor,\n            @Nullable List<PatternItem> walkingPatternItemList) {\n        return createTransitPolyline(\n                context,\n                stepList,\n                transitWidth,\n                transitColor,\n                transitPatternItemList,\n                walkingWidth,\n                walkingColor,\n                walkingPatternItemList,\n                true,\n                JointType.DEFAULT,\n                null,\n                null\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options in transit mode.\n     *\n     * @param context      A context.\n     * @param stepList     A list of latitude and longitude for the steps.\n     * @param transitWidth Width of the polyline in screen pixels for transit polyline.\n     * @param transitColor Color of the polyline as a 32-bit ARGB color for transit polyline.\n     * @param walkingWidth Width of the polyline in screen pixels for walking polyline.\n     * @param walkingColor Color of the polyline as a 32-bit ARGB color for walking polyline.\n     * @param clickable    Is polyline clickable.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static ArrayList<PolylineOptions> createTransitPolyline(\n            @NonNull Context context,\n            @Nullable List<Step> stepList,\n            @Dimension(unit = Dimension.DP) int transitWidth,\n            @ColorInt int transitColor,\n            @Dimension(unit = Dimension.DP) int walkingWidth,\n            @ColorInt int walkingColor,\n            boolean clickable) {\n        return createTransitPolyline(\n                context,\n                stepList,\n                transitWidth,\n                transitColor,\n                null,\n                walkingWidth,\n                walkingColor,\n                null,\n                clickable,\n                JointType.DEFAULT,\n                null,\n                null\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options in transit mode.\n     *\n     * @param context      A context.\n     * @param stepList     A list of latitude and longitude for the steps.\n     * @param transitWidth Width of the polyline in screen pixels for transit polyline.\n     * @param transitColor Color of the polyline as a 32-bit ARGB color for transit polyline.\n     * @param walkingWidth Width of the polyline in screen pixels for walking polyline.\n     * @param walkingColor Color of the polyline as a 32-bit ARGB color for walking polyline.\n     * @param clickable    Is polyline clickable.\n     * @param jointType    Joint type for all vertices of the polyline except the start and end vertices.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static ArrayList<PolylineOptions> createTransitPolyline(\n            @NonNull Context context,\n            @Nullable List<Step> stepList,\n            @Dimension(unit = Dimension.DP) int transitWidth,\n            @ColorInt int transitColor,\n            @Dimension(unit = Dimension.DP) int walkingWidth,\n            @ColorInt int walkingColor,\n            boolean clickable,\n            int jointType) {\n        return createTransitPolyline(\n                context,\n                stepList,\n                transitWidth,\n                transitColor,\n                null,\n                walkingWidth,\n                walkingColor,\n                null,\n                clickable,\n                jointType,\n                null,\n                null\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options in transit mode.\n     *\n     * @param context      A context.\n     * @param stepList     A list of latitude and longitude for the steps.\n     * @param transitWidth Width of the polyline in screen pixels for transit polyline.\n     * @param transitColor Color of the polyline as a 32-bit ARGB color for transit polyline.\n     * @param walkingWidth Width of the polyline in screen pixels for walking polyline.\n     * @param walkingColor Color of the polyline as a 32-bit ARGB color for walking polyline.\n     * @param clickable    Is polyline clickable.\n     * @param startCap     Cap at the start vertex of the polyline.\n     * @param endCap       Cap at the end vertex of the polyline.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static ArrayList<PolylineOptions> createTransitPolyline(\n            @NonNull Context context,\n            @Nullable List<Step> stepList,\n            @Dimension(unit = Dimension.DP) int transitWidth,\n            @ColorInt int transitColor,\n            @Dimension(unit = Dimension.DP) int walkingWidth,\n            @ColorInt int walkingColor,\n            boolean clickable,\n            @Nullable Cap startCap,\n            @Nullable Cap endCap) {\n        return createTransitPolyline(\n                context,\n                stepList,\n                transitWidth,\n                transitColor,\n                null,\n                walkingWidth,\n                walkingColor,\n                null,\n                clickable,\n                JointType.DEFAULT,\n                startCap,\n                endCap\n        );\n    }\n\n    /**\n     * Convert the list of latitude and longitude to the polyline options in transit mode.\n     *\n     * @param context                A context.\n     * @param stepList               A list of latitude and longitude for the steps.\n     * @param transitWidth           Width of the polyline in screen pixels for transit polyline.\n     * @param transitColor           Color of the polyline as a 32-bit ARGB color for transit polyline.\n     * @param transitPatternItemList Stroke pattern for the polyline for transit polyline.\n     * @param walkingWidth           Width of the polyline in screen pixels for walking polyline.\n     * @param walkingColor           Color of the polyline as a 32-bit ARGB color for walking polyline.\n     * @param walkingPatternItemList Stroke pattern for the polyline for walking polyline.\n     * @param clickable              Is polyline clickable.\n     * @param jointType              Joint type for all vertices of the polyline except the start and end vertices.\n     * @param startCap               Cap at the start vertex of the polyline.\n     * @param endCap                 Cap at the end vertex of the polyline.\n     * @return Options for a polyline.\n     * @since 1.2.0\n     */\n    public static ArrayList<PolylineOptions> createTransitPolyline(\n            @NonNull Context context,\n            @Nullable List<Step> stepList,\n            @Dimension(unit = Dimension.DP) int transitWidth,\n            @ColorInt int transitColor,\n            @Nullable List<PatternItem> transitPatternItemList,\n            @Dimension(unit = Dimension.DP) int walkingWidth,\n            @ColorInt int walkingColor,\n            @Nullable List<PatternItem> walkingPatternItemList,\n            boolean clickable,\n            int jointType,\n            @Nullable Cap startCap,\n            @Nullable Cap endCap\n    ) {\n        ArrayList<PolylineOptions> polylineOptionsList = new ArrayList<>();\n        if (stepList != null && stepList.size() > 0) {\n            for (Step step : stepList) {\n                ArrayList<LatLng> directionPointList = new ArrayList<>();\n                convertStepToPosition(step, directionPointList);\n                if (step.isContainStepList()) {\n                    polylineOptionsList.add(createPolyline(\n                            context,\n                            directionPointList,\n                            walkingWidth,\n                            walkingColor,\n                            clickable,\n                            jointType,\n                            startCap,\n                            endCap,\n                            walkingPatternItemList\n                    ));\n                } else {\n                    polylineOptionsList.add(createPolyline(\n                            context,\n                            directionPointList,\n                            transitWidth,\n                            transitColor,\n                            clickable,\n                            jointType,\n                            startCap,\n                            endCap,\n                            transitPatternItemList\n                    ));\n                }\n            }\n        }\n        return polylineOptionsList;\n    }\n\n    /**\n     * For internal use.\n     */\n    @SuppressWarnings(\"IntegerDivisionInFloatingPointContext\")\n    private static int dpToPx(@NonNull Context context, int dp) {\n        DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();\n        return Math.round(dp * (displayMetrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT));\n    }\n\n    /**\n     * A bunch of parameters for convert the step to polyline options.\n     *\n     * @since 1.2.0\n     */\n    public static class PathOption {\n        ArrayList<LatLng> locationList;\n        int width;\n        int color;\n        boolean clickable;\n        int jointType;\n        Cap startCap;\n        Cap endCap;\n        List<PatternItem> patternItemList;\n\n        public ArrayList<LatLng> getLocationList() {\n            return locationList;\n        }\n\n        public PathOption setLocationList(ArrayList<LatLng> locationList) {\n            this.locationList = locationList;\n            return this;\n        }\n\n        public int getWidth() {\n            return width;\n        }\n\n        public PathOption setWidth(@Dimension(unit = Dimension.DP) int width) {\n            this.width = width;\n            return this;\n        }\n\n        public int getColor() {\n            return color;\n        }\n\n        public PathOption setColor(@ColorInt int color) {\n            this.color = color;\n            return this;\n        }\n\n        public boolean isClickable() {\n            return clickable;\n        }\n\n        public PathOption setClickable(boolean clickable) {\n            this.clickable = clickable;\n            return this;\n        }\n\n        public int getJointType() {\n            return jointType;\n        }\n\n        public PathOption setJointType(int jointType) {\n            this.jointType = jointType;\n            return this;\n        }\n\n        public Cap getStartCap() {\n            return startCap;\n        }\n\n        public PathOption setStartCap(Cap startCap) {\n            this.startCap = startCap;\n            return this;\n        }\n\n        public Cap getEndCap() {\n            return endCap;\n        }\n\n        public PathOption setEndCap(Cap endCap) {\n            this.endCap = endCap;\n            return this;\n        }\n\n        public List<PatternItem> getPatternItemList() {\n            return patternItemList;\n        }\n\n        public PathOption setPatternItemList(List<PatternItem> patternItemList) {\n            this.patternItemList = patternItemList;\n            return this;\n        }\n    }\n\n    /**\n     * A bunch of parameters for convert the step to polyline options for transit result.\n     *\n     * @since 1.2.0\n     */\n    public static class TransitPathOption {\n        List<Step> stepList = null;\n        int transitWidth;\n        int transitColor;\n        List<PatternItem> transitPatternItemList;\n        int walkingWidth;\n        int walkingColor;\n        List<PatternItem> walkingPatternItemList;\n        boolean clickable;\n        int jointType;\n        Cap startCap;\n        Cap endCap;\n\n        public List<Step> getStepList() {\n            return stepList;\n        }\n\n        public TransitPathOption setStepList(List<Step> stepList) {\n            this.stepList = stepList;\n            return this;\n        }\n\n        public int getTransitWidth() {\n            return transitWidth;\n        }\n\n        public TransitPathOption setTransitWidth(@Dimension(unit = Dimension.DP) int transitWidth) {\n            this.transitWidth = transitWidth;\n            return this;\n        }\n\n        public int getTransitColor() {\n            return transitColor;\n        }\n\n        public TransitPathOption setTransitColor(@ColorInt int transitColor) {\n            this.transitColor = transitColor;\n            return this;\n        }\n\n        @Nullable\n        public List<PatternItem> getTransitPatternItemList() {\n            return transitPatternItemList;\n        }\n\n        public TransitPathOption setTransitPatternItemList(@Nullable List<PatternItem> transitPatternItemList) {\n            this.transitPatternItemList = transitPatternItemList;\n            return this;\n        }\n\n        public int getWalkingWidth() {\n            return walkingWidth;\n        }\n\n        public TransitPathOption setWalkingWidth(@Dimension(unit = Dimension.DP) int walkingWidth) {\n            this.walkingWidth = walkingWidth;\n            return this;\n        }\n\n        public int getWalkingColor() {\n            return walkingColor;\n        }\n\n        public TransitPathOption setWalkingColor(@ColorInt int walkingColor) {\n            this.walkingColor = walkingColor;\n            return this;\n        }\n\n        @Nullable\n        public List<PatternItem> getWalkingPatternItemList() {\n            return walkingPatternItemList;\n        }\n\n        public TransitPathOption setWalkingPatternItemList(@Nullable List<PatternItem> walkingPatternItemList) {\n            this.walkingPatternItemList = walkingPatternItemList;\n            return this;\n        }\n\n        public boolean isClickable() {\n            return clickable;\n        }\n\n        public TransitPathOption setClickable(boolean clickable) {\n            this.clickable = clickable;\n            return this;\n        }\n\n        public int getJointType() {\n            return jointType;\n        }\n\n        public TransitPathOption setJointType(int jointType) {\n            this.jointType = jointType;\n            return this;\n        }\n\n        @Nullable\n        public Cap getStartCap() {\n            return startCap;\n        }\n\n        public TransitPathOption setStartCap(@Nullable Cap startCap) {\n            this.startCap = startCap;\n            return this;\n        }\n\n        @Nullable\n        public Cap getEndCap() {\n            return endCap;\n        }\n\n        public TransitPathOption setEndCap(@Nullable Cap endCap) {\n            this.endCap = endCap;\n            return this;\n        }\n    }\n}\n"
  },
  {
    "path": "google-direction/src/main/java/com/akexorcist/googledirection/util/DirectionExtension.kt",
    "content": "package com.akexorcist.googledirection.util\n\nimport com.akexorcist.googledirection.DirectionCallback\nimport com.akexorcist.googledirection.model.Direction\nimport com.akexorcist.googledirection.request.DirectionRequest\nimport com.akexorcist.googledirection.request.DirectionTask\n\n\n/**\n * Kotlin extension method for direction request execution.\n *\n * @param onDirectionSuccess The function of the successful direction request.\n * @param onDirectionFailure The function of the failure direction request.\n * @return The task for direction request.\n * @since 1.2.0\n */\nfun DirectionRequest.execute(\n    onDirectionSuccess: ((Direction?) -> Unit)? = null,\n    onDirectionFailure: ((Throwable) -> Unit)? = null\n): DirectionTask = execute(object : DirectionCallback {\n    override fun onDirectionSuccess(direction: Direction?) {\n        onDirectionSuccess?.invoke(direction)\n    }\n\n    override fun onDirectionFailure(t: Throwable) {\n        onDirectionFailure?.invoke(t)\n    }\n})\n"
  },
  {
    "path": "google-direction/src/test/java/com/akexorcist/library/googledirectionandplace/ExampleUnitTest.java",
    "content": "package com.akexorcist.library.googledirectionandplace;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * To work on unit tests, switch the Test Artifact in the Build Variants view.\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Thu Dec 17 23:02:50 ICT 2020\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-6.5-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app\"s APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n# Automatically convert third-party libraries to use AndroidX\nandroid.enableJetifier=true\n# Kotlin code style for this project: \"official\" or \"obsolete\":\nkotlin.code.style=official"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windowz variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\ngoto execute\n\n:4NT_args\n@rem Get arguments from the 4NT Shell from JP Software\nset CMD_LINE_ARGS=%$\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "publish/mavencentral.gradle",
    "content": "apply plugin: 'maven-publish'\napply plugin: 'signing'\n\n\ntask androidJavadocJar(type: Jar) {\n    archiveClassifier.set('javadoc')\n    from(\"$buildDir/javadoc\")\n}\n\ntask androidSourcesJar(type: Jar) {\n    archiveClassifier.set('sources')\n    if (project.plugins.findPlugin(\"com.android.library\")) {\n        from android.sourceSets.main.java.srcDirs\n        from android.sourceSets.main.kotlin.srcDirs\n    } else {\n        from sourceSets.main.java.srcDirs\n        from sourceSets.main.kotlin.srcDirs\n    }\n}\n\ngroup = project.groupId\nversion = project.versionName\n\next[\"signing.keyId\"] = ''\next[\"signing.password\"] = ''\next[\"signing.secretKeyRingFile\"] = ''\next[\"ossrhUsername\"] = ''\next[\"ossrhPassword\"] = ''\next[\"sonatypeStagingProfileId\"] = ''\n\nFile secretPropsFile = project.rootProject.file('local.properties')\nif (secretPropsFile.exists()) {\n    Properties p = new Properties()\n    p.load(new FileInputStream(secretPropsFile))\n    p.each { name, value ->\n        ext[name] = value\n    }\n} else {\n    ext[\"signing.keyId\"] = System.getenv('SIGNING_KEY_ID')\n    ext[\"signing.password\"] = System.getenv('SIGNING_PASSWORD')\n    ext[\"signing.secretKeyRingFile\"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE')\n    ext[\"ossrhUsername\"] = System.getenv('OSSRH_USERNAME')\n    ext[\"ossrhPassword\"] = System.getenv('OSSRH_PASSWORD')\n    ext[\"sonatypeStagingProfileId\"] = System.getenv('SONATYPE_STAGING_PROFILE_ID')\n}\n\npublishing {\n    publications {\n        release(MavenPublication) {\n            groupId project.groupId\n            artifactId project.artifactId\n            version project.versionName\n\n            if (project.plugins.findPlugin(\"com.android.library\")) {\n                artifact(\"$buildDir/outputs/aar/${project.getName()}-release.aar\")\n            } else {\n                artifact(\"$buildDir/libs/${project.getName()}-${version}.jar\")\n            }\n\n            artifact androidJavadocJar\n            artifact androidSourcesJar\n\n            pom {\n                name = project.libraryName\n                description = project.libraryDescription\n                url = project.siteUrl\n                licenses {\n                    license {\n                        name = project.licenseName\n                        url = project.licenseUrl\n                    }\n                }\n                developers {\n                    developer {\n                        id = project.developerId\n                        name = project.developName\n                        email = project.developerEmail\n                    }\n                }\n                scm {\n                    connection = project.gitUrl\n                    developerConnection = project.gitUrl\n                    url = project.siteUrl\n                }\n                withXml {\n                    def dependenciesNode = asNode().appendNode('dependencies')\n                    project.configurations.implementation.allDependencies.each {\n                        if (it.name != 'unspecified') {\n                            def dependencyNode = dependenciesNode.appendNode('dependency')\n                            dependencyNode.appendNode('groupId', it.group)\n                            dependencyNode.appendNode('artifactId', it.name)\n                            dependencyNode.appendNode('version', it.version)\n                        }\n                    }\n                }\n            }\n        }\n    }\n    repositories {\n        maven {\n            name = \"sonatype\"\n            url = \"https://oss.sonatype.org/service/local/staging/deploy/maven2/\"\n            credentials {\n                username ossrhUsername\n                password ossrhPassword\n            }\n        }\n    }\n}\n\nsigning {\n    sign publishing.publications\n}\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app'\ninclude ':google-direction'"
  }
]