[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Build a weather app\n\nWeather apps let users see relevant weather information related to their current\nlocation or along their route. Weather apps can also provide navigation\ncapabilities -- see [Build navigation apps for cars](/training/cars/apps/navigation) for more details on\nbuilding navigation apps.\n| **Design guidelines:** Refer to [Weather apps](https://developers.google.com/cars/design/create-apps/app-types/weather) for UX guidance specific to weather apps.\n\nDeclare the weather category in your manifest\n---------------------------------------------\n\nYour app must declare the `androidx.car.app.category.WEATHER`\n[car app category](/training/cars/apps#supported-app-categories) in the intent filter of its [`CarAppService`](/reference/androidx/car/app/CarAppService). \n\n \u003capplication\u003e\n ...\n \u003cservice\n ...\n android:name=\".MyCarAppService\"\n android:exported=\"true\"\u003e\n \u003cintent-filter\u003e\n \u003caction android:name=\"androidx.car.app.CarAppService\" /\u003e\n \u003ccategory android:name=\"androidx.car.app.category.WEATHER\"/\u003e\n \u003c/intent-filter\u003e\n \u003c/service\u003e\n ...\n \u003capplication\u003e\n\n### Declare navigation support\n\nIf your app can also be used for navigation, it must also follow the\nguidance found at [Declare navigation support in your manifest](/training/cars/apps/navigation#declare-navigation-support) when\ndeclaring its category. The intent filter used to declare your app's category\nshould include both categories: \n\n \u003cintent-filter\u003e\n \u003caction android:name=\"androidx.car.app.CarAppService\" /\u003e\n \u003ccategory android:name=\"androidx.car.app.category.WEATHER\"/\u003e\n \u003ccategory android:name=\"androidx.car.app.category.NAVIGATION\"/\u003e\n \u003c/intent-filter\u003e\n\nImplement your app's functionality\n----------------------------------\n\nTo implement your app, refer to [Using the Android for Cars App Library](/training/cars/apps) on\nhow Car App Library apps are built. Also, be sure to familiarize yourself with\nthe [Car app quality guidelines for weather apps](/docs/quality-guidelines/car-app-quality?category=weather#app_categories), as your app will be\nreviewed against these guidelines.\n\n### Draw maps\n\nWeather apps can access the [`MapWithContentTemplate`](/reference/androidx/car/app/navigation/model/MapWithContentTemplate), which can be used to\ndisplay lists and other types of content alongside a map that is rendered by\nyour app. See [Draw maps](/training/cars/apps#draw-maps) for more details on using this template.\n| **Important:** Keep the [Weather Functionality](/docs/quality-guidelines/car-app-quality?category=weather#weather-functionality) quality guidelines in mind when determining what to render on a map\n\nTo access the template, your app needs to declare either the\n`androidx.car.app.MAP_TEMPLATES` or `androidx.car.app.NAVIGATION_TEMPLATES`\npermission in its `AndroidManifest.xml` file: \n\n \u003cmanifest ...\u003e\n ...\n \u003c!-- Use the MAP_TEMPLATES permission if your app doesn't provide navigation functionality --\u003e\n \u003cuses-permission android:name=\"androidx.car.app.MAP_TEMPLATES\"/\u003e\n\n \u003c!-- Use the NAVIGATION_TEMPLATES permission if your app provides navigation functionality --\u003e\n \u003cuses-permission android:name=\"androidx.car.app.NAVIGATION_TEMPLATES\"/\u003e\n ...\n \u003c/manifest\u003e\n\n| **Caution:** Don't include both the `androidx.car.app.MAP_TEMPLATES` and the `androidx.car.app.NAVIGATION_TEMPLATES` permissions in your manifest, or your app will be rejected during review."]]