Giter VIP home page Giter VIP logo

xweather's Introduction

apple-app-store

XWeather

Build status

XWeather is a weather app for iOS and Android built with Xamarin.

iOS

ios-daily ios-hourly ios-details ios-locations ios-search

Android

android-daily android-hourly android-details android-locations android-search

Getting Started

PrivateKeys.cs

There is a PrivateKeys.cs file the Constants directory located at XWeather/XWeather/Constants that contains four const string keys.

All keys can be left as empty strings and the app will build/run just fine, however it will display static 'testing' weather data. In order to set up the live weather API and use GPS services on Android, you'll need to follow the instructions below to obtain the appropriate API keys.

Weather Underground

XWeather gets weather data from Weather Underground's API. There are static data files included in the iOS and Android app bundle that will allow you to build and run the app with "test data". However, in order to get live weather data, add additional locations, etc., you'll need to create an Weather Underground account and obtain an API key. The free "Developer" tier is sufficient to run the app.

  • Sign up for new a Weather Underground account (or login to an existing one)
  • Purchase an new API Key. Make sure to select ANVIL PLAN, as the app uses several pieces of data in that plat.
  • In PrivateKeys.cs set the value of WuApiKey to your Weather Underground API Key.

Google Maps API key (Android)

To use location services in the Android version of XWeather, you'll need to obtain a Google Maps API key.

  • Follow the step-by-step guide to obtain a Google Maps API key.
  • In PrivateKeys.cs set the value of GoogleMapsApiKey to your Weather Underground API Key.

Visual Studio Mobile Center (optional)

Mobile Center is the amalgamation of HockeyApp, Xamarin Test Cloud, Xamarin Insights, and a bunch of new services like automated builds. It is a single platform to manage all aspects of continuous integration and continuous deployment, including build, test, distribution, crash reporting, and analytics.

Setting up Mobile Center is completely optional. If you'd like to use it, you can set it up by following the steps listed below. However, if you'd rather skip this step for now, simply leave the two values of AppSecret as empty strings.

  • Register for new a Mobile Center account (or login using GitHub, Microsoft, or an existing Mobile Center account)
  • Create a new app for both iOS and Android
  • In PrivateKeys.cs set the two values of AppSecret your new iOS and Android app's respective App Secrets.

Visual Studio Mobile Center

This app uses Mobile Center for Continuous Integration and Continuous Deployment, by taking advantage of the functionality provided by each of the following "beacons":

Build

Each time someone commits new code to this repo, Mobile Center's Build beacon automatically builds and distributes a new version for iOS and Android:

Screenshots

Test

Mobile Center's Test beacon moves the power of Xamarin Test Cloud to run UI tests on real devices into a single dashboard:

Screenshots

Screenshots

Distribute

Once a new version of XWeather successfully builds and passes all tests, Mobile Center's Distribute beacon deploys the pre-release version a selected group of beta testers.

Screenshots

Crash Reporting

All of HockeyApp's crash reporting features were included in Mobile Center's Crashes beacon, including real-time details and stack-traces from crashes that happen "in the wild":

Screenshots

Analytics

Finally, the app uses Mobile Center's Analytics beacon to monitor and record information about the app's user base as well as custom events:

Screenshots

Screenshots

About

XWeather was created by Colby Williams. Thanks to @charlieyllobre for the awesome (free) weather icons.

License

Licensed under the MIT License (MIT). See LICENSE for details.

xweather's People

Contributors

brminnick avatar colbylwilliams avatar guperrot avatar kdubau avatar naterickard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xweather's Issues

[iOS] Mobile Center Crash Group #10 - ArgumentOutOfRange Exception

DateTimeFormatInfo.set_Calendar (System.Globalization.Calendar value)

System.ArgumentOutOfRangeException: Not a valid calendar for the given culture. Parameter name: value

DateTimeFormatInfo.set_Calendar (System.Globalization.Calendar value)
CultureInfo.get_DateTimeFormat ()
CultureInfo.GetFormat (System.Type formatType)
DateTimeFormatInfo.get_CurrentInfo ()
DateTime.ToShortTimeString ()
LocationTvCell.SetData (XWeather.WuLocation location)

Crash
Code

ForecastString method not returning correct day in some situations

Method in question:

public static string ForecastString (this WuLocation location, TemperatureUnits unit, DateTime? date = null)

in WeatherConditionsExtensions.cs

--

Scenario:

Late last night I was testing the weather bot and asked for Saturday's weather. This was ~1:55am. What I found is that the date math done in here to determine the correct "period" yielded a period of 4 (Saturday - Thurs == 2; 2 * 2 (for day/night) == 4); however, the location.TxtForecasts collection still had Wednesday data at the start of the dictionary, so the 'correct' period would have been 6.

Not sure if the data was stale/cached from earlier service calls on Wed. night, but we may want to 'anchor' the period calculation based on what the first day in the collection is.

Flip on the x86 architecture setting in the Android project

If someone builds the Android project out of the box and deploys to an x86 Atom-based emulator, they'll get the following in the "Deploying to Device" pad:

Deploying package to 'emulator-5554'

The package does not support the device architecture (x86). You can change the supported architectures in the Android Build section of the Project Options.

Deployment failed. Architecture not supported.

Only x86_64 is currently flipped on, so only 64-bit emulators and devices will be deployed to.

Flip the setting on for x86 (and any other pertinent architectures):

Check the release settings too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.