Technical Requirements Document
How the MyWeather Android application is structured, what it depends on, and how its release should be built and verified.
01 Technical summary
MyWeather Motion is a hybrid Android application authored in MIT App Inventor. Native AI2 components handle location services, HTTP requests, persistence and timing, while the visual dashboard is bundled as HTML/CSS/JavaScript and rendered in a WebViewer.
Technical facts are based on the preserved MyWeather_PROJECT_RENAMED.aia snapshot. Runtime behavior and Play publication status still require end-to-end verification.
02 Project & build metadata
| Field | Value from project |
|---|---|
| Project | MyWeather |
| Package | appinventor.ai_renzterrie.MyWeather |
| Display app name in snapshot | MyWeather Motion |
| Source version | 4.0 (version code 4) |
| Framework | MIT App Inventor (AI2, blocks) |
| UI rendering | HTML + CSS + JS inside WebViewer |
| Core provider | Open-Meteo Forecast and Geocoding APIs |
| Responsive setting | Responsive |
| App theme metadata | Light NoActionBar; dark UI styled separately |
The project’s editable properties may change before release. Confirm actual signed build metadata rather than assuming the stored snapshot matches the uploaded Play version.
03 System architecture
weather_motion.htmlHTML + CSS animations + JavaScript renderingPresentational code runs locally in the bundled asset, while AI2 handles device integration. The Android app therefore has no requirement for a custom backend server to fetch forecast data.
04 Native components & responsibilities
| Component found in source | Purpose |
|---|---|
WebViewerMotion | Displays the local HTML interface |
LocationSensor1 | Obtains coordinates after user permission |
Web1 | Requests Open-Meteo forecast JSON |
WebCity | Searches city names through geocoding API |
Clock1 | Time-based refresh / scheduling support |
TinyDB1 | Saves selected values and preferences locally |
Notifier1 | Presents native alerts / feedback when used |
05 Weather & geocoding APIs
Current and daily forecast
GET https://api.open-meteo.com/v1/forecast with latitude, longitude, current fields, daily fields, 3-day horizon, timezone and requested temperature units.
current=temperature_2m,relative_humidity_2m,
apparent_temperature,is_day,precipitation,
weather_code,wind_speed_10m
daily=temperature_2m_max,temperature_2m_min,
precipitation_probability_max,weather_code,
sunrise,sunset,uv_index_max
forecast_days=3&timezone=autoSearch a city
GET https://geocoding-api.open-meteo.com/v1/search?name=.... The input must be URL-encoded; use a selected result’s coordinates to request forecasts.
Use HTTPS, validate error status and response shape, avoid overly frequent refreshes and show sensible UI states if an API endpoint cannot be reached. Consult provider terms and attribution guidance before a production release.
06 Data model & storage
| Data group | Fields / examples | Storage |
|---|---|---|
| Selected location | City, latitude, longitude | In-memory; saved-city support in TinyDB |
| Preferences | Temperature unit | TinyDB local preference |
| Current forecast | Temp, feels-like, humidity, wind, code, precipitation | Runtime response |
| Daily forecast | High/low, weather code, rain probability, sunrise/sunset, UV | Runtime response |
| UI state | Loading, error, last updated | Runtime / WebViewer |
Do not claim no personal data processing solely from local preference storage. Complete a data-flow review and accurate privacy disclosures before publication.
07 WebViewer data flow
- The user requests GPS, searches a city, switches units or refreshes.
- AI2 blocks receive the action and resolve a location when needed.
Web1performs the forecast request and parses the returned JSON.- Relevant values are passed into the embedded weather dashboard.
- The JavaScript UI updates text, forecast tiles and condition-driven effects.
- A failure state is surfaced and allows another attempt.
App Inventor’s block-to-WebViewer contract should be maintained as a typed, documented message structure. Sanitize dynamic text before rendering it in HTML and avoid injecting untrusted scripts or markup.
08 Permissions & security
- Location: used for optional current-location weather. Denial should not block city search.
- Internet: needed for API requests, search and forecast refresh.
- Local preference storage: TinyDB retains app choices on the device.
- APK distribution: serve release builds over HTTPS and publish hash/signing details for independent integrity checks where practical.
- WebViewer: render the bundled local HTML and restrict unnecessary external navigation, scripting bridges and untrusted content.
The privacy policy and Google Play Data safety declarations must reflect the tested, final APK/AAB, platform SDKs and actual network behavior.
09 Nonfunctional technical requirements
| Category | Engineering requirement |
|---|---|
| Performance | Keep UI responsive while requests execute; avoid duplicate refreshes |
| Resilience | Handle timeouts, empty geocoding results and malformed responses |
| Responsiveness | Test Android portrait layout across narrow and wide screens |
| Accessibility | Meaningful labels, clear focus/tap states, readable text contrast |
| Animations | Prefer transform/opacity; avoid heavy continuous main-thread work |
| Observability | Surface last-updated and error information without exposing sensitive coordinates unnecessarily |
| Maintainability | Keep weather-code mapping, display logic and native API logic reasonably separated |
10 Build, package & distribution
- Open the
.aiaproject in MIT App Inventor and review Screen1 components/blocks. - Confirm project name
MyWeather, version code, signing strategy, and packageappinventor.ai_renzterrie.MyWeather. - Use the appropriate MIT App Inventor build command to produce an APK for direct download or an AAB for Play Console. They are not interchangeable.
- Test the signed release build on supported Android versions before posting download links.
- For direct download, host the actual APK under
releases/MyWeather.apk(or a trusted HTTPS URL) and update the websiteconfig.js. - For Google Play, only link a confirmed live listing after the app is available.
Uploading an AAB to Play Console does not automatically make a standalone installable APK available on this website.
11 Verification matrix
| Test | Expected result |
|---|---|
| Startup with GPS enabled | Location resolved; conditions displayed |
| GPS permission denied | Manual city search remains available |
| Valid international city | Coordinates resolved; values update |
| Empty/invalid city | Helpful message; no crash |
| Offline network | Request error visible; retry option works |
| Toggle °C ↔ °F | Values/labels consistent; preference persists |
| Different weather codes | Appropriate conditions and effects shown |
| Three-day outlook | Dates, icons and temperatures consistent |
| Background/resume | No stale or duplicate requests / UI lock |
| Release APK and AAB | Correct package/version, successful installation & launch |
These are proposed checks. Record device, Android release, result, evidence and defect reference during testing.
12 Known risks & future engineering
- MIT App Inventor platform updates may alter component versions and build behavior.
- Provider API changes or unexpected weather-code values may require parsing and display adjustments.
- WebViewer behavior can vary by Android WebView version.
- Store compliance, SDK requirements and privacy disclosures should be rechecked at submission time.
- Potential enhancements: stronger caching, request debouncing, a clearer typed bridge contract and an automated regression checklist.