diff --git a/.gitignore b/.gitignore index d6bfc95..8eb90ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,35 @@ +# built application files +*.apk +*.ap_ + +# files for the dex VM +*.dex + +# Java class files +*.class + +# generated files +bin/ +gen/ + +# Local configuration file (sdk path, etc) +local.properties + +# Eclipse project files +.classpath +.project + +# Android Studio +.idea/ .gradle -/local.properties -/.idea/workspace.xml +/*/local.properties +/*/out +/*/build +/*/production +*.iml +*.iws +*.ipr +*~ +*.swp + .DS_Store diff --git a/WeatherDoge/build.gradle b/WeatherDoge/build.gradle new file mode 100644 index 0000000..c6d5704 --- /dev/null +++ b/WeatherDoge/build.gradle @@ -0,0 +1,57 @@ +def getVersionCode = { -> + try { + def stdout = new ByteArrayOutputStream() + exec { + commandLine './versionCode.sh' + standardOutput = stdout + } + return stdout.toString().trim().toInteger() + } + catch (ignored) { + return null; + } +} + +def getVersionName = { -> + try { + def stdout = new ByteArrayOutputStream() + exec { + commandLine './versionName.sh' + standardOutput = stdout + } + return stdout.toString().trim() + } + catch (ignored) { + return null; + } +} +apply plugin: 'android' + +android { + compileSdkVersion 19 + buildToolsVersion "19.0.1" + + defaultConfig { + minSdkVersion 10 + targetSdkVersion 19 + versionCode getVersionCode() + versionName getVersionName() + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + buildTypes { + release { + runProguard false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' + } + } +} + +dependencies { + compile 'com.google.android.gms:play-services:4.1.32' + compile 'com.android.support:support-v4:19.0.1' + compile files('libs/commons-io-2.4.jar') +} diff --git a/WeatherDoge/libs/commons-io-2.4.jar b/WeatherDoge/libs/commons-io-2.4.jar new file mode 100644 index 0000000..90035a4 Binary files /dev/null and b/WeatherDoge/libs/commons-io-2.4.jar differ diff --git a/WeatherDoge/proguard-rules.txt b/WeatherDoge/proguard-rules.txt new file mode 100644 index 0000000..fe0a5dc --- /dev/null +++ b/WeatherDoge/proguard-rules.txt @@ -0,0 +1,34 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +-keep class * extends java.util.ListResourceBundle { + protected Object[][] getContents(); +} + +-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { + public static final *** NULL; +} + +-keepnames @com.google.android.gms.common.annotation.KeepName class * +-keepclassmembernames class * { + @com.google.android.gms.common.annotation.KeepName *; +} + +-keepnames class * implements android.os.Parcelable { + public static final ** CREATOR; +} diff --git a/WeatherDoge/src/main/AndroidManifest.xml b/WeatherDoge/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a40441a --- /dev/null +++ b/WeatherDoge/src/main/AndroidManifest.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WeatherDoge/src/main/assets/comic.ttf b/WeatherDoge/src/main/assets/comic.ttf new file mode 100644 index 0000000..c4bd6c1 Binary files /dev/null and b/WeatherDoge/src/main/assets/comic.ttf differ diff --git a/WeatherDoge/src/main/assets/comicsans.html b/WeatherDoge/src/main/assets/comicsans.html new file mode 100644 index 0000000..c062220 --- /dev/null +++ b/WeatherDoge/src/main/assets/comicsans.html @@ -0,0 +1,17 @@ + + + + Comic Sans MS + + + +

Comic Sans MS

+

Weather Doge for Android includes and utilizes Microsoft Corporation's Comic Sans MS (comic.ttf version 5.00).

+

Comic Sans MS 5.00 was authored by Vincent Connare and © Copyright 2006 Microsoft Corporation. All rights reserved. Additional licensing and copyright information, including how to purchase, license, and download Comic Sans MS, can be found on Microsoft's typography knowledgebase.

+

« Back to Other Shibes

+ + diff --git a/WeatherDoge/src/main/assets/othershibes.html b/WeatherDoge/src/main/assets/othershibes.html new file mode 100644 index 0000000..5f4cb1b --- /dev/null +++ b/WeatherDoge/src/main/assets/othershibes.html @@ -0,0 +1,1327 @@ + + + + Other Shibes + + + +

Other Shibes

+ +

Additional licensing information for Comic Sans MS.

+ +

Weather Doge for Android wouldn't be possible without other great open-source projects. These projects are listed here, in alphabetical order, along with all neccesary licensing details.

+ +

+ +

Android Open Source Project (AOSP)

+

   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   ==  in this case for the Android-specific code.                        ==
+   =========================================================================
+
+Android Code
+Copyright 2005-2008 The Android Open Source Project
+
+This product includes software developed as part of
+The Android Open Source Project (http://source.android.com).
+
+   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   ==  in this case for Apache Commons code.                              ==
+   =========================================================================
+
+Apache Commons
+Copyright 1999-2006 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   ==  in this case for Jakarta Commons Logging.                          ==
+   =========================================================================
+
+Jakarta Commons Logging (JCL)
+Copyright 2005,2006 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   ==  in this case for the Nuance code.                                  ==
+   =========================================================================
+
+These files are Copyright 2007 Nuance Communications, but released under
+the Apache2 License.
+
+   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   ==  in this case for the Media Codecs code.                            ==
+   =========================================================================
+
+Media Codecs
+These files are Copyright 1998 - 2009 PacketVideo, but released under
+the Apache2 License.
+
+   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   ==  in this case for the TagSoup code.                                 ==
+   =========================================================================
+
+This file is part of TagSoup and is Copyright 2002-2008 by John Cowan.
+
+TagSoup is licensed under the Apache License,
+Version 2.0.  You may obtain a copy of this license at
+http://www.apache.org/licenses/LICENSE-2.0 .  You may also have
+additional legal rights not granted by this license.
+
+TagSoup is distributed in the hope that it will be useful, but
+unless required by applicable law or agreed to in writing, TagSoup
+is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, either express or implied; not even the implied warranty
+of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   ==  in this case for Additional Codecs code.                           ==
+   =========================================================================
+
+Additional Codecs
+These files are Copyright 2003-2010 VisualOn, but released under
+the Apache2 License.
+
+  =========================================================================
+  ==  NOTICE file corresponding to the section 4 d of                    ==
+  ==  the Apache License, Version 2.0,                                   ==
+  ==  in this case for the Audio Effects code.                           ==
+  =========================================================================
+
+Audio Effects
+These files are Copyright (C) 2004-2010 NXP Software and
+Copyright (C) 2010 The Android Open Source Project, but released under
+the Apache2 License.
+
+
+                               Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+
+
+UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
+
+Unicode Data Files include all data files under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+and http://www.unicode.org/cldr/data/ . Unicode Software includes any
+source code published in the Unicode Standard or under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/, and
+http://www.unicode.org/cldr/data/.
+
+NOTICE TO USER: Carefully read the following legal agreement. BY
+DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA
+FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY
+ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF
+THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY,
+DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright © 1991-2008 Unicode, Inc. All rights reserved. Distributed
+under the Terms of Use in http://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Unicode data files and any associated documentation (the
+"Data Files") or Unicode software and any associated documentation (the
+"Software") to deal in the Data Files or Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, and/or sell copies of the Data Files or Software,
+and to permit persons to whom the Data Files or Software are furnished to
+do so, provided that (a) the above copyright notice(s) and this permission
+notice appear with all copies of the Data Files or Software, (b) both the
+above copyright notice(s) and this permission notice appear in associated
+documentation, and (c) there is clear notice in each modified Data File
+or in the Software as well as in the documentation associated with the
+Data File(s) or Software that the data or software has been modified.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+OR PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in these Data Files or Software without prior written
+authorization of the copyright holder.

+ +

Android Support Library

+

Notice for all the files in this folder.
+------------------------------------------------------------
+
+
+
+   Copyright (c) 2005-2008, The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+
+

+ +

Apache Commons IO

+

+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+

+ +

dogeweather

+

The MIT License (MIT)
+
+Copyright (c) 2014 Katia Eirin & Bennett
+
+                Permission is hereby granted, free of charge, to any person obtaining a copy
+                of this software and associated documentation files (the "Software"), to deal
+                in the Software without restriction, including without limitation the rights
+                to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+                copies of the Software, and to permit persons to whom the Software is
+                furnished to do so, subject to the following conditions:
+
+                The above copyright notice and this permission notice shall be included in
+                all copies or substantial portions of the Software.
+
+                THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+                IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+                FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+                AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+                LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+                OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+                THE SOFTWARE.

+ +

Google Play Services

+

This product includes software from the The Android Open Source Project
+
+Copyright (c) 2005-2008, The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+==========================================================================
+
+This product includes software from The Guava Authors
+
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+==========================================================================
+
+This product includes software from Google, inc.
+
+Copyright 2008, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+    * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it.  This code is not
+standalone and requires a support library to be linked with it.  This
+support library is itself covered by the above license.
+
+END OF TERMS AND CONDITIONS
+
+==========================================================================
+
+This product includes the XMP Toolkit software from Adobe Systems Incorporated.
+
+The BSD License
+
+Copyright (c) 1999 - 2010, Adobe Systems Incorporated
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the following
+conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer
+
+* Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution
+
+* Neither the name of Adobe Systems Incorporated, nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+END OF TERMS AND CONDITIONS
+
+==========================================================================
+
+This product includes software from the JSR305 expert group
+
+Copyright (c) 2007-2009, JSR305 expert group
+All rights reserved.
+
+http://www.opensource.org/licenses/bsd-license.php
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of the JSR305 expert group nor the names of its
+      contributors may be used to endorse or promote products derived from
+      this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+END OF TERMS AND CONDITIONS
+
+==========================================================================
+
+Legal notices for the Google Maps component may be found at http://m.google.com/legalnotices
+
+==========================================================================
+
+This product includes software from Lucent Technologies
+
+The authors of this software are Rob Pike and Ken Thompson.
+             Copyright (c) 2002 by Lucent Technologies.
+Permission to use, copy, modify, and distribute this software for any
+purpose without fee is hereby granted, provided that this entire notice
+is included in all copies of any software which is or includes a copy
+or modification of this software and in all copies of the supporting
+documentation for such software.
+THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTY.  IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
+REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+
+END OF TERMS AND CONDITIONS
+
+==========================================================================
+
+This product includes software from The Chromium Authors
+
+Copyright (c) 2010 The Chromium Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+   * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+   * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ + diff --git a/WeatherDoge/src/main/java/com/versobit/weatherdoge/AboutDialog.java b/WeatherDoge/src/main/java/com/versobit/weatherdoge/AboutDialog.java new file mode 100644 index 0000000..7d9c0bd --- /dev/null +++ b/WeatherDoge/src/main/java/com/versobit/weatherdoge/AboutDialog.java @@ -0,0 +1,56 @@ +package com.versobit.weatherdoge; + +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.pm.PackageInfo; +import android.net.Uri; +import android.os.Bundle; +import android.text.method.LinkMovementMethod; +import android.view.View; +import android.widget.TextView; + +class AboutDialog extends AlertDialog { + AboutDialog(Context ctx) { + super(ctx); + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + setButton(DialogInterface.BUTTON_NEUTRAL, getContext().getString(R.string.wow), new OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dismiss(); + } + }); + View v = getLayoutInflater().inflate(R.layout.dialog_about, null); + v.findViewById(R.id.dialog_about_vb).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://versobit.com/"))); + } + }); + PackageInfo pi = WeatherDoge.getPackageInfo(getContext()); + ((TextView) v.findViewById(R.id.dialog_about_version)).setText(pi.versionName); + ((TextView)v.findViewById(R.id.dialog_about_text2)).setMovementMethod(LinkMovementMethod.getInstance()); + v.findViewById(R.id.dialog_about_contact).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + AlertDialog.Builder adb = new Builder(getContext()); + final String[] accts = getContext().getResources().getStringArray(R.array.dialog_about_twitter); + adb.setItems(accts, new OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + String s = accts[which].substring(1); + getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/" + s))); + dismiss(); + } + }); + adb.show(); + } + }); + setView(v); + super.onCreate(savedInstanceState); + } +} diff --git a/WeatherDoge/src/main/java/com/versobit/weatherdoge/ContributeDialog.java b/WeatherDoge/src/main/java/com/versobit/weatherdoge/ContributeDialog.java new file mode 100644 index 0000000..c6f9a89 --- /dev/null +++ b/WeatherDoge/src/main/java/com/versobit/weatherdoge/ContributeDialog.java @@ -0,0 +1,64 @@ +package com.versobit.weatherdoge; + +import android.annotation.SuppressLint; +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.net.Uri; +import android.os.Build; +import android.os.Bundle; +import android.view.View; +import android.widget.Toast; + +class ContributeDialog extends AlertDialog { + ContributeDialog(Context ctx) { + super(ctx); + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + setButton(BUTTON_NEUTRAL, getContext().getString(R.string.wow), new OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dismiss(); + } + }); + View v = getLayoutInflater().inflate(R.layout.dialog_contribute, null); + v.findViewById(R.id.dialog_contribute_github_layout).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getContext().getString(R.string.addr_github)))); + } + }); + v.findViewById(R.id.dialog_contribute_dogecoin_layout).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + copyToClipboard(getContext().getString(R.string.addr_dogecoin)); + Toast.makeText(getContext(), R.string.such_copied, Toast.LENGTH_SHORT).show(); + } + }); + v.findViewById(R.id.dialog_contribute_bitcoin_layout).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + copyToClipboard(getContext().getString(R.string.addr_bitcoin)); + Toast.makeText(getContext(), R.string.such_copied, Toast.LENGTH_SHORT).show(); + } + }); + setView(v); + super.onCreate(savedInstanceState); + } + + @SuppressLint("NewApi") + @SuppressWarnings("deprecation") + void copyToClipboard(String text) { + if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { + android.text.ClipboardManager cbm = (android.text.ClipboardManager)getContext().getSystemService(Context.CLIPBOARD_SERVICE); + cbm.setText(text); + return; + } + android.content.ClipData clip = android.content.ClipData.newPlainText(getContext().getString(R.string.app_name), text); + android.content.ClipboardManager cbm = (android.content.ClipboardManager)getContext().getSystemService(Context.CLIPBOARD_SERVICE); + cbm.setPrimaryClip(clip); + } +} diff --git a/WeatherDoge/src/main/java/com/versobit/weatherdoge/MainActivity.java b/WeatherDoge/src/main/java/com/versobit/weatherdoge/MainActivity.java new file mode 100644 index 0000000..8d46a51 --- /dev/null +++ b/WeatherDoge/src/main/java/com/versobit/weatherdoge/MainActivity.java @@ -0,0 +1,343 @@ +package com.versobit.weatherdoge; + +import android.app.Activity; +import android.app.Dialog; +import android.content.Context; +import android.content.Intent; +import android.content.IntentSender; +import android.content.SharedPreferences; +import android.graphics.Typeface; +import android.location.Address; +import android.location.Geocoder; +import android.location.Location; +import android.os.AsyncTask; +import android.os.Bundle; +import android.preference.PreferenceManager; +import android.util.Log; +import android.view.View; +import android.widget.ImageView; +import android.widget.RelativeLayout; +import android.widget.TextView; +import android.widget.Toast; + +import com.google.android.gms.common.ConnectionResult; +import com.google.android.gms.common.GooglePlayServicesClient; +import com.google.android.gms.common.GooglePlayServicesUtil; +import com.google.android.gms.location.LocationClient; +import com.google.android.gms.location.LocationListener; +import com.google.android.gms.location.LocationRequest; + +import org.apache.commons.io.IOUtils; +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.DefaultHttpClient; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.net.URLEncoder; +import java.text.DecimalFormat; +import java.util.List; +import java.util.Random; + +public class MainActivity extends Activity implements + GooglePlayServicesClient.ConnectionCallbacks, + GooglePlayServicesClient.OnConnectionFailedListener, + LocationListener { + + private static final int REQUEST_PLAY_ERR_DIAG = 52000000; + private static final int REQUEST_PLAY_CONN_FAIL_RES = 3643; + private static final String TAG = "MainActivity"; + + private boolean forceMetric = false; + private String forceLocation = ""; + + private RelativeLayout suchLayout; + private ImageView suchDoge; + private TextView suchStatus; + private TextView suchNegative; + private TextView suchTemp; + private TextView suchDegree; + private TextView suchLocation; + private ImageView suchShare; + private ImageView suchOptions; + private LocationClient wowClient; + private Location whereIsDoge; + private Typeface wowComicSans; + + private double currentTemp; + private String currentLocation; + private String[] dogefixes; + private String[] tempAdjectives; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + PreferenceManager.setDefaultValues(this, R.xml.pref_general, false); + loadOptions(); + + dogefixes = getResources().getStringArray(R.array.dogefix); + + wowComicSans = Typeface.createFromAsset(getAssets(), "comic.ttf"); + suchLayout = (RelativeLayout)findViewById(R.id.main_suchlayout); + suchDoge = (ImageView)findViewById(R.id.main_suchdoge); + suchDoge.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + whereIsDoge = wowClient.getLastLocation(); + new GetWeather(MainActivity.this).execute(whereIsDoge); + } + }); + suchStatus = (TextView)findViewById(R.id.main_suchstatus); + suchStatus.setTypeface(wowComicSans); + suchNegative = (TextView)findViewById(R.id.main_suchnegative); + suchNegative.setTypeface(wowComicSans); + suchTemp = (TextView)findViewById(R.id.main_suchtemp); + suchTemp.setTypeface(wowComicSans); + suchDegree = (TextView)findViewById(R.id.main_suchdegree); + suchDegree.setTypeface(wowComicSans); + suchLocation = (TextView)findViewById(R.id.main_suchlocation); + suchLocation.setTypeface(wowComicSans); + suchShare = (ImageView)findViewById(R.id.main_suchshare); + suchShare.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent i = new Intent(Intent.ACTION_SEND); + i.setType("text/plain"); + String unit = (char)0x00b0 + ((UnitLocale.getDefault() == UnitLocale.IMPERIAL && !forceMetric) ? "F" : "C"); + String temp = String.valueOf(Math.round(currentTemp)) + ' ' + unit; + i.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.share_title, temp, currentLocation)); + Random r = new Random(); + String dogeism = String.format(dogefixes[r.nextInt(dogefixes.length)], tempAdjectives[r.nextInt(tempAdjectives.length)]); + i.putExtra(Intent.EXTRA_TEXT, getString(R.string.share_text, dogeism, temp, currentLocation)); + startActivity(Intent.createChooser(i, getString(R.string.action_share))); + } + }); + suchShare.setOnLongClickListener(new View.OnLongClickListener() { + @Override + public boolean onLongClick(View v) { + Toast.makeText(MainActivity.this, R.string.action_share, Toast.LENGTH_SHORT).show(); + return true; + } + }); + suchOptions = (ImageView)findViewById(R.id.main_suchoptions); + suchOptions.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + startActivity(new Intent(MainActivity.this, OptionsActivity.class)); + } + }); + suchOptions.setOnLongClickListener(new View.OnLongClickListener() { + @Override + public boolean onLongClick(View v) { + Toast.makeText(MainActivity.this, R.string.action_options, Toast.LENGTH_SHORT).show(); + return true; + } + }); + if(!forceLocation.isEmpty()) { + new GetWeather(this).execute(); + } else if(playServicesAvailable()) { + wowClient = new LocationClient(this, this, this); + } + } + + private void loadOptions() { + SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this); + forceMetric = sp.getBoolean(OptionsActivity.PREF_FORCE_METRIC, false); + forceLocation = sp.getString(OptionsActivity.PREF_FORCE_LOCATION, ""); + } + + @Override + protected void onStart() { + super.onStart(); + if(wowClient != null) { + wowClient.connect(); + } + } + + @Override + protected void onStop() { + if(wowClient != null && wowClient.isConnected()) { + wowClient.removeLocationUpdates(this); + wowClient.disconnect(); + } + super.onStop(); + } + + @Override + protected void onResume() { + super.onResume(); + loadOptions(); + if(forceLocation.isEmpty()) { + if(wowClient == null) { + wowClient = new LocationClient(this, this, this); + } + if(!wowClient.isConnected() && !wowClient.isConnecting()) { + wowClient.connect(); + } + } else { + if(wowClient != null && wowClient.isConnected()) { + wowClient.removeLocationUpdates(this); + wowClient.disconnect(); + } + new GetWeather(this).execute(); + } + } + + private boolean playServicesAvailable() { + int result = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); + if(result == ConnectionResult.SUCCESS) { + return true; + } + Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(result, this, REQUEST_PLAY_ERR_DIAG); + if(errorDialog != null) { + errorDialog.show(); + } + return false; + } + + @Override + public void onConnected(Bundle bundle) { + Log.d(TAG, "Play Services Connected"); + LocationRequest request = LocationRequest.create(); + request.setPriority(LocationRequest.PRIORITY_LOW_POWER); + request.setInterval(5000); + request.setFastestInterval(1000); + wowClient.requestLocationUpdates(request, this); + whereIsDoge = wowClient.getLastLocation(); + if(whereIsDoge == null) { + Log.e(TAG, "dunno where this shibe is"); + return; + } + new GetWeather(this).execute(whereIsDoge); + } + + @Override + public void onDisconnected() { + Log.d(TAG, "Play Services Disconnected"); + } + + @Override + public void onConnectionFailed(ConnectionResult connectionResult) { + if(!connectionResult.hasResolution()) { + Toast.makeText(this, "Connection failed.", Toast.LENGTH_SHORT).show(); + return; + } + try { + connectionResult.startResolutionForResult(this, REQUEST_PLAY_CONN_FAIL_RES); + } catch (IntentSender.SendIntentException ex) { + Log.wtf(TAG, ex); + } + } + + @Override + public void onLocationChanged(Location location) { + Log.d(TAG, "onLocationChanged"); + whereIsDoge = location; + new GetWeather(this).execute(whereIsDoge); + } + + private class GetWeather extends AsyncTask { + private static final String TAG = "GetWeather"; + private Context ctx; + GetWeather(Context ctx) { + super(); + this.ctx = ctx; + } + @Override + protected JSONArray doInBackground(Location... params) { + if(!Geocoder.isPresent() && forceLocation.isEmpty()) { + Log.wtf(TAG, new UnsupportedOperationException("No Geocoder is present on this device.")); + return null; + } + JSONArray data = new JSONArray(); + Address address = null; + if(forceLocation.isEmpty()) { + Geocoder geocoder = new Geocoder(ctx); + Location loc = params[0]; + try { + List
addresses = geocoder.getFromLocation(loc.getLatitude(), loc.getLongitude(), 1); + if(addresses == null || addresses.size() == 0) { + return null; + } + address = addresses.get(0); + } catch (Exception ex) { + Log.wtf(TAG, ex); + return null; + } + data.put(address.getLocality()); + } + + try { + HttpClient httpClient = new DefaultHttpClient(); + String queryString; + if(forceLocation.isEmpty() && address != null) { + queryString = "?lat=" + URLEncoder.encode(String.valueOf(address.getLatitude()), "ISO-8859-1") + + "&lon=" + URLEncoder.encode(String.valueOf(address.getLongitude()), "ISO-8859-1"); + } else { + queryString = "?q=" + URLEncoder.encode(forceLocation, "ISO-8859-1"); + } + HttpGet httpGet = new HttpGet("http://api.openweathermap.org/data/2.5/weather" + queryString); + HttpResponse httpResponse = httpClient.execute(httpGet); + HttpEntity httpEntity = httpResponse.getEntity(); + JSONObject weatherJson = new JSONObject(IOUtils.toString(httpEntity.getContent())); + if(weatherJson.getInt("cod") != 200) { + Toast.makeText(ctx, weatherJson.getString("message"), Toast.LENGTH_LONG).show(); + Log.e(TAG, "OWM Error " + weatherJson.getInt("cod") + ", " + weatherJson.getString("message")); + return null; + } + if(!forceLocation.isEmpty()) { + data.put(weatherJson.getString("name")); + } + data.put(weatherJson); + } catch (Exception ex) { + Log.wtf(TAG, ex); + return null; + } + return data; + } + + @Override + protected void onPostExecute(JSONArray data) { + if(data == null) { + return; + } + + try { + currentLocation = data.getString(0); + suchLocation.setText(currentLocation); + JSONObject subWeather = data.getJSONObject(1).getJSONArray("weather").getJSONObject(0); + JSONObject subMain = data.getJSONObject(1).getJSONObject("main"); + suchStatus.setText(getString(R.string.wow) + " " + subWeather.getString("description").trim().toLowerCase()); + setTemp(subMain.getDouble("temp")); + suchDoge.setImageResource(WeatherDoge.dogeSelect(subWeather.getString("icon"))); + suchLayout.setBackgroundResource(WeatherDoge.skySelect(subWeather.getString("icon"))); + } catch (JSONException ex) { + Log.wtf(TAG, ex); + } + } + + private void setTemp(double temp) { + temp = temp - 273.15d; // C + tempAdjectives = WeatherDoge.getTempAdjectives(getResources(), (int)Math.round(temp)); + if(UnitLocale.getDefault() == UnitLocale.IMPERIAL && !forceMetric) { + temp = temp * 1.8d + 32d; // F + } + currentTemp = temp; + temp = Math.round(temp); + DecimalFormat df = new DecimalFormat(); + df.setNegativePrefix(""); + df.setNegativeSuffix(""); + df.setMaximumFractionDigits(0); + df.setDecimalSeparatorAlwaysShown(false); + df.setGroupingUsed(false); + suchTemp.setText(df.format(temp)); + suchNegative.setVisibility(temp < 0d ? View.VISIBLE : View.GONE); + suchDegree.setVisibility(View.VISIBLE); + } + } +} diff --git a/WeatherDoge/src/main/java/com/versobit/weatherdoge/OptionsActivity.java b/WeatherDoge/src/main/java/com/versobit/weatherdoge/OptionsActivity.java new file mode 100644 index 0000000..391a30e --- /dev/null +++ b/WeatherDoge/src/main/java/com/versobit/weatherdoge/OptionsActivity.java @@ -0,0 +1,138 @@ +package com.versobit.weatherdoge; + +import android.content.pm.PackageInfo; +import android.os.Bundle; +import android.preference.ListPreference; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceCategory; +import android.preference.PreferenceManager; + +/** + * A {@link PreferenceActivity} that presents a set of application settings. On + * handset devices, settings are presented as a single list. On tablets, + * settings are split by category, with category headers shown to the left of + * the list of settings. + *

+ * See + * Android Design: Settings for design guidelines and the Settings + * API Guide for more information on developing a Settings UI. + */ +public class OptionsActivity extends PreferenceActivity { + + static final String PREF_FORCE_METRIC = "pref_force_metric"; + static final String PREF_FORCE_LOCATION = "pref_force_location"; + static final String PREF_ABOUT_VERSION = "pref_about_version"; + static final String PREF_ABOUT_CONTRIBUTE = "pref_about_contribute"; + static final String PREF_ABOUT_ADD_CREDITS = "pref_about_additional_credits"; + + + @Override + protected void onPostCreate(Bundle savedInstanceState) { + super.onPostCreate(savedInstanceState); + setupSimplePreferencesScreen(); + } + + /** + * Shows the simplified settings UI if the device configuration if the + * device configuration dictates that a simplified, single-pane UI should be + * shown. + */ + private void setupSimplePreferencesScreen() { + + // In the simplified UI, fragments are not used at all and we instead + // use the older PreferenceActivity APIs. + + // Add 'general' preferences. + addPreferencesFromResource(R.xml.pref_general); + + // Add 'about' preferences, and a corresponding header. + PreferenceCategory fakeHeader = new PreferenceCategory(this); + fakeHeader.setTitle(R.string.about); + getPreferenceScreen().addPreference(fakeHeader); + addPreferencesFromResource(R.xml.pref_about); + + Preference aboutVersion = findPreference(PREF_ABOUT_VERSION); + PackageInfo pInfo = WeatherDoge.getPackageInfo(this); + aboutVersion.setTitle(getString(R.string.app_name) + " v" + pInfo.versionName.split("-")[0]); + aboutVersion.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + new AboutDialog(OptionsActivity.this).show(); + return true; + } + }); + findPreference(PREF_ABOUT_CONTRIBUTE).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + new ContributeDialog(OptionsActivity.this).show(); + return true; + } + }); + + findPreference(PREF_ABOUT_ADD_CREDITS).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + new OtherShibesDialog(OptionsActivity.this).show(); + return true; + } + }); + + // Bind the summaries of EditText/List/Dialog/Ringtone preferences to + // their values. When their values change, their summaries are updated + // to reflect the new value, per the Android Design guidelines. + bindPreferenceSummaryToValue(findPreference(PREF_FORCE_LOCATION)); + } + + /** + * A preference value change listener that updates the preference's summary + * to reflect its new value. + */ + private static Preference.OnPreferenceChangeListener sBindPreferenceSummaryToValueListener = new Preference.OnPreferenceChangeListener() { + @Override + public boolean onPreferenceChange(Preference preference, Object value) { + String stringValue = value.toString(); + + if (preference instanceof ListPreference) { + // For list preferences, look up the correct display value in + // the preference's 'entries' list. + ListPreference listPreference = (ListPreference) preference; + int index = listPreference.findIndexOfValue(stringValue); + + // Set the summary to reflect the new value. + preference.setSummary( + index >= 0 + ? listPreference.getEntries()[index] + : null); + + } else { + // For all other preferences, set the summary to the value's + // simple string representation. + preference.setSummary(stringValue.isEmpty() ? preference.getContext().getString(R.string.unset) : stringValue); + } + return true; + } + }; + + /** + * Binds a preference's summary to its value. More specifically, when the + * preference's value is changed, its summary (line of text below the + * preference title) is updated to reflect the value. The summary is also + * immediately updated upon calling this method. The exact display format is + * dependent on the type of preference. + * + * @see #sBindPreferenceSummaryToValueListener + */ + private static void bindPreferenceSummaryToValue(Preference preference) { + // Set the listener to watch for value changes. + preference.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener); + + // Trigger the listener immediately with the preference's + // current value. + sBindPreferenceSummaryToValueListener.onPreferenceChange(preference, + PreferenceManager + .getDefaultSharedPreferences(preference.getContext()) + .getString(preference.getKey(), preference.getContext().getString(R.string.unset))); + } +} diff --git a/WeatherDoge/src/main/java/com/versobit/weatherdoge/OtherShibesDialog.java b/WeatherDoge/src/main/java/com/versobit/weatherdoge/OtherShibesDialog.java new file mode 100644 index 0000000..7b70608 --- /dev/null +++ b/WeatherDoge/src/main/java/com/versobit/weatherdoge/OtherShibesDialog.java @@ -0,0 +1,28 @@ +package com.versobit.weatherdoge; + +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.os.Bundle; +import android.webkit.WebView; + +class OtherShibesDialog extends AlertDialog { + OtherShibesDialog(Context ctx) { + super(ctx); + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + setButton(BUTTON_NEUTRAL, getContext().getString(R.string.wow), new OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dismiss(); + } + }); + WebView wv = new WebView(getContext()); + wv.getSettings().setDefaultTextEncodingName("utf-8"); + wv.loadUrl("file:///android_asset/othershibes.html"); + setView(wv); + super.onCreate(savedInstanceState); + } +} diff --git a/WeatherDoge/src/main/java/com/versobit/weatherdoge/UnitLocale.java b/WeatherDoge/src/main/java/com/versobit/weatherdoge/UnitLocale.java new file mode 100644 index 0000000..5061afd --- /dev/null +++ b/WeatherDoge/src/main/java/com/versobit/weatherdoge/UnitLocale.java @@ -0,0 +1,20 @@ +package com.versobit.weatherdoge; + +import java.util.Locale; + +// Based on http://stackoverflow.com/a/7860788/238374 +class UnitLocale { + static final int IMPERIAL = 0; + static final int METRIC = 1; + + static int getDefault() { + return getFrom(Locale.getDefault()); + } + static int getFrom(Locale locale) { + String countryCode = locale.getCountry(); + if ("US".equals(countryCode)) return IMPERIAL; // USA + if ("LR".equals(countryCode)) return IMPERIAL; // Liberia + if ("MM".equals(countryCode)) return IMPERIAL; // Burma + return METRIC; + } +} diff --git a/WeatherDoge/src/main/java/com/versobit/weatherdoge/WeatherDoge.java b/WeatherDoge/src/main/java/com/versobit/weatherdoge/WeatherDoge.java new file mode 100644 index 0000000..c4751c3 --- /dev/null +++ b/WeatherDoge/src/main/java/com/versobit/weatherdoge/WeatherDoge.java @@ -0,0 +1,114 @@ +package com.versobit.weatherdoge; + +import android.app.Application; +import android.content.Context; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.content.res.Resources; + + +public class WeatherDoge extends Application { + static PackageInfo getPackageInfo(Context ctx) { + try { + return ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), 0); + } catch (PackageManager.NameNotFoundException ex) { + // + } + return null; + } + + static int skySelect(String icon) { + int img = Integer.parseInt(icon.substring(0, 2)); + boolean day = icon.charAt(2) == 'd'; + int resId = R.drawable.sky_01d; + switch (img) { + case 1: + resId = day ? R.drawable.sky_01d : R.drawable.sky_01n; + break; + case 2: + resId = day ? R.drawable.sky_02d : R.drawable.sky_02n; + break; + case 3: + resId = day ? R.drawable.sky_03d : R.drawable.sky_03n; + break; + case 4: + resId = day ? R.drawable.sky_04d : R.drawable.sky_04n; + break; + case 9: + resId = day ? R.drawable.sky_09d : R.drawable.sky_09n; + break; + case 10: + resId = day ? R.drawable.sky_10d : R.drawable.sky_10n; + break; + case 11: + resId = day ? R.drawable.sky_11d : R.drawable.sky_11n; + break; + case 13: + resId = day ? R.drawable.sky_13d : R.drawable.sky_13n; + break; + case 50: + resId = day ? R.drawable.sky_50d : R.drawable.sky_50n; + break; + } + return resId; + } + + static int dogeSelect(String icon) { + int img = Integer.parseInt(icon.substring(0, 2)); + boolean day = icon.charAt(2) == 'd'; + int resId = R.drawable.doge_01d; + switch (img) { + case 1: + resId = day ? R.drawable.doge_01d : R.drawable.doge_01n; + break; + case 2: + resId = day ? R.drawable.doge_02d : R.drawable.doge_02n; + break; + case 3: + resId = day ? R.drawable.doge_03d : R.drawable.doge_03n; + break; + case 4: + resId = R.drawable.doge_04; + break; + case 9: + resId = R.drawable.doge_09; + break; + case 10: + resId = R.drawable.doge_10; + break; + case 11: + resId = R.drawable.doge_11; + break; + case 13: + resId = R.drawable.doge_13; + break; + case 50: + resId = R.drawable.doge_50; + break; + } + return resId; + } + + // Temp must be in celsius + static String[] getTempAdjectives(Resources res, int temp) { + if(temp <= -30) { + return res.getStringArray(R.array.weather_polarvortex); + } else if(temp > -30 && temp <= -15) { + return res.getStringArray(R.array.weather_yuck); + } else if(temp > -15 && temp <= -7) { + return res.getStringArray(R.array.weather_notokay); + } else if(temp > -7 && temp <= 0) { + return res.getStringArray(R.array.weather_chilly); + } else if(temp > 0 && temp <= 10) { + return res.getStringArray(R.array.weather_concern); + } else if(temp > 10 && temp <= 20) { + return res.getStringArray(R.array.weather_whatever); + } else if(temp > 20 && temp <= 30) { + return res.getStringArray(R.array.weather_warmth); + } else if(temp > 30) { + return res.getStringArray(R.array.weather_globalwarming); + } else { + return res.getStringArray(R.array.weather_wow); + } + } +} diff --git a/WeatherDoge/src/main/res/drawable-hdpi/github.png b/WeatherDoge/src/main/res/drawable-hdpi/github.png new file mode 100644 index 0000000..94170ed Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-hdpi/github.png differ diff --git a/WeatherDoge/src/main/res/drawable-hdpi/ic_action_settings.png b/WeatherDoge/src/main/res/drawable-hdpi/ic_action_settings.png new file mode 100644 index 0000000..54eecde Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-hdpi/ic_action_settings.png differ diff --git a/WeatherDoge/src/main/res/drawable-hdpi/ic_action_share.png b/WeatherDoge/src/main/res/drawable-hdpi/ic_action_share.png new file mode 100644 index 0000000..a36464b Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-hdpi/ic_action_share.png differ diff --git a/WeatherDoge/src/main/res/drawable-hdpi/ic_launcher.png b/WeatherDoge/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100755 index 0000000..e43734c Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/WeatherDoge/src/main/res/drawable-mdpi/github.png b/WeatherDoge/src/main/res/drawable-mdpi/github.png new file mode 100644 index 0000000..89e4db4 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-mdpi/github.png differ diff --git a/WeatherDoge/src/main/res/drawable-mdpi/ic_action_settings.png b/WeatherDoge/src/main/res/drawable-mdpi/ic_action_settings.png new file mode 100644 index 0000000..25c36db Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-mdpi/ic_action_settings.png differ diff --git a/WeatherDoge/src/main/res/drawable-mdpi/ic_action_share.png b/WeatherDoge/src/main/res/drawable-mdpi/ic_action_share.png new file mode 100644 index 0000000..7362f0d Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-mdpi/ic_action_share.png differ diff --git a/WeatherDoge/src/main/res/drawable-mdpi/ic_launcher.png b/WeatherDoge/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100755 index 0000000..811a2a0 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/WeatherDoge/src/main/res/drawable-xhdpi/github.png b/WeatherDoge/src/main/res/drawable-xhdpi/github.png new file mode 100644 index 0000000..04b20a7 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xhdpi/github.png differ diff --git a/WeatherDoge/src/main/res/drawable-xhdpi/ic_action_settings.png b/WeatherDoge/src/main/res/drawable-xhdpi/ic_action_settings.png new file mode 100644 index 0000000..425a8bc Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xhdpi/ic_action_settings.png differ diff --git a/WeatherDoge/src/main/res/drawable-xhdpi/ic_action_share.png b/WeatherDoge/src/main/res/drawable-xhdpi/ic_action_share.png new file mode 100644 index 0000000..40771e4 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xhdpi/ic_action_share.png differ diff --git a/WeatherDoge/src/main/res/drawable-xhdpi/ic_launcher.png b/WeatherDoge/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100755 index 0000000..0f87c09 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxhdpi/github.png b/WeatherDoge/src/main/res/drawable-xxhdpi/github.png new file mode 100644 index 0000000..60e506e Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxhdpi/github.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxhdpi/ic_action_settings.png b/WeatherDoge/src/main/res/drawable-xxhdpi/ic_action_settings.png new file mode 100644 index 0000000..fe5fec4 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxhdpi/ic_action_settings.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxhdpi/ic_action_share.png b/WeatherDoge/src/main/res/drawable-xxhdpi/ic_action_share.png new file mode 100644 index 0000000..22ed428 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxhdpi/ic_action_share.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxhdpi/ic_launcher.png b/WeatherDoge/src/main/res/drawable-xxhdpi/ic_launcher.png new file mode 100755 index 0000000..d36c826 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/bitcoin.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/bitcoin.png new file mode 100644 index 0000000..cf55a4b Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/bitcoin.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_01d.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_01d.png new file mode 100644 index 0000000..1b01acb Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_01d.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_01n.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_01n.png new file mode 100644 index 0000000..845610d Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_01n.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_02d.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_02d.png new file mode 100644 index 0000000..655b01b Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_02d.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_02n.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_02n.png new file mode 100644 index 0000000..db2cddc Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_02n.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_03d.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_03d.png new file mode 100644 index 0000000..77eb7de Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_03d.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_03n.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_03n.png new file mode 100644 index 0000000..c6ddaa0 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_03n.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_04.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_04.png new file mode 100644 index 0000000..f2c3f5e Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_04.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_09.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_09.png new file mode 100644 index 0000000..8af4637 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_09.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_10.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_10.png new file mode 100644 index 0000000..6f40f4a Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_10.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_11.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_11.png new file mode 100644 index 0000000..5d00516 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_11.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_13.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_13.png new file mode 100644 index 0000000..10010e8 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_13.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_50.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_50.png new file mode 100644 index 0000000..0a00353 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_50.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_regular.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_regular.png new file mode 100644 index 0000000..ba5faee Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/doge_regular.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/dogecoin.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/dogecoin.png new file mode 100644 index 0000000..ce5cc3b Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/dogecoin.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/github.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/github.png new file mode 100644 index 0000000..223cb5d Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/github.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/ic_launcher.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/ic_launcher.png new file mode 100755 index 0000000..4aaed54 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/ic_launcher.png differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_01d.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_01d.jpg new file mode 100644 index 0000000..3509d0a Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_01d.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_01n.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_01n.jpg new file mode 100644 index 0000000..b9ce47a Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_01n.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_02d.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_02d.jpg new file mode 100644 index 0000000..e084691 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_02d.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_02n.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_02n.jpg new file mode 100644 index 0000000..cc6de87 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_02n.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_03d.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_03d.jpg new file mode 100644 index 0000000..e1466f8 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_03d.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_03n.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_03n.jpg new file mode 100644 index 0000000..a275330 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_03n.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_04d.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_04d.jpg new file mode 100644 index 0000000..09c4e0e Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_04d.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_04n.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_04n.jpg new file mode 100644 index 0000000..5ee18fd Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_04n.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_09d.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_09d.jpg new file mode 100644 index 0000000..a3233e6 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_09d.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_09n.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_09n.jpg new file mode 100644 index 0000000..cd7f8f9 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_09n.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_10d.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_10d.jpg new file mode 100644 index 0000000..58d9e2b Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_10d.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_10n.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_10n.jpg new file mode 100644 index 0000000..cd7f8f9 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_10n.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_11d.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_11d.jpg new file mode 100644 index 0000000..1125eb3 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_11d.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_11n.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_11n.jpg new file mode 100644 index 0000000..3582439 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_11n.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_13d.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_13d.jpg new file mode 100644 index 0000000..b536710 Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_13d.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_13n.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_13n.jpg new file mode 100644 index 0000000..9b69dee Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_13n.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_50d.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_50d.jpg new file mode 100644 index 0000000..05e0dfe Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_50d.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_50n.jpg b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_50n.jpg new file mode 100644 index 0000000..b38ca6b Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/sky_50n.jpg differ diff --git a/WeatherDoge/src/main/res/drawable-xxxhdpi/versobit.png b/WeatherDoge/src/main/res/drawable-xxxhdpi/versobit.png new file mode 100644 index 0000000..ef39b6d Binary files /dev/null and b/WeatherDoge/src/main/res/drawable-xxxhdpi/versobit.png differ diff --git a/WeatherDoge/src/main/res/drawable/dialog_contribute_background.xml b/WeatherDoge/src/main/res/drawable/dialog_contribute_background.xml new file mode 100644 index 0000000..36b24c7 --- /dev/null +++ b/WeatherDoge/src/main/res/drawable/dialog_contribute_background.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/WeatherDoge/src/main/res/drawable/round_rect_shape.xml b/WeatherDoge/src/main/res/drawable/round_rect_shape.xml new file mode 100644 index 0000000..dcd4ffc --- /dev/null +++ b/WeatherDoge/src/main/res/drawable/round_rect_shape.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/WeatherDoge/src/main/res/layout/activity_main.xml b/WeatherDoge/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..a109b02 --- /dev/null +++ b/WeatherDoge/src/main/res/layout/activity_main.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WeatherDoge/src/main/res/layout/dialog_about.xml b/WeatherDoge/src/main/res/layout/dialog_about.xml new file mode 100644 index 0000000..57d05d1 --- /dev/null +++ b/WeatherDoge/src/main/res/layout/dialog_about.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + +