XWeather is a weather app for iOS and Android built with Xamarin.
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.
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.
PrivateKeys.csset the value of
WuApiKeyto 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.
PrivateKeys.csset the value of
GoogleMapsApiKeyto 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
PrivateKeys.csset the two values of
AppSecretyour 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":
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:
Mobile Center's Test beacon moves the power of Xamarin Test Cloud to run UI tests on real devices into a single dashboard:
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":
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:
Licensed under the MIT License (MIT). See LICENSE for details.