Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Os apps de clima permitem que os usuários vejam informações relevantes sobre o clima relacionado ao local
atual ou ao trajeto. Os apps de clima também podem oferecer recursos de
navegação. Consulte Criar apps de navegação para carros para mais detalhes sobre
como criar apps de navegação.
Se o app também puder ser usado para navegação, ele também precisará seguir as
orientações encontradas em Declarar suporte à navegação no manifesto ao
declarar a categoria. O filtro de intent usado para declarar a categoria do app
precisa incluir as duas categorias:
Os apps de clima podem acessar o MapWithContentTemplate, que pode ser usado para
exibir listas e outros tipos de conteúdo ao lado de um mapa renderizado pelo
app. Consulte Desenhar mapas para mais detalhes sobre o uso desse modelo.
Para acessar o modelo, seu app precisa declarar a
permissão androidx.car.app.MAP_TEMPLATES ou androidx.car.app.NAVIGATION_TEMPLATES
no arquivo AndroidManifest.xml:
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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."]]