All Projects → wangchenyan → ponyweather

wangchenyan / ponyweather

Licence: other
Android weather app use rxjava&retrofit&material design

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to ponyweather

verif
Software for verifying weather forecasts
Stars: ✭ 70 (-11.39%)
Mutual labels:  weather
open-earth-compiler
development repository for the open earth compiler
Stars: ✭ 50 (-36.71%)
Mutual labels:  weather
Perfect-Weather
Demonstrate using URL Routes & variables, Fetching of remote data from API's as JSON, reading and transforming to data more appropriately consumable by an API client.
Stars: ✭ 32 (-59.49%)
Mutual labels:  weather
Weather
用WPF写的日历天气桌面小程序
Stars: ✭ 44 (-44.3%)
Mutual labels:  weather
yahoo-weather-java-api
A Java API for the yahoo weather service
Stars: ✭ 26 (-67.09%)
Mutual labels:  weather
Weather
用C#编写的天气预报小工具(.NET4.0 & Visual Studio 2017)
Stars: ✭ 19 (-75.95%)
Mutual labels:  weather
wingpanel-indicator-weather
Weather app for elementary os
Stars: ✭ 12 (-84.81%)
Mutual labels:  weather
1pone.github.io
Kindle拯救计划——一个Kindle实用工具网站,让你吃灰的Kindle成为时钟、天气看板、电子相册、微博热搜榜单...
Stars: ✭ 150 (+89.87%)
Mutual labels:  weather
MMM-NOAA
Weather module
Stars: ✭ 17 (-78.48%)
Mutual labels:  weather
HexBot
A Relatively Simply Awesome Discord bot with Music, Games, Comics, Memes and other cool features. This bot is made in Python 3.8 using discord.py
Stars: ✭ 109 (+37.97%)
Mutual labels:  weather
AZ-Touch-Pi0-Weather
AZ-Touch PiZero Weatherstation
Stars: ✭ 31 (-60.76%)
Mutual labels:  weather
BME680
Arduino Library to access the Bosch BME680 - temperature, pressure, humidity and gas sensor
Stars: ✭ 30 (-62.03%)
Mutual labels:  weather
aerisjs
Aeris Interactive
Stars: ✭ 55 (-30.38%)
Mutual labels:  weather
descent
Elegant now playing display for Last.fm showing song metadata and local weather.
Stars: ✭ 97 (+22.78%)
Mutual labels:  weather
MeteoalarmCard
Meteoalarm, Météo-France and DWD severe weather warnings card for Home Assistant Lovelace UI ⛈️
Stars: ✭ 48 (-39.24%)
Mutual labels:  weather
pluvia weather flutter
A weather app with beautiful animations, built with Flutter. Uses the OpenWeatherMap API and MapBox API.
Stars: ✭ 114 (+44.3%)
Mutual labels:  weather
hs-weather
Weather menubar app for hammerspoon
Stars: ✭ 17 (-78.48%)
Mutual labels:  weather
ArduinoWeatherOS
Arduino Uno, 433MhzRx and OS WMR86 Weather Station
Stars: ✭ 69 (-12.66%)
Mutual labels:  weather
tmux-weather
🌤 Weather plugin for tmux
Stars: ✭ 40 (-49.37%)
Mutual labels:  weather
owm-display
forecast.io display
Stars: ✭ 67 (-15.19%)
Mutual labels:  weather

小马天气

前言

部分设计参考xcc3641的开源项目SeeWeather,在此表示感谢!
第一次开始这个项目是2014年4月份,我还在大二的时候,当时有一个程序设计实践课,想着简单点就选了天气预报这个题目,时隔两年又重新拾起,给它脱胎换骨,就是想拿他作为一个学习新知识的实战项目,期间也做过改动,比如曾经把网络请求模块从android-async-http改为Volley

简介

小马天气是一款开源Android天气信息查询软件。

  • 实景天气,寻找你身边的美景
  • 多城市天气预报,记得提醒远方的TA
  • 语音播报,一键听天气
  • Material Design 设计风格,从未如此简约
  • 自动夜间模式,更加贴心

使用

  1. clone 项目
  2. 打开项目根目录下的 local.properties 文件,添加如下内容
# 和风天气,影响天气数据
HE_KEY=xxxxxx
# bmob,影响实景天气
BMOB_KEY=xxxxxx
# 百度语音合成,影响语音播报
BD_TTS_API_KEY=xxxxxx
BD_TTS_SECRET_KEY=xxxxxx
# 高德地图,影响定位
AMAP_KEY=xxxxxx
# bughd,非必需
BUG_HD_KEY=xxxxxx
  1. 到相应的网站申请需要的 key (如和风天气),替换对应位置的 xxxxxx

更新说明

v 2.2

  • 升级和风天气API为V5

v 2.1

  • 新增搜索城市
  • 新增设置自动更新时间间隔

v 2.0

  • 新增实景天气
  • 新增城市管理
  • 新增语音播报
  • 支持自动夜间模式

v 1.5

  • 重构代码,全新风格设计
  • 增加支持国内全部县级以上城市可选

v 1.4

  • 支持Android 6.0

下载地址

点击下载

TODO

  • 实景天气
  • 城市管理
  • 语音播报
  • 自动夜间模式
  • 桌面小部件

项目

公开API

开源技术

关键代码

网络请求RxJava+Retrofit

private void fetchDataFromNetWork(final CityEntity city) {
    Api.getIApi().getWeather(city.name, ApiKey.HE_KEY)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .filter(new Func1<WeatherData, Boolean>() {
                @Override
                public Boolean call(final WeatherData weatherData) {
                    boolean success = weatherData.weathers.get(0).status.equals("ok");
                    return success;
                }
            })
            .map(new Func1<WeatherData, Weather>() {
                @Override
                public Weather call(WeatherData weatherData) {
                    return weatherData.weathers.get(0);
                }
            })
            .doOnNext(new Action1<Weather>() {
                @Override
                public void call(Weather weather) {
                    mACache.put(city.name, weather);
                    SystemUtils.saveRefreshTime(WeatherActivity.this);
                }
            })
            .subscribe(new Subscriber<Weather>() {
                ...
				updateView(weather);
				...
            });
}

截图

关于作者

掘金:https://juejin.im/user/2313028193754168
微博:https://weibo.com/wangchenyan1993

License

Copyright 2017 wangchenyan

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].