Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wetter-Apps geben Nutzern relevante Wetterinformationen zu ihrem aktuellen Standort oder entlang ihrer Route an. Wetter-Apps können auch Navigationsfunktionen bieten. Weitere Informationen zum Entwickeln von Navigations-Apps finden Sie unter Navigations-Apps für Autos entwickeln.
Wenn Ihre App auch zur Navigation verwendet werden kann, müssen Sie bei der Deklarierung der Kategorie auch die Anleitung unter Navigationsunterstützung in Ihrem Manifest deklarieren befolgen. Der Intent-Filter, mit dem die Kategorie Ihrer App deklariert wird, sollte beide Kategorien enthalten:
Wetter-Apps können auf die MapWithContentTemplate zugreifen. Mit dieser Vorlage können Listen und andere Arten von Inhalten neben einer Karte angezeigt werden, die von Ihrer App gerendert wird. Weitere Informationen zur Verwendung dieser Vorlage finden Sie unter Karten zeichnen.
Damit Ihre App auf die Vorlage zugreifen kann, muss sie in der Datei AndroidManifest.xml entweder die Berechtigung androidx.car.app.MAP_TEMPLATES oder androidx.car.app.NAVIGATION_TEMPLATES deklarieren:
Alle Inhalte und Codebeispiele auf dieser Seite unterliegen den Lizenzen wie im Abschnitt Inhaltslizenz beschrieben. Java und OpenJDK sind Marken oder eingetragene Marken von Oracle und/oder seinen Tochtergesellschaften.
Zuletzt aktualisiert: 2025-07-27 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-07-27 (UTC)."],[],[],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."]]