{"id":272024,"date":"2025-03-05T05:21:18","date_gmt":"2025-03-05T05:21:18","guid":{"rendered":"https:\/\/michigandigitalnews.com\/index.php\/2025\/03\/05\/generate-stunning-visuals-in-your-android-apps-with-imagen-3-via-vertex-ai-in-firebase\/"},"modified":"2025-06-25T17:09:13","modified_gmt":"2025-06-25T17:09:13","slug":"generate-stunning-visuals-in-your-android-apps-with-imagen-3-via-vertex-ai-in-firebase","status":"publish","type":"post","link":"https:\/\/michigandigitalnews.com\/index.php\/2025\/03\/05\/generate-stunning-visuals-in-your-android-apps-with-imagen-3-via-vertex-ai-in-firebase\/","title":{"rendered":"Generate Stunning Visuals in Your Android Apps with Imagen 3 via Vertex AI in Firebase"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div>\n<meta content=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjmMJvGAb7OmO4kNVr_9IxgxTSKBAtmErtOyoQXLY2aqdKpZK4p0H8MPHFfSbpUkcI0QHsZxeg_1lvZTEADsdIbmz24mzaMpDFMKSF1kiifSZUVM1CEPA93fiYeEDbMYLTz4xTL_-xlA5yQrIVTYBnaV9GlZd7FAbeC7Q9cI4dcfZA9ejkklbdt6RhqBis\/s1600\/Imagen-3-generated-image-hot-air-balloon-.png\" name=\"twitter:image\"\/><br \/>\n<img decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjmMJvGAb7OmO4kNVr_9IxgxTSKBAtmErtOyoQXLY2aqdKpZK4p0H8MPHFfSbpUkcI0QHsZxeg_1lvZTEADsdIbmz24mzaMpDFMKSF1kiifSZUVM1CEPA93fiYeEDbMYLTz4xTL_-xlA5yQrIVTYBnaV9GlZd7FAbeC7Q9cI4dcfZA9ejkklbdt6RhqBis\/s1600\/Imagen-3-generated-image-hot-air-balloon-.png\" style=\"display: none;\"\/><\/p>\n<p><em>Posted by <author>Thomas Ezan Sr.<\/author> \u2013 Android Developer Relation Engineer (@lethargicpanda)<\/em><\/p>\n<p><a href=\"https:\/\/deepmind.google\/technologies\/imagen-3\/\" target=\"_blank\" rel=\"noopener\">Imagen 3<\/a>, our most advanced image generation model, is now available through Vertex AI in Firebase, making it even easier to integrate it to your Android apps.<\/p>\n<p>Designed to generate well-composed images with exceptional details, reduced artifacts, and rich lighting, <b>Imagen 3<\/b> represents a significant leap forward in image generation capabilities.<\/p>\n<p><image><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" alt=\"Hot air balloons float over a scenic desert landscape with unique rock formations.\" border=\"0\" id=\"imgCaption\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhOqNLAbgOF2pACWNiCBolbXMJwAzKTNA2Y2R1JmjQotZXF8iWqdcM5sLveHcQ92q1a6ftleecaLVWG2olK9ik_I2QD26UcI2q9fjUyybC1C0TAI3h8QIo3zSgqARSL_Mj4wTLSS3V53AZ11CThQBM28DFqZVUOTekGM60Bymk0sdhUoukNTaxJwjLWD2M\/s1600\/Imagen-3-generated-hot-air-balloon-over-desert-landscape.png\" width=\"100%\"\/><\/div>\n<p><imgcaption><center><em>Image generated by Imagen 3 with prompt: \u201cShot in the style of DSLR camera with the polarizing filter. A photo of two hot air balloons over the unique rock formations in Cappadocia, Turkey. The colors and patterns on these balloons contrast beautifully against the earthy tones of the landscape below. This shot captures the sense of adventure that comes with enjoying such an experience.\u201d<\/em><\/center><\/imgcaption><\/image><\/p>\n<p><image><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" alt=\"A wooden robot stands in a field of yellow flowers, holding a small blue bird on its outstretched hand.\" border=\"0\" id=\"imgCaption\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEi5aQdQNsZYWjtFIbiKmmocaV0jJVqNztJTUkpsQLc_QiB81roKlI5E0cwtLTBBorzbKVNb6x1VRaUeR2Vpf7FDDxVblUJtlLPW8sXxYGVQWAFJHDz7FFGBLph4kRg4U4ypBT9iiCPUsG2KYK8ptFpLGmkXQ0o2ZwL9wFgiMD2FJMDNn5MYOem6ZAAYvLk\/s1600\/Imagen-3-generated-wooden-robot-field-yellow-flowers.png\" width=\"100%\"\/><\/div>\n<p><imgcaption><center><em>Image generated by Imagen 3 with prompt: A weathered, wooden mech robot covered in flowering vines stands peacefully in a field of tall wildflowers, with a small blue bird resting on its outstretched hand. Digital cartoon, with warm colors and soft lines. A large cliff with a waterfall looms behind.<\/em><\/center><\/imgcaption><\/image><\/p>\n<p>Imagen 3 unlocks exciting new possibilities for Android developers. Generated visuals can adapt to the content of your app, creating a more engaging user experience. For instance, your users can generate custom artwork to enhance their in-app profile. Imagen can also improve your app&#8217;s storytelling by bringing its narratives to life with delightful personalized illustrations.<\/p>\n<p>You can experiment with image prompts in <a href=\"https:\/\/cloud.google.com\/vertex-ai\/generative-ai\/docs\/start\/quickstarts\/quickstart\" target=\"_blank\" rel=\"noopener\">Vertex AI Studio<\/a>, and learn how to improve your prompts by reviewing the <a href=\"https:\/\/cloud.google.com\/vertex-ai\/generative-ai\/docs\/image\/img-gen-prompt-guide\" target=\"_blank\" rel=\"noopener\">prompt and image attribute guide<\/a>.<\/p>\n<h2><span style=\"font-size: x-large;\">Get started with Imagen 3<\/span><\/h2>\n<p>The integration of Imagen 3 is similar to adding <a href=\"https:\/\/firebase.google.com\/docs\/vertex-ai\/get-started?platform=android\" target=\"_blank\" rel=\"noopener\">Gemini access via Vertex AI in Firebase<\/a>. Start by adding the gradle dependencies to your Android project:<\/p>\n<div style=\"background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;\">\n<pre style=\"line-height: 125%; margin: 0px;\">dependencies {\n    implementation(platform(<span style=\"color: #ba2121;\">\"com.google.firebase:firebase-bom:33.10.0\"<\/span>))\n\n    implementation(<span style=\"color: #ba2121;\">\"com.google.firebase:firebase-vertexai\"<\/span>)\n}\n<\/pre>\n<\/div>\n<p>Then, in your Kotlin code, create an <span style=\"color: #0d904f; font-family: courier;\">ImageModel<\/span> instance by passing the model name and optionally, a <a href=\"https:\/\/firebase.google.com\/docs\/vertex-ai\/model-parameters?platform=android#imagen\" target=\"_blank\" rel=\"noopener\">model configuration<\/a> and <a href=\"https:\/\/firebase.google.com\/docs\/vertex-ai\/safety-settings?platform=android#imagen\" target=\"_blank\" rel=\"noopener\">safety settings<\/a>:<\/p>\n<div style=\"background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;\">\n<pre style=\"line-height: 125%; margin: 0px;\"><span style=\"color: green; font-weight: bold;\">val<\/span> imageModel = Firebase.vertexAI.imagenModel(\n  modelName = <span style=\"color: #ba2121;\">\"imagen-3.0-generate-001\"<\/span>,\n  generationConfig = ImagenGenerationConfig(\n    imageFormat = ImagenImageFormat.jpeg(compresssionQuality = <span style=\"color: #666666;\">75<\/span>),\n    addWatermark = <span style=\"color: green; font-weight: bold;\">true<\/span>,\n    numberOfImages = <span style=\"color: #666666;\">1<\/span>,\n    aspectRatio = ImagenAspectRatio.SQUARE_1x1\n  ),\n  safetySettings = ImagenSafetySettings(\n    safetyFilterLevel = ImagenSafetyFilterLevel.BLOCK_LOW_AND_ABOVE\n    personFilterLevel = ImagenPersonFilterLevel.ALLOW_ADULT\n  )\n)\n<\/pre>\n<\/div>\n<p>Finally generate the image by calling <span style=\"color: #0d904f; font-family: courier;\">generateImages<\/span>:<\/p>\n<div style=\"background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;\">\n<pre style=\"line-height: 125%; margin: 0px;\"><span style=\"color: green; font-weight: bold;\">val<\/span> imageResponse = imageModel.generateImages(\n  prompt = <span style=\"color: #ba2121;\">\"An astronaut riding a horse\"<\/span>\n)\n<\/pre>\n<\/div>\n<p>Retrieve the generated image from the <span style=\"color: #0d904f; font-family: courier;\">imageResponse<\/span> and display it as a bitmap as follow:<\/p>\n<div style=\"background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;\">\n<pre style=\"line-height: 125%; margin: 0px;\"><span style=\"color: green; font-weight: bold;\">val<\/span> image = imageResponse.images.first()\n<span style=\"color: green; font-weight: bold;\">val<\/span> uiImage = image.asBitmap()\n<\/pre>\n<\/div>\n<h2><span style=\"font-size: x-large;\">Next steps<\/span><\/h2>\n<p>Explore the comprehensive <a href=\"https:\/\/firebase.google.com\/docs\/vertex-ai\/generate-images-imagen?platform=android\" target=\"_blank\" rel=\"noopener\">Firebase documentation<\/a> for detailed API information.<\/p>\n<p>Access to Imagen 3 using Vertex AI in Firebase is currently in <i>Public Preview<\/i>, giving you an early opportunity to experiment and innovate. For pricing details, please refer to the <a href=\"https:\/\/firebase.google.com\/docs\/vertex-ai\/pricing\" target=\"_blank\" rel=\"noopener\">Vertex AI in Firebase pricing page<\/a>.<\/p>\n<p>Start experimenting with Imagen 3 today! We&#8217;re looking forward to seeing how you\u2019ll leverage Imagen 3&#8217;s capabilities to create truly unique, immersive and personalized Android experiences.<\/p>\n<\/div>\n<p>[ad_2]<br \/>\n<br \/><a href=\"http:\/\/android-developers.googleblog.com\/2025\/03\/imagen3-via-vertex-ai-in-firebase.html\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Posted by Thomas Ezan Sr. \u2013 Android Developer Relation Engineer (@lethargicpanda) Imagen 3, our most advanced image generation model, is now available through Vertex<\/p>\n","protected":false},"author":1,"featured_media":272025,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[146],"tags":[],"_links":{"self":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/272024"}],"collection":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/comments?post=272024"}],"version-history":[{"count":0,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/272024\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media\/272025"}],"wp:attachment":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media?parent=272024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/categories?post=272024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/tags?post=272024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}