[
  {
    "path": ".gitignore",
    "content": ".gradle\n/local.properties\n.DS_Store\n/build\n\n# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio\n\n*.iml\n\n## Directory-based project format:\n.idea/\n# if you remove the above rule, at least ignore the following:\n\n# User-specific stuff:\n# .idea/workspace.xml\n# .idea/tasks.xml\n# .idea/dictionaries\n\n# Sensitive or high-churn files:\n# .idea/dataSources.ids\n# .idea/dataSources.xml\n# .idea/sqlDataSources.xml\n# .idea/dynamic.xml\n# .idea/uiDesigner.xml\n\n# Gradle:\n# .idea/gradle.xml\n# .idea/libraries\n\n# Mongo Explorer plugin:\n# .idea/mongoSettings.xml\n\n## File-based project format:\n*.ipr\n*.iws\n\n## Plugin-specific files:\n\n# IntelliJ\n/out/\n\n# mpeltonen/sbt-idea plugin\n.idea_modules/\n\n# JIRA plugin\natlassian-ide-plugin.xml\n\n# Crashlytics plugin (for Android Studio and IntelliJ)\ncom_crashlytics_export_strings.xml\ncrashlytics.properties\ncrashlytics-build.properties\n"
  },
  {
    "path": "LICENSE",
    "content": "GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n                            NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n                     END OF TERMS AND CONDITIONS\n"
  },
  {
    "path": "README.md",
    "content": "SpeedMeter\n==========\n\n\nDescription\n---\nThis is the repo for the speedmeter android app. \nIt can display some useful information about your route:\n* The actual, real-time speed\n* The time elapsed\n* How many meters or kilometers you traveled\n* Your maximum speed\n\n<a href=\"https://f-droid.org/packages/fly.speedmeter.grub\" target=\"_blank\">\n<img src=\"https://f-droid.org/badge/get-it-on.png\" alt=\"Get it on F-Droid\" height=\"150\"/></a>\n<a href=\"https://play.google.com/store/apps/details?id=fly.speedmeter.grub\" target=\"_blank\">\n<img src=\"https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png\" alt=\"Get it on Google Play\" height=\"150\"/></a>\n\n![alt tag](https://raw.githubusercontent.com/flyingrub/SpeedMeter/master/screen.png)\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 22\n    buildToolsVersion \"21.1.2\"\n\n    defaultConfig {\n        applicationId \"fly.speedmeter.grub\"\n        minSdkVersion 16\n        targetSdkVersion 22\n        versionCode 24\n        versionName \"2.3.1\"\n    }\n\n    lintOptions {\n        disable 'MissingTranslation'\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    compile fileTree(dir: 'libs', include: ['*.jar'])\n    compile 'com.android.support:appcompat-v7:22.0.0'\n    compile 'com.melnykov:floatingactionbutton:1.3.0'\n    compile 'com.google.code.gson:gson:+'\n    compile 'com.github.navasmdc:MaterialDesign:1.+@aar'\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 /home/fly/Android/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"
  },
  {
    "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    android:installLocation=\"auto\"\n    package=\"fly.speedmeter.grub\" >\n\n    <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:theme=\"@style/AppTheme\" >\n\n        <activity\n            android:name=\".MainActivity\"\n            android:label=\"@string/app_name\"\n            android:screenOrientation=\"portrait\">\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=\".Settings\"\n            android:label=\"@string/app_name\"\n            android:screenOrientation=\"portrait\"\n            android:parentActivityName=\".MainActivity\" >\n            <meta-data\n                android:name=\"android.support.PARENT_ACTIVITY\"\n                android:value=\".MainActivity\" />\n        </activity>\n\n        <service android:name=\".GpsServices\"/>\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "app/src/main/java/fly/speedmeter/grub/Data.java",
    "content": "package fly.speedmeter.grub;\n\n/**\n * Created by fly on 17/04/15.\n */\npublic class Data {\n    private boolean isRunning;\n    private long time;\n    private long timeStopped;\n    private boolean isFirstTime;\n\n    private double distanceM;\n    private double curSpeed;\n    private double maxSpeed;\n\n    private OnGpsServiceUpdate onGpsServiceUpdate;\n\n    public interface OnGpsServiceUpdate{\n        public void update();\n    }\n\n    public void setOnGpsServiceUpdate(OnGpsServiceUpdate onGpsServiceUpdate){\n        this.onGpsServiceUpdate = onGpsServiceUpdate;\n    }\n\n    public void update(){\n        onGpsServiceUpdate.update();\n    }\n\n    public Data() {\n        isRunning = false;\n        distanceM = 0;\n        curSpeed = 0;\n        maxSpeed = 0;\n        timeStopped = 0;\n    }\n\n    public Data(OnGpsServiceUpdate onGpsServiceUpdate){\n        this();\n        setOnGpsServiceUpdate(onGpsServiceUpdate);\n    }\n\n    public void addDistance(double distance){\n        distanceM = distanceM + distance;\n    }\n\n    public double getDistance(){\n        return distanceM;\n    }\n\n    public double getMaxSpeed() {\n        return maxSpeed;\n    }\n\n    public double getAverageSpeed(){\n        double average;\n        String units;\n        if (time <= 0) {\n            average = 0.0;\n        } else {\n            average = (distanceM / (time / 1000.0)) * 3.6;\n        }\n        return average;\n    }\n\n    public double getAverageSpeedMotion(){\n        long motionTime = time - timeStopped;\n        double average;\n        String units;\n        if (motionTime <= 0){\n            average = 0.0;\n        } else {\n            average = (distanceM / (motionTime / 1000.0)) * 3.6;\n        }\n        return average;\n    }\n\n    public void setCurSpeed(double curSpeed) {\n        this.curSpeed = curSpeed;\n        if (curSpeed > maxSpeed){\n            maxSpeed = curSpeed;\n        }\n    }\n\n    public boolean isFirstTime() {\n        return isFirstTime;\n    }\n\n    public void setFirstTime(boolean isFirstTime) {\n        this.isFirstTime = isFirstTime;\n    }\n\n    public boolean isRunning() {\n        return isRunning;\n    }\n\n    public void setRunning(boolean isRunning) {\n        this.isRunning = isRunning;\n    }\n\n    public void setTimeStopped(long timeStopped) {\n        this.timeStopped += timeStopped;\n    }\n\n    public double getCurSpeed() {\n        return curSpeed;\n    }\n\n    public long getTime() {\n        return time;\n    }\n\n    public void setTime(long time) {\n        this.time = time;\n    }\n}\n\n"
  },
  {
    "path": "app/src/main/java/fly/speedmeter/grub/GpsServices.java",
    "content": "package fly.speedmeter.grub;\r\n\r\nimport android.app.Notification;\r\nimport android.app.PendingIntent;\r\nimport android.app.Service;\r\nimport android.content.Context;\r\nimport android.content.Intent;\r\nimport android.location.GpsStatus;\r\nimport android.location.GpsStatus.Listener;\r\nimport android.location.Location;\r\nimport android.location.LocationListener;\r\nimport android.location.LocationManager;\r\nimport android.os.AsyncTask;\r\nimport android.os.Bundle;\r\nimport android.os.IBinder;\r\nimport android.util.Log;\r\n\r\npublic class GpsServices extends Service implements LocationListener, GpsStatus.Listener {\r\n    private LocationManager mLocationManager;\r\n\r\n    Location lastlocation = new Location(\"last\");\r\n    Data data;\r\n\r\n    double currentLon=0 ;\r\n    double currentLat=0 ;\r\n    double lastLon = 0;\r\n    double lastLat = 0;\r\n\r\n    PendingIntent contentIntent;\r\n\r\n\r\n    @Override\r\n    public void onCreate() {\r\n\r\n        Intent notificationIntent = new Intent(this, MainActivity.class);\r\n        notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\r\n        contentIntent = PendingIntent.getActivity(\r\n                this, 0, notificationIntent, 0);\r\n\r\n        updateNotification(false);\r\n\r\n        mLocationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\r\n        mLocationManager.addGpsStatusListener( this);\r\n        mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 500, 0, this);\r\n    }\r\n\r\n    @Override\r\n    public void onLocationChanged(Location location) {\r\n        data = MainActivity.getData();\r\n        if (data.isRunning()){\r\n            currentLat = location.getLatitude();\r\n            currentLon = location.getLongitude();\r\n\r\n            if (data.isFirstTime()){\r\n                lastLat = currentLat;\r\n                lastLon = currentLon;\r\n                data.setFirstTime(false);\r\n            }\r\n\r\n            lastlocation.setLatitude(lastLat);\r\n            lastlocation.setLongitude(lastLon);\r\n            double distance = lastlocation.distanceTo(location);\r\n\r\n            if (location.getAccuracy() < distance){\r\n                data.addDistance(distance);\r\n\r\n                lastLat = currentLat;\r\n                lastLon = currentLon;\r\n            }\r\n\r\n            if (location.hasSpeed()) {\r\n                data.setCurSpeed(location.getSpeed() * 3.6);\r\n                if(location.getSpeed() == 0){\r\n                    new isStillStopped().execute();\r\n                }\r\n            }\r\n            data.update();\r\n            updateNotification(true);\r\n        }\r\n    }\r\n\r\n    public void updateNotification(boolean asData){\r\n        Notification.Builder builder = new Notification.Builder(getBaseContext())\r\n                .setContentTitle(getString(R.string.running))\r\n                .setSmallIcon(R.drawable.ic_notification)\r\n                .setContentIntent(contentIntent);\r\n\r\n        if(asData){\r\n            builder.setContentText(String.format(getString(R.string.notification), data.getMaxSpeed(), data.getDistance()));\r\n        }else{\r\n            builder.setContentText(String.format(getString(R.string.notification), '-', '-'));\r\n        }\r\n        Notification notification = builder.build();\r\n        startForeground(R.string.noti_id, notification);\r\n    }\r\n\r\n    @Override\r\n    public int onStartCommand(Intent intent, int flags, int startId) {\r\n        // If we get killed, after returning from here, restart\r\n        return START_STICKY;\r\n    }   \r\n       \r\n    @Override\r\n    public IBinder onBind(Intent intent) {\r\n        // We don't provide binding, so return null\r\n        return null;\r\n    }\r\n   \r\n    /* Remove the locationlistener updates when Services is stopped */\r\n    @Override\r\n    public void onDestroy() {\r\n        mLocationManager.removeUpdates(this);\r\n        mLocationManager.removeGpsStatusListener(this);\r\n        stopForeground(true);\r\n    }\r\n\r\n    @Override\r\n    public void onGpsStatusChanged(int event) {}\r\n\r\n    @Override\r\n    public void onProviderDisabled(String provider) {}\r\n   \r\n    @Override\r\n    public void onProviderEnabled(String provider) {}\r\n   \r\n    @Override\r\n    public void onStatusChanged(String provider, int status, Bundle extras) {}\r\n\r\n    class isStillStopped extends AsyncTask<Void, Integer, String> {\r\n        int timer = 0;\r\n        @Override\r\n        protected String doInBackground(Void... unused) {\r\n            try {\r\n                while (data.getCurSpeed() == 0) {\r\n                    Thread.sleep(1000);\r\n                    timer++;\r\n                }\r\n            } catch (InterruptedException t) {\r\n                return (\"The sleep operation failed\");\r\n            }\r\n            return (\"return object when task is finished\");\r\n        }\r\n\r\n        @Override\r\n        protected void onPostExecute(String message) {\r\n            data.setTimeStopped(timer);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "app/src/main/java/fly/speedmeter/grub/MainActivity.java",
    "content": "package fly.speedmeter.grub;\n\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.location.GpsSatellite;\nimport android.location.GpsStatus;\nimport android.location.Location;\nimport android.location.LocationListener;\nimport android.location.LocationManager;\nimport android.os.SystemClock;\nimport android.preference.PreferenceManager;\nimport android.support.v7.app.ActionBarActivity;\nimport android.text.TextUtils;\nimport android.os.Bundle;\nimport android.support.v7.widget.Toolbar;\nimport android.text.SpannableString;\nimport android.text.style.RelativeSizeSpan;\nimport android.util.Log;\nimport android.view.Menu;\nimport android.view.MenuItem;\nimport android.view.View;\nimport android.widget.Chronometer;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport com.gc.materialdesign.views.ProgressBarCircularIndeterminate;\nimport com.gc.materialdesign.widgets.Dialog;\nimport com.google.gson.Gson;\nimport com.melnykov.fab.FloatingActionButton;\n\nimport java.util.Locale;\n\n\npublic class MainActivity extends ActionBarActivity implements LocationListener, GpsStatus.Listener {\n\n    private SharedPreferences  sharedPreferences;\n    private LocationManager mLocationManager;\n    private static Data data;\n\n    private Toolbar toolbar;\n    private FloatingActionButton fab;\n    private FloatingActionButton refresh;\n    private ProgressBarCircularIndeterminate progressBarCircularIndeterminate;\n    private TextView satellite;\n    private TextView status;\n    private TextView accuracy;\n    private TextView currentSpeed;\n    private TextView maxSpeed;\n    private TextView averageSpeed;\n    private TextView distance;\n    private Chronometer time;\n    private Data.OnGpsServiceUpdate onGpsServiceUpdate;\n\n    private boolean firstfix;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n\n        data = new Data(onGpsServiceUpdate);\n\n        sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n\n        toolbar = (Toolbar) findViewById(R.id.toolbar);\n        setSupportActionBar(toolbar);\n        //setTitle(\"\");\n        fab = (FloatingActionButton) findViewById(R.id.fab);\n        fab.setVisibility(View.INVISIBLE);\n\n        refresh = (FloatingActionButton) findViewById(R.id.refresh);\n        refresh.setVisibility(View.INVISIBLE);\n\n        onGpsServiceUpdate = new Data.OnGpsServiceUpdate() {\n            @Override\n            public void update() {\n                double maxSpeedTemp = data.getMaxSpeed();\n                double distanceTemp = data.getDistance();\n                double averageTemp;\n                if (sharedPreferences.getBoolean(\"auto_average\", false)){\n                    averageTemp = data.getAverageSpeedMotion();\n                }else{\n                    averageTemp = data.getAverageSpeed();\n                }\n\n                String speedUnits;\n                String distanceUnits;\n                if (sharedPreferences.getBoolean(\"miles_per_hour\", false)) {\n                    maxSpeedTemp *= 0.62137119;\n                    distanceTemp = distanceTemp / 1000.0 * 0.62137119;\n                    averageTemp *= 0.62137119;\n                    speedUnits = \"mi/h\";\n                    distanceUnits = \"mi\";\n                } else {\n                    speedUnits = \"km/h\";\n                    if (distanceTemp <= 1000.0) {\n                        distanceUnits = \"m\";\n                    } else {\n                        distanceTemp /= 1000.0;\n                        distanceUnits = \"km\";\n                    }\n                }\n\n                SpannableString s = new SpannableString(String.format(\"%.0f %s\", maxSpeedTemp, speedUnits));\n                s.setSpan(new RelativeSizeSpan(0.5f), s.length() - speedUnits.length() - 1, s.length(), 0);\n                maxSpeed.setText(s);\n\n                s = new SpannableString(String.format(\"%.0f %s\", averageTemp, speedUnits));\n                s.setSpan(new RelativeSizeSpan(0.5f), s.length() - speedUnits.length() - 1, s.length(), 0);\n                averageSpeed.setText(s);\n\n                s = new SpannableString(String.format(\"%.3f %s\", distanceTemp, distanceUnits));\n                s.setSpan(new RelativeSizeSpan(0.5f), s.length() - distanceUnits.length() - 1, s.length(), 0);\n                distance.setText(s);\n            }\n        };\n\n        mLocationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n\n        satellite = (TextView) findViewById(R.id.satellite);\n        status = (TextView) findViewById(R.id.status);\n        accuracy = (TextView) findViewById(R.id.accuracy);\n        maxSpeed = (TextView) findViewById(R.id.maxSpeed);\n        averageSpeed = (TextView) findViewById(R.id.averageSpeed);\n        distance = (TextView) findViewById(R.id.distance);\n        time = (Chronometer) findViewById(R.id.time);\n        currentSpeed = (TextView) findViewById(R.id.currentSpeed);\n        progressBarCircularIndeterminate = (ProgressBarCircularIndeterminate) findViewById(R.id.progressBarCircularIndeterminate);\n\n        time.setText(\"00:00:00\");\n        time.setOnChronometerTickListener(new Chronometer.OnChronometerTickListener() {\n            boolean isPair = true;\n            @Override\n            public void onChronometerTick(Chronometer chrono) {\n                long time;\n                if(data.isRunning()){\n                    time= SystemClock.elapsedRealtime() - chrono.getBase();\n                    data.setTime(time);\n                }else{\n                    time = data.getTime();\n                }\n\n                int h   = (int)(time /3600000);\n                int m = (int)(time  - h*3600000)/60000;\n                int s= (int)(time  - h*3600000 - m*60000)/1000 ;\n                String hh = h < 10 ? \"0\"+h: h+\"\";\n                String mm = m < 10 ? \"0\"+m: m+\"\";\n                String ss = s < 10 ? \"0\"+s: s+\"\";\n                chrono.setText(hh+\":\"+mm+\":\"+ss);\n\n                if (data.isRunning()){\n                    chrono.setText(hh+\":\"+mm+\":\"+ss);\n                } else {\n                    if (isPair) {\n                        isPair = false;\n                        chrono.setText(hh+\":\"+mm+\":\"+ss);\n                    }else{\n                        isPair = true;\n                        chrono.setText(\"\");\n                    }\n                }\n\n            }\n        });\n    }\n\n    public void onFabClick(View v){\n        if (!data.isRunning()) {\n            fab.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_pause));\n            data.setRunning(true);\n            time.setBase(SystemClock.elapsedRealtime() - data.getTime());\n            time.start();\n            data.setFirstTime(true);\n            startService(new Intent(getBaseContext(), GpsServices.class));\n            refresh.setVisibility(View.INVISIBLE);\n        }else{\n            fab.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_play));\n            data.setRunning(false);\n            status.setText(\"\");\n            stopService(new Intent(getBaseContext(), GpsServices.class));\n            refresh.setVisibility(View.VISIBLE);\n        }\n    }\n\n    public void onRefreshClick(View v){\n        resetData();\n        stopService(new Intent(getBaseContext(), GpsServices.class));\n    }\n\n    @Override\n    protected void onResume() {\n        super.onResume();\n        firstfix = true;\n        if (!data.isRunning()){\n            Gson gson = new Gson();\n            String json = sharedPreferences.getString(\"data\", \"\");\n            data = gson.fromJson(json, Data.class);\n        }\n        if (data == null){\n            data = new Data(onGpsServiceUpdate);\n        }else{\n            data.setOnGpsServiceUpdate(onGpsServiceUpdate);\n        }\n\n        if (mLocationManager.getAllProviders().indexOf(LocationManager.GPS_PROVIDER) >= 0) {\n            mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 500, 0, this);\n        } else {\n            Log.w(\"MainActivity\", \"No GPS location provider found. GPS data display will not be available.\");\n        }\n\n        if (!mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {\n            showGpsDisabledDialog();\n        }\n\n        mLocationManager.addGpsStatusListener(this);\n    }\n\n    @Override\n    protected void onPause() {\n        super.onPause();\n        mLocationManager.removeUpdates(this);\n        mLocationManager.removeGpsStatusListener(this);\n        SharedPreferences.Editor prefsEditor = sharedPreferences.edit();\n        Gson gson = new Gson();\n        String json = gson.toJson(data);\n        prefsEditor.putString(\"data\", json);\n        prefsEditor.commit();\n    }\n\n    @Override\n    public void onDestroy(){\n        super.onDestroy();\n        stopService(new Intent(getBaseContext(), GpsServices.class));\n    }\n\n\n    @Override\n    public boolean onCreateOptionsMenu(Menu menu) {\n        // Inflate the menu; this adds items to the action bar if it is present.\n        getMenuInflater().inflate(R.menu.menu_main, menu);\n        return true;\n    }\n\n    @Override\n    public boolean onOptionsItemSelected(MenuItem item) {\n        // Handle action bar item clicks here. The action bar will\n        // automatically handle clicks on the Home/Up button, so long\n        // as you specify a parent activity in AndroidManifest.xml.\n        int id = item.getItemId();\n\n        //noinspection SimplifiableIfStatement\n        if (id == R.id.action_settings) {\n            Intent intent = new Intent(this, Settings.class);\n            startActivity(intent);\n            return true;\n        }\n\n        return super.onOptionsItemSelected(item);\n    }\n\n    @Override\n    public void onLocationChanged(Location location) {\n        if (location.hasAccuracy()) {\n            double acc = location.getAccuracy();\n            String units;\n            if (sharedPreferences.getBoolean(\"miles_per_hour\", false)) {\n                units = \"ft\";\n                acc *= 3.28084;\n            } else {\n                units = \"m\";\n            }\n            SpannableString s = new SpannableString(String.format(\"%.0f %s\", acc, units));\n            s.setSpan(new RelativeSizeSpan(0.75f), s.length()-units.length()-1, s.length(), 0);\n            accuracy.setText(s);\n\n            if (firstfix){\n                status.setText(\"\");\n                fab.setVisibility(View.VISIBLE);\n                if (!data.isRunning() && !TextUtils.isEmpty(maxSpeed.getText())) {\n                    refresh.setVisibility(View.VISIBLE);\n                }\n                firstfix = false;\n            }\n        }else{\n            firstfix = true;\n        }\n\n        if (location.hasSpeed()) {\n            progressBarCircularIndeterminate.setVisibility(View.GONE);\n            double speed = location.getSpeed() * 3.6;\n            String units;\n            if (sharedPreferences.getBoolean(\"miles_per_hour\", false)) { // Convert to MPH\n                speed *= 0.62137119;\n                units = \"mi/h\";\n            } else {\n                units = \"km/h\";\n            }\n            SpannableString s = new SpannableString(String.format(Locale.ENGLISH, \"%.0f %s\", speed, units));\n            s.setSpan(new RelativeSizeSpan(0.25f), s.length()-units.length()-1, s.length(), 0);\n            currentSpeed.setText(s);\n        }\n\n    }\n\n    @Override\n    public void onGpsStatusChanged (int event) {\n        switch (event) {\n            case GpsStatus.GPS_EVENT_SATELLITE_STATUS:\n                GpsStatus gpsStatus = mLocationManager.getGpsStatus(null);\n                int satsInView = 0;\n                int satsUsed = 0;\n                Iterable<GpsSatellite> sats = gpsStatus.getSatellites();\n                for (GpsSatellite sat : sats) {\n                    satsInView++;\n                    if (sat.usedInFix()) {\n                        satsUsed++;\n                    }\n                }\n                satellite.setText(String.valueOf(satsUsed) + \"/\" + String.valueOf(satsInView));\n                if (satsUsed == 0) {\n                    fab.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_play));\n                    data.setRunning(false);\n                    status.setText(\"\");\n                    stopService(new Intent(getBaseContext(), GpsServices.class));\n                    fab.setVisibility(View.INVISIBLE);\n                    refresh.setVisibility(View.INVISIBLE);\n                    accuracy.setText(\"\");\n                    status.setText(getResources().getString(R.string.waiting_for_fix));\n                    firstfix = true;\n                }\n                break;\n\n            case GpsStatus.GPS_EVENT_STOPPED:\n                if (!mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {\n                    showGpsDisabledDialog();\n                }\n                break;\n            case GpsStatus.GPS_EVENT_FIRST_FIX:\n                break;\n        }\n    }\n\n    public void showGpsDisabledDialog(){\n        Dialog dialog = new Dialog(this, getResources().getString(R.string.gps_disabled), getResources().getString(R.string.please_enable_gps));\n\n        dialog.setOnAcceptButtonClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                startActivity(new Intent(\"android.settings.LOCATION_SOURCE_SETTINGS\"));\n            }\n        });\n        dialog.show();\n    }\n\n    public void resetData(){\n        fab.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_play));\n        refresh.setVisibility(View.INVISIBLE);\n        time.stop();\n        maxSpeed.setText(\"\");\n        averageSpeed.setText(\"\");\n        distance.setText(\"\");\n        time.setText(\"00:00:00\");\n        data = new Data(onGpsServiceUpdate);\n    }\n\n    public static Data getData() {\n        return data;\n    }\n\n    @Override\n    public void onBackPressed(){\n        Intent a = new Intent(Intent.ACTION_MAIN);\n        a.addCategory(Intent.CATEGORY_HOME);\n        a.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n        startActivity(a);\n    }\n\n    @Override\n    public void onStatusChanged(String s, int i, Bundle bundle) {}\n\n    @Override\n    public void onProviderEnabled(String s) {}\n\n    @Override\n    public void onProviderDisabled(String s) {}\n}\n"
  },
  {
    "path": "app/src/main/java/fly/speedmeter/grub/Settings.java",
    "content": "package fly.speedmeter.grub;\n\nimport android.content.BroadcastReceiver;\nimport android.content.SharedPreferences;\nimport android.os.Bundle;\nimport android.preference.Preference;\nimport android.preference.PreferenceActivity;\nimport android.preference.PreferenceFragment;\nimport android.preference.PreferenceGroup;\nimport android.support.v4.app.NavUtils;\nimport android.support.v7.app.ActionBarActivity;\nimport android.view.MenuItem;\n\n/**\n * Created by fly on 19/04/15.\n */\npublic class Settings extends ActionBarActivity {\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_settings);\n\n        android.support.v7.widget.Toolbar toolbar = (android.support.v7.widget.Toolbar) findViewById(R.id.settingstoolbar);\n        setSupportActionBar(toolbar);\n        getSupportActionBar().setHomeButtonEnabled(true);\n        getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n        // Display the fragment as the main content.\n        getFragmentManager()\n                .beginTransaction()\n                .replace(R.id.content_frame, new SettingsFragment())\n                .commit();\n    }\n\n    @Override\n    public boolean onOptionsItemSelected(MenuItem item) {\n        switch (item.getItemId()) {\n            // Respond to the action bar's Up/Home button\n            case android.R.id.home:\n                finish();\n                return true;\n        }\n        return super.onOptionsItemSelected(item);\n    }\n\n    public static class SettingsFragment extends PreferenceFragment {\n        @Override\n        public void onCreate(Bundle savedInstanceState) {\n            super.onCreate(savedInstanceState);\n            addPreferencesFromResource(R.xml.pref_general);\n\n            for (int i = 0; i < getPreferenceScreen().getPreferenceCount(); ++i) {\n                Preference preference = getPreferenceScreen().getPreference(i);\n                if (preference instanceof PreferenceGroup) {\n                    PreferenceGroup preferenceGroup = (PreferenceGroup) preference;\n                    for (int j = 0; j < preferenceGroup.getPreferenceCount(); ++j) {\n                        updatePreference(preferenceGroup.getPreference(j));\n                    }\n                } else {\n                    updatePreference(preference);\n                }\n            }\n        }\n\n        private void updatePreference(Preference preference) {\n            if (preference.getKey().equals(\"version\")) {\n                preference.setSummary(String.format(\"v%s (%d)\", BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));\n            }\n        }\n\n\n    }\n}\n\n\n"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:fab=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:materialdesign=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:keepScreenOn=\"true\">\n\n    <android.support.v7.widget.Toolbar\n        style=\"@style/ToolBarStyle\"\n        android:id=\"@+id/toolbar\"\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?attr/colorPrimary\"\n        android:minHeight=\"@dimen/abc_action_bar_default_height_material\"\n        android:elevation=\"5dp\">\n\n    </android.support.v7.widget.Toolbar>\n\n    <RelativeLayout\n        android:id=\"@+id/toolbarSpeed\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"140dp\"\n        android:layout_below=\"@+id/toolbar\"\n        android:layout_gravity=\"center\"\n        android:background=\"@color/red\"\n        android:elevation=\"5dp\">\n\n        <com.gc.materialdesign.views.ProgressBarCircularIndeterminate\n            android:id=\"@+id/progressBarCircularIndeterminate\"\n            android:layout_width=\"40dp\"\n            android:layout_height=\"40dp\"\n            android:elevation=\"10dp\"\n            android:background=\"@color/white\"\n            android:layout_centerVertical=\"true\"\n            android:layout_centerHorizontal=\"true\"/>\n\n        <TextView\n            android:id=\"@+id/currentSpeed\"\n            android:text=\"\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center\"\n            android:textSize=\"100sp\"\n            android:textColor=\"@android:color/white\"\n            android:layout_centerVertical=\"true\"\n            android:layout_centerHorizontal=\"true\"/>\n\n    </RelativeLayout>\n\n\n\n    <com.melnykov.fab.FloatingActionButton\n        android:id=\"@+id/fab\"\n        android:onClick=\"onFabClick\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:src=\"@drawable/ic_action_play\"\n        android:layout_gravity=\"center_horizontal\"\n        fab:fab_colorNormal=\"@color/blue\"\n        fab:fab_colorPressed=\"@color/blue_light\"\n        fab:fab_colorRipple=\"@color/blue_dark\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_centerHorizontal=\"true\"\n        android:layout_marginBottom=\"16dp\"/>\n\n    <com.melnykov.fab.FloatingActionButton\n        android:id=\"@+id/refresh\"\n        android:onClick=\"onRefreshClick\"\n        fab:fab_type=\"mini\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:src=\"@drawable/ic_action_refresh\"\n        android:layout_gravity=\"center_horizontal\"\n        fab:fab_colorNormal=\"@color/blue\"\n        fab:fab_colorPressed=\"@color/blue_light\"\n        fab:fab_colorRipple=\"@color/blue_dark\"\n        android:layout_centerHorizontal=\"true\"\n        android:layout_marginBottom=\"16dp\"\n        android:layout_above=\"@+id/fab\" />\n\n    <TextView\n        android:id=\"@+id/titleMaxSpeed\"\n        android:text=\"@string/max_speed\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"20sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_below=\"@id/toolbarSpeed\"\n        android:layout_marginTop=\"20dp\"\n        android:layout_alignParentLeft=\"true\"\n        android:layout_alignParentStart=\"true\"\n        android:layout_marginLeft=\"16dp\"\n        android:layout_marginStart=\"16dp\" />\n\n    <TextView\n        android:id=\"@+id/maxSpeed\"\n        android:text=\"\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"20sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_below=\"@id/toolbarSpeed\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginEnd=\"20dp\" />\n\n    <View\n        android:id=\"@+id/separator1\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@color/grey_lighter\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_below=\"@+id/maxSpeed\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\" />\n\n    <TextView\n        android:id=\"@+id/titleAverageSpeed\"\n        android:text=\"@string/average_speed\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"20sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_below=\"@id/separator1\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_alignParentLeft=\"true\"\n        android:layout_alignParentStart=\"true\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginStart=\"20dp\" />\n\n    <TextView\n        android:id=\"@+id/averageSpeed\"\n        android:text=\"\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"20sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_below=\"@id/separator1\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginEnd=\"20dp\" />\n\n    <View\n        android:id=\"@+id/separator2\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@color/grey_lighter\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_below=\"@+id/averageSpeed\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\" />\n\n    <TextView\n        android:id=\"@+id/titleDistance\"\n        android:text=\"@string/distance\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"20sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_below=\"@id/separator2\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_alignParentLeft=\"true\"\n        android:layout_alignParentStart=\"true\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginStart=\"20dp\" />\n\n    <TextView\n        android:id=\"@+id/distance\"\n        android:text=\"\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"20sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_below=\"@id/separator2\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginEnd=\"20dp\" />\n\n    <View\n        android:id=\"@+id/separator3\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@color/grey_lighter\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_below=\"@+id/distance\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\" />\n\n    <TextView\n        android:id=\"@+id/titleTime\"\n        android:text=\"@string/time\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"20sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_below=\"@id/separator3\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_alignParentLeft=\"true\"\n        android:layout_alignParentStart=\"true\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginStart=\"20dp\" />\n\n    <Chronometer\n        android:id=\"@+id/time\"\n        android:text=\"\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"20sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_below=\"@id/separator3\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginEnd=\"20dp\" />\n\n    <View\n        android:id=\"@+id/separator4\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@color/grey_lighter\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_below=\"@+id/time\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\" />\n\n    <TextView\n        android:id=\"@+id/titleAccuracy\"\n        android:text=\"@string/accuracy\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"17sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_below=\"@id/separator4\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_alignParentLeft=\"true\"\n        android:layout_alignParentStart=\"true\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginStart=\"20dp\" />\n\n    <TextView\n        android:id=\"@+id/accuracy\"\n        android:text=\"\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"17sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_alignTop=\"@+id/titleAccuracy\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginEnd=\"20dp\"\n        android:layout_alignRight=\"@+id/separator5\"\n        android:layout_alignEnd=\"@+id/separator5\" />\n\n    <View\n        android:id=\"@+id/separator5\"\n        android:layout_width=\"1dp\"\n        android:layout_height=\"30dp\"\n        android:background=\"@color/grey_lighter\"\n        android:layout_marginTop=\"12dp\"\n        android:layout_below=\"@+id/separator4\"\n        android:layout_centerHorizontal=\"true\"/>\n\n    <TextView\n        android:id=\"@+id/titleSatellite\"\n        android:text=\"@string/satellite\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"17sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_below=\"@id/separator4\"\n        android:layout_toRightOf=\"@id/separator5\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginStart=\"20dp\" />\n\n    <TextView\n        android:id=\"@+id/satellite\"\n        android:text=\"\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"17sp\"\n        android:textColor=\"@android:color/black\"\n        android:layout_alignTop=\"@+id/titleSatellite\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginEnd=\"20dp\"/>\n\n    <View\n        android:id=\"@+id/separator6\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@color/grey_lighter\"\n        android:elevation=\"1dp\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_below=\"@+id/satellite\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\" />\n\n    <TextView\n        android:id=\"@+id/status\"\n        android:text=\"@string/waiting_for_fix\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"15sp\"\n        android:layout_marginTop=\"16dp\"\n        android:textColor=\"@color/grey_light\"\n        android:layout_below=\"@+id/separator6\"\n        android:layout_centerHorizontal=\"true\" />\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <android.support.v7.widget.Toolbar\n        style=\"@style/ToolBarStyle\"\n        android:id=\"@+id/settingstoolbar\"\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?attr/colorPrimary\"\n        android:minHeight=\"@dimen/abc_action_bar_default_height_material\"\n        android:elevation=\"5dp\">\n\n    </android.support.v7.widget.Toolbar>\n\n    <FrameLayout\n        android:id=\"@+id/content_frame\"\n        android:layout_below=\"@+id/settingstoolbar\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\" />\n\n</RelativeLayout>\n"
  },
  {
    "path": "app/src/main/res/menu/menu_main.xml",
    "content": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\" tools:context=\".MainActivity\">\n    <item android:id=\"@+id/action_settings\" android:title=\"@string/settings\"\n        android:orderInCategory=\"100\" app:showAsAction=\"never\" />\n</menu>\n"
  },
  {
    "path": "app/src/main/res/values/color.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<resources>\n    <color name=\"grey_lighter\">#E0E0E0</color>\n    <color name=\"grey_light\">#9E9E9E</color>\n    <color name=\"grey_dark\">#424242</color>\n    <color name=\"red\">#F44336</color>\n    <color name=\"red_dark\">#D32F2F</color>\n    <color name=\"blue_light\">#03A9F4</color>\n    <color name=\"blue\">#1E88E5</color>\n    <color name=\"blue_dark\">#01579B</color>\n    <color name=\"white\">#FFF</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Speedmeter</string>\n\n    <string name=\"max_speed\">Max Speed</string>\n    <string name=\"average_speed\">Average Speed</string>\n    <string name=\"distance\">Distance</string>\n    <string name=\"time\">Time</string>\n    <string name=\"accuracy\">Accuracy</string>\n    <string name=\"satellite\">Satellites</string>\n\n    <string name=\"waiting_for_fix\">Waiting for GPS fix …</string>\n    <string name=\"gps_disabled\">GPS disabled</string>\n    <string name=\"please_enable_gps\">In order to use this app you need the GPS to be enabled.</string>\n\n    <string name=\"running\">Route in process…</string>\n    <string name=\"notification\">Max Speed : %1$s, Distance : %2$s.</string>\n\n    <string name=\"settings\">Settings</string>\n    <string name=\"app_info\">About this app</string>\n    <string name=\"pref_auto_average\">Automatically detect stop time.</string>\n    <string name=\"pref_auto_average_summary\">The time spent at stop will not count in the average speed.</string>\n    <string name=\"pref_miles_per_hour\">Use miles per hour</string>\n    <string name=\"pref_miles_per_hour_summary\">Display the speed in mi/h instead of km/h</string>\n\n    <string name=\"license\">License</string>\n    <string name=\"donate\">Donate</string>\n    <string name=\"donate_summary\">Click in order to support my work :) …</string>\n    <string name=\"source_code\">GitHub</string>\n    <string name=\"source_code_summary\">Access to the source code.</string>\n    <string name=\"version\">Speedmeter Version</string>\n\n    <string name=\"noti_id\" translatable=\"false\">Speedmeterisanid</string>\n    <string name=\"github\" translatable=\"false\">https://github.com/flyingrub/SpeedMeter</string>\n    <string name=\"license_type\" translatable=\"false\">GNU General Public License 2</string>\n    <string name=\"doante_url\" translatable=\"false\">https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=6DE8SFMJKRVK2</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.AppCompat.Light.NoActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/red</item>\n        <item name=\"colorPrimaryDark\">@color/red_dark</item>\n        <item name=\"colorAccent\">@color/red</item>\n    </style>\n\n\n    <style name=\"ToolBarStyle\" parent=\"\">\n        <item name=\"theme\">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>\n    </style>\n\n</resources>"
  },
  {
    "path": "app/src/main/res/values-br/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Speedmeter</string>\n\n    <string name=\"max_speed\">Velocidade Máxima</string>\n    <string name=\"average_speed\">Velocidade Média</string>\n    <string name=\"distance\">Distância</string>\n    <string name=\"time\">Tempo</string>\n    <string name=\"accuracy\">Precisão</string>\n    <string name=\"satellite\">Satélites</string>\n\n    <string name=\"waiting_for_fix\">Aguardando ajuste do GPS …</string>\n    <string name=\"gps_disabled\">GPS desabilitado</string>\n    <string name=\"please_enable_gps\">Para utilizar este aplicativo, é necessário que o GPS esteja habilitado.</string>\n\n    <string name=\"running\">Rota em processo…</string>\n    <string name=\"notification\">Velocidade Máx : %1$s, Distância : %2$s.</string>\n\n    <string name=\"settings\">Configurações</string>\n    <string name=\"app_info\">Sobre este app</string>\n    <string name=\"pref_auto_average\">Detectar automaticamente tempo de parada.</string>\n    <string name=\"pref_auto_average_summary\">O tempo gasto na parada não conta na velocidade média.</string>\n    <string name=\"pref_miles_per_hour\">Usar milhas por hora</string>\n    <string name=\"pref_miles_per_hour_summary\">Mostrar a velocidade em mi/h ao invés de km/h</string>\n\n    <string name=\"license\">Licença</string>\n    <string name=\"donate\">Doar</string>\n    <string name=\"donate_summary\">Clique para apoiar meu trabalho :) …</string>\n    <string name=\"source_code\">GitHub</string>\n    <string name=\"source_code_summary\">Acesso ao código fonte.</string>\n    <string name=\"version\">Versão do Speedmeter</string>\n\n    <string name=\"noti_id\" translatable=\"false\">Speedmeterisanid</string>\n    <string name=\"github\" translatable=\"false\">https://github.com/flyingrub/SpeedMeter</string>\n    <string name=\"license_type\" translatable=\"false\">GNU General Public License 2</string>\n    <string name=\"doante_url\" translatable=\"false\">https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=6DE8SFMJKRVK2</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-fr/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Speedmeter</string>\n\n    <string name=\"max_speed\">Vitesse Max</string>\n    <string name=\"average_speed\">Vitesse Moyenne</string>\n    <string name=\"distance\">Distance</string>\n    <string name=\"time\">Tempsime</string>\n    <string name=\"accuracy\">Précision</string>\n    <string name=\"satellite\">Satellites</string>\n\n    <string name=\"waiting_for_fix\">En attente de localisation GPS…</string>\n    <string name=\"gps_disabled\">GPS désactivé</string>\n    <string name=\"please_enable_gps\">Pour utiliser cette application, le GPS doit être activé.</string>\n\n    <string name=\"running\">Parcours en cours…</string>\n    <string name=\"notification\">Vitesse Max : %1$s, Distance : %2$s.</string>\n\n    <string name=\"settings\">Paramètres</string>\n    <string name=\"app_info\">À propos</string>\n    <string name=\"pref_auto_average\">Détecter automatiquement les temps d\\'arrêt.</string>\n    <string name=\"pref_auto_average_summary\">Le temps passé à l\\'arrêt ne comptera pas dans la vitesse moyenne.</string>\n    <string name=\"pref_miles_per_hour\">Utiliser les miles par heure</string>\n    <string name=\"pref_miles_per_hour_summary\">Afficher la vitesse en mi/h au lieu de km/h</string>\n\n    <string name=\"license\">Licence</string>\n    <string name=\"donate\">Faire un don</string>\n    <string name=\"donate_summary\">Cliquez pour soutenir mon travail… :)</string>\n    <string name=\"source_code\">GitHub</string>\n    <string name=\"source_code_summary\">Accès au code source.</string>\n    <string name=\"version\">Version de Speedmeter</string>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-sr/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Брзиномер</string>\n\n    <string name=\"max_speed\">Макс. брзина</string>\n    <string name=\"average_speed\">Просечна брзина</string>\n    <string name=\"distance\">Пређени пут</string>\n    <string name=\"time\">Време</string>\n    <string name=\"accuracy\">Прецизност</string>\n    <string name=\"satellite\">Сателити</string>\n\n    <string name=\"waiting_for_fix\">Чекам на ГПС…</string>\n    <string name=\"gps_disabled\">ГПС искључен</string>\n    <string name=\"please_enable_gps\">Да бисте користили ову апликацију морате укључити ГПС.</string>\n\n    <string name=\"running\">Мерење у току…</string>\n    <string name=\"notification\">Макс. брзина: %1$s, пређени пут: %2$s.</string>\n\n    <string name=\"settings\">Поставке</string>\n    <string name=\"app_info\">О програму</string>\n    <string name=\"pref_auto_average\">Аутоматско откривање заустављања.</string>\n    <string name=\"pref_auto_average_summary\">Време проведено у стајању се не узима у обрачун просечне брзине.</string>\n\n    <string name=\"license\">Лиценца</string>\n    <string name=\"donate\">Донације</string>\n    <string name=\"donate_summary\">Подржите мој рад :) …</string>\n    <string name=\"source_code\">Гитхаб</string>\n    <string name=\"source_code_summary\">Приступ изворном кôду.</string>\n    <string name=\"version\">Издање Брзиномера</string>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-tr/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Speedmeter</string>\n\n    <string name=\"max_speed\">En Yüksek Hız</string>\n    <string name=\"average_speed\">Ortalama Hız</string>\n    <string name=\"distance\">Mesafe</string>\n    <string name=\"time\">Zaman</string>\n    <string name=\"accuracy\">Hassasiyet</string>\n    <string name=\"satellite\">Kullanılan Uydular</string>\n\n    <string name=\"waiting_for_fix\">Konum Sinyali Alınıyor…</string>\n    <string name=\"gps_disabled\">Konum Devre Dışı</string>\n    <string name=\"please_enable_gps\">Uygulamayı Kullanmak İçin Konumunuz Açık Olmalı.</string>\n\n    <string name=\"running\">Rota Hesaplanıyor…</string>\n    <string name=\"notification\">En Yüksek Hız : %1$s, Mesafe : %2$s.</string>\n\n    <string name=\"settings\">Ayarlar</string>\n    <string name=\"app_info\">Uygulama Hakkında</string>\n    <string name=\"pref_auto_average\">Durma anını otomatik olarak algıla</string>\n    <string name=\"pref_auto_average_summary\">Hareketsiz zamanda geçen süre ortalama hıza katılmaz.</string>\n    <string name=\"pref_miles_per_hour\">Mil/saat olarak hesapla</string>\n    <string name=\"pref_miles_per_hour_summary\">Hızı km/s yerine mil/s olarak hesaplar.</string>\n\n    <string name=\"license\">Lisans</string>\n    <string name=\"donate\">Bağış</string>\n    <string name=\"donate_summary\">Desteklemek için tıkla :) …</string>\n    <string name=\"source_code\">GitHub</string>\n    <string name=\"source_code_summary\">Kaynak koduna buradan ulaşabilirsin.</string>\n    <string name=\"version\">Uygulama Sürümü</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-w820dp/dimens.xml",
    "content": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as screen margins) for screens with more than 820dp of available width. This\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\n    <dimen name=\"activity_horizontal_margin\">64dp</dimen>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/xml/pref_general.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<PreferenceScreen xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <PreferenceCategory\n        android:title=\"@string/settings\">\n\n    <SwitchPreference\n        android:key=\"auto_average\"\n        android:title=\"@string/pref_auto_average\"\n        android:summary=\"@string/pref_auto_average_summary\"\n        />\n\n    <SwitchPreference\n        android:key=\"miles_per_hour\"\n        android:title=\"@string/pref_miles_per_hour\"\n        android:summary=\"@string/pref_miles_per_hour_summary\"\n    />\n\n    </PreferenceCategory>\n\n    <PreferenceCategory\n        android:title=\"@string/app_info\">\n\n        <Preference\n            android:key=\"license\"\n            android:title=\"@string/license\"\n            android:summary=\"@string/license_type\">\n        </Preference>\n\n        <Preference\n            android:key=\"github\"\n            android:title=\"@string/source_code\"\n            android:summary=\"@string/source_code_summary\">\n\n            <intent\n                android:action=\"android.intent.action.VIEW\"\n                android:data=\"@string/github\"\n                />\n\n        </Preference>\n\n        <Preference\n            android:key=\"donate\"\n            android:title=\"@string/donate\"\n            android:summary=\"@string/donate_summary\">\n\n            <intent\n                android:action=\"android.intent.action.VIEW\"\n                android:data=\"@string/doante_url\"\n                />\n\n        </Preference>\n\n        <Preference\n            android:key=\"version\"\n            android:title=\"@string/version\"\n            android:summary=\"\">\n        </Preference>\n\n    </PreferenceCategory>\n\n</PreferenceScreen>"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    repositories {\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:2.2.3'\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        jcenter()\n    }\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed Feb 08 16:42:36 CET 2017\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-2.14.1-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\n# Default value: -Xmx10248m -XX:MaxPermSize=256m\n# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\n\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"
  },
  {
    "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# For Cygwin, ensure paths are in UNIX format before anything is touched.\nif $cygwin ; then\n    [ -n \"$JAVA_HOME\" ] && JAVA_HOME=`cygpath --unix \"$JAVA_HOME\"`\nfi\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\\\"`/\" >&-\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >&-\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\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\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windowz variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\ngoto execute\r\n\r\n:4NT_args\r\n@rem Get arguments from the 4NT Shell from JP Software\r\nset CMD_LINE_ARGS=%$\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\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%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app'\n"
  }
]