tag:blogger.com,1999:blog-67557096430449471792024-09-19T16:16:23.723-07:00Android Developers BlogAn Open Handset Alliance Project.Birnahttp://www.blogger.com/profile/04044883525253664551noreply@blogger.comBlogger1707125tag:blogger.com,1999:blog-6755709643044947179.post-30398343941072443942024-09-18T09:00:00.000-07:002024-09-18T09:00:04.510-07:00Tools, not Rules: become a better Android developer with Compiler Explorer<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6eHy3tppfLFscmsn8p8iHMTYhH__yu1IKO_kr4ce-QNWvtOlfhcY7a8f1NfiuTbHd3ibqfdQ7jhcTY9gHsRHyJp2XibKEGbDOquTUeUg_zJr41AsDZWhUc9WbEXW2Fk2gdH7Yu9dbGHZ9fjTtI2Ffx7E2-p-YrsOn-NjMuma2gOF166Qa8LH8N_VWDZI/s1600/0008-AFD-%20Tools%20Banner%20Asset%20_%20Banner%20Design%20_%20Metadata%20Card_meta%20card.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6eHy3tppfLFscmsn8p8iHMTYhH__yu1IKO_kr4ce-QNWvtOlfhcY7a8f1NfiuTbHd3ibqfdQ7jhcTY9gHsRHyJp2XibKEGbDOquTUeUg_zJr41AsDZWhUc9WbEXW2Fk2gdH7Yu9dbGHZ9fjTtI2Ffx7E2-p-YrsOn-NjMuma2gOF166Qa8LH8N_VWDZI/s1600/0008-AFD-%20Tools%20Banner%20Asset%20_%20Banner%20Design%20_%20Metadata%20Card_meta%20card.png" style="display: none;" /> <em>Posted by Shai Barack – Android Platform Performance lead</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9roV-Qta9lnME3ailZgsr8eVC_lq-BX8RTPQcfW51Y-vMcbvEBFf44_qgVngBX2LLnzr0Fu2Z3hWJJc1ovgsmdFF905VGCst3uopJmHHDw5esD29UMkhLgYn2yl2yE86Hoq-nR3PUxyWHu30kMTBjjfaGIDJet0wIQrB7NPF-H-kZChULzoZhd6Wavos/s1600/0008-AFD-%20Tools%20Banner%20Asset%20_%20Banner%20Design%20_banner.png"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9roV-Qta9lnME3ailZgsr8eVC_lq-BX8RTPQcfW51Y-vMcbvEBFf44_qgVngBX2LLnzr0Fu2Z3hWJJc1ovgsmdFF905VGCst3uopJmHHDw5esD29UMkhLgYn2yl2yE86Hoq-nR3PUxyWHu30kMTBjjfaGIDJet0wIQrB7NPF-H-kZChULzoZhd6Wavos/s1600/0008-AFD-%20Tools%20Banner%20Asset%20_%20Banner%20Design%20_banner.png" /></a> <h2 style="text-align: left;"><span style="font-size: x-large;">Introducing Android support in Compiler Explorer</span></h2> <p>In a <a href="https://android-developers.googleblog.com/2023/11/the-secret-to-androids-improved-memory-latest-android-runtime-update.html" target="_self">previous blog post</a> you learned how Android engineers continuously improve the Android Runtime (ART) in ways that boost app performance on user devices. These changes to the compiler make system and app code faster or smaller. Developers don’t need to change their code and rebuild their apps to benefit from new optimizations, and users get a better experience. In this blog post I’ll take you inside the compiler with a tool called <a href="http://godbolt.org" target="_self">Compiler Explorer</a> and witness some of these optimizations in action.</p> <p>Compiler Explorer is an interactive website for studying how compilers work. It is an <a href="https://github.com/compiler-explorer/compiler-explorer" target="_self">open source project</a> that anyone can contribute to. This year, our engineers added support to Compiler Explorer for the Java and Kotlin programming languages on Android.</p> <p>You can use Compiler Explorer to understand how your source code is translated to assembly language, and how high-level programming language constructs in a language like Kotlin become low-level instructions that run on the processor.</p> <p>At Google our engineers use this tool to study different coding patterns for efficiency, to see how existing compiler optimizations work, to share new optimization opportunities, and to teach and learn. Learning is best when it’s done through <b><i>tools, not rules</i></b>. Instead of teaching developers to memorize different rules for how to write efficient code or what the compiler might or might not optimize, give the engineers the tools to find out for themselves what happens when they write their code in different ways, and let them experiment and learn. Let’s learn together!</p> <p>Start by going to <a href="http://godbolt.org" target="_self">godbolt.org</a>. By default we see C++ sample code, so click the dropdown that says C++ and select Android Java. You should see this <a href="https://godbolt.org/z/89f9vWE1q" target="_self">sample code</a>:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;">class</span> <span style="color: blue; font-weight: bold;">Square</span> { static <span style="color: #b00040;">int</span> <span style="color: blue;">square</span>(<span style="color: #b00040;">int</span> num) { <span style="color: green; font-weight: bold;">return</span> num * num; } } </pre></div> <image><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3GmyStlRmroF757mY7gsll-sU4fsvaQu9VBhh0AN8lEbyFlyMJN3SCG7sgHLBLZjUo9r3izPs88uCA7suwl5kmiWiuSfTCc_Mu1PSHVUqtRcfPcgHywu72swwxW1d8FnYkJg61hl-V4aMDf1JlfL4KhUgj_hg3GEA3JXfAuqHoNjc6t2bEnkXhk8wPFo/s1600/godbolt.org_z_jGvGEPsMb%20%281%29.png" target="_self"><img alt="screenshot of sample code in Compiler Explorer" border="0" height="174" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3GmyStlRmroF757mY7gsll-sU4fsvaQu9VBhh0AN8lEbyFlyMJN3SCG7sgHLBLZjUo9r3izPs88uCA7suwl5kmiWiuSfTCc_Mu1PSHVUqtRcfPcgHywu72swwxW1d8FnYkJg61hl-V4aMDf1JlfL4KhUgj_hg3GEA3JXfAuqHoNjc6t2bEnkXhk8wPFo/w640-h174/godbolt.org_z_jGvGEPsMb%20(1).png" style="margin-left: auto; margin-right: auto;" width="640" /></a></div><imgcaption><center><em>click to enlarge</em></center></imgcaption></image><br /> <p>On the left you’ll see a very simple program. You might say that this is a one line program. But this is not a meaningful statement in terms of performance - how many lines of code there are doesn’t tell us how long this program will take to run, or how much memory will be occupied by the code when the program is loaded.</p> <p>On the right you’ll see a disassembly of the compiler output. This is expressed in terms of assembly language for the target architecture, where every line is a CPU instruction. Looking at the instructions, we can say that the implementation of the <span style="color: #0d904f; font-family: Courier;">square(int num)</span> method consists of 2 instructions in the target architecture. The number and type of instructions give us a better idea for how fast the program is than the number of lines of source code. Since the target architecture is AArch64 aka ARM64, every instruction is 4 bytes, which means that our program’s code occupies 8 bytes in RAM when the program is compiled and loaded.</p> <p>Let’s take a brief detour and introduce some Android toolchain concepts.</p><br /> <h3>The Android build toolchain (in brief)</h3> <image><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQZjdZFK_hfeeuFZeUedM-9aqMBG-WFDlget780ho9FvJ96N5MOKCsAjGCYPZ7NWkIx7KdpZ3yqghwGtpNX96DGbLaMyDrkng9UE0hFyxxEsrd4VDRFcGm15TvaGyiuAF0B8FotPxvpKR0Ulyu-9xiZTvH9g2zSxYR1I8hztFA21Fj9-mJbUDgFg8INEM/s1600/Diagram%20for%20Compiler%20Explorer%20blog%20post%20showing%20toolchain.png" target="_self"><img alt="a flow diagram of the Android build toolchain" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQZjdZFK_hfeeuFZeUedM-9aqMBG-WFDlget780ho9FvJ96N5MOKCsAjGCYPZ7NWkIx7KdpZ3yqghwGtpNX96DGbLaMyDrkng9UE0hFyxxEsrd4VDRFcGm15TvaGyiuAF0B8FotPxvpKR0Ulyu-9xiZTvH9g2zSxYR1I8hztFA21Fj9-mJbUDgFg8INEM/s1600/Diagram%20for%20Compiler%20Explorer%20blog%20post%20showing%20toolchain.png" style="margin-left: auto; margin-right: auto;" width="100%" /></a></div></image><br /> <p>When you write your Android app, you’re typically writing source code in the Java or Kotlin programming languages. When you build your app in Android Studio, it’s initially compiled by a language-specific compiler into language-agnostic JVM bytecode in a <span style="color: #0d904f; font-family: Courier;">.jar</span>. Then the Android build tools transform the <span style="color: #0d904f; font-family: Courier;">.jar</span> into <a href="https://source.android.com/docs/core/runtime/dalvik-bytecode" target="_self">Dalvik bytecode</a> in <span style="color: #0d904f; font-family: Courier;">.dex</span> files, which is what the <a href="https://source.android.com/docs/core/runtime" target="_self">Android Runtime</a> executes on Android devices. Typically developers use <span style="color: #0d904f; font-family: Courier;">d8</span> in their Debug builds, and <span style="color: #0d904f; font-family: Courier;">r8</span> for <a href="https://developer.android.com/build/shrink-code" target="_self">optimized <i>Release builds</i></a>. The <span style="color: #0d904f; font-family: Courier;">.dex</span> files go in the <span style="color: #0d904f; font-family: Courier;">.apk</span> that you push to test devices or upload to an app store. Once the <span style="color: #0d904f; font-family: Courier;">.apk</span> is installed on the user’s device, an on-device compiler which knows the specific target device architecture can convert the bytecode to instructions for the device’s CPU.</p> <p>We can use Compiler Explorer to learn how all these tools come together, and to experiment with different inputs and see how they affect the outputs.</p> <p>Going back to our default view for Android Java, on the left is Java source code and on the right is the disassembly for the on-device compiler <span style="color: #0d904f; font-family: Courier;">dex2oat</span>, the very last step in our toolchain diagram. The target architecture is ARM64 as this is the most common CPU architecture in use today by Android devices.</p> <p>The <a href="https://developer.arm.com/documentation/102374/latest/" target="_self">ARM64 Instruction Set Architecture</a> offers many instructions and extensions, but as you read disassemblies you will find that you only need to memorize a few key instructions. You can look for ARM64 Quick Reference cards online to help you read disassemblies.</p> <p>At Google we study the output of <span style="color: #0d904f; font-family: Courier;">dex2oat</span> in Compiler Explorer for different reasons, such as:</p> <ul><ul> <li>Gaining intuition for what optimizations the compiler performs in order to think about how to write more efficient code.</li></ul><ul> <li>Estimating how much memory will be required when a program with this snippet of code is loaded into memory.</li></ul><ul> <li>Identifying optimization opportunities in the compiler - ways to generate instructions for the same code that are more efficient, resulting in faster execution or in lower memory usage without requiring app developers to change and rebuild their code.</li></ul><ul> <li>Troubleshooting compiler bugs! 🐞</li> </ul></ul><br /> <h3>Compiler optimizations demystified</h3> <p>Let’s look at a real example of compiler optimizations in practice. In the <a href="https://android-developers.googleblog.com/2023/11/the-secret-to-androids-improved-memory-latest-android-runtime-update.html" target="_self">previous blog post</a> you can read about compiler optimizations that the ART team recently added, such as <i>coalescing returns</i>. Now you can see the optimization, with Compiler Explorer!</p> <p>Let’s load <a href="https://godbolt.org/z/695carsYh" target="_self">this example</a>:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;">class</span> <span style="color: blue; font-weight: bold;">CoalescingReturnsDemo</span> { String <span style="color: blue;">intToString</span>(<span style="color: #b00040;">int</span> num) { switch (num) { case <span style="color: #666666;">1</span>: <span style="color: green; font-weight: bold;">return</span> <span style="color: #ba2121;">"1"</span>; case <span style="color: #666666;">2</span>: <span style="color: green; font-weight: bold;">return</span> <span style="color: #ba2121;">"2"</span>; case <span style="color: #666666;">3</span>: <span style="color: green; font-weight: bold;">return</span> <span style="color: #ba2121;">"3"</span>; <span style="color: green; font-weight: bold;">default</span>: <span style="color: green; font-weight: bold;">return</span> <span style="color: #ba2121;">"other"</span>; } } } </pre></div> <image><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFT1jPAw-ufoFyz5DRSp2jAeUJos6gsC1GJI_-tVmFjY5Ct8hvYD3o9FnUC7ODyeTTkzb7b7N1HSiHgYiLoc8pBaI4D6bIfqZBsa7bV_LKbuFmj21Oi4-Ci-za4szrhTcl5p8reVcW52ZVMdi_n02bL8VtMIhrfYloWSiJ0vjGvw9b5JsNTfh1pk2Y4G0/s2256/godbolt.org_z_zjvYvTsT3.png" target="_self"><img alt="screenshot of sample code in Compiler Explorer" border="0" height="174" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFT1jPAw-ufoFyz5DRSp2jAeUJos6gsC1GJI_-tVmFjY5Ct8hvYD3o9FnUC7ODyeTTkzb7b7N1HSiHgYiLoc8pBaI4D6bIfqZBsa7bV_LKbuFmj21Oi4-Ci-za4szrhTcl5p8reVcW52ZVMdi_n02bL8VtMIhrfYloWSiJ0vjGvw9b5JsNTfh1pk2Y4G0/s2256/godbolt.org_z_zjvYvTsT3.png" style="margin-left: auto; margin-right: auto;" width="640" /></a></div><imgcaption><center><em>click to enlarge</em></center></imgcaption></image><br /> <p>How would a compiler implement this code in CPU instructions? Every case would be a branch target, with a case body that has some unique instructions (such as referencing the specific string) and some common instructions (such as assigning the string reference to a register and returning to the caller). <i>Coalescing returns</i> means that some instructions at the tail of each case body can be shared across all cases. The benefits grow for larger switches, proportional to the number of the cases.</p> <p>You can see the optimization in action! Simply create two compiler windows, one for <span style="color: #0d904f; font-family: Courier;">dex2oat</span> from the October 2022 release (the last release before the optimization was added), and another for <span style="color: #0d904f; font-family: Courier;">dex2oat</span> from the November 2023 release (the first release after the optimization was added). You should see that before the optimization, the size of the method body for <span style="color: #0d904f; font-family: Courier;">intToString</span> was 124 bytes. After the optimization, it’s down to just 76 bytes.</p> <p>This is of course a contrived example for simplicity’s sake. But this pattern is very common in Android code. For instance consider an implementation of <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/os/Handler#handleMessage%28android.os.Message%29" target="_self">Handler.handleMessage(Message)</a></span>, where you might implement a switch statement over the value of <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/os/Message#what" target="_self">Message#what</a></span>.</p> <p>How does the compiler implement optimizations such as this? Compiler Explorer lets us look inside the compiler’s pipeline of optimization passes. In a compiler window, click <i>Add New &gt; Opt Pipeline</i>. A new window will open, showing the High-level Internal Representation (HIR) that the compiler uses for the program, and how it’s transformed at every step.</p> <image><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBupj21MdD-TzUlhfrb7502StciqEwWWcqY2cF1MqJ5D1SGlJeNpP7ZiBdNb_J8fM5oqNiFo2RBnOnCv4qM7gj2JjZx9_q0Rk9iI97TPVAd3Y50UJqstFoUJ71h3Ai1xg7HOWxYF4mai08zMG9FU2m7RXxZHpEQWK7hm-cTESp8p2hGb6V8z2jll9cqZk/s1600/godbolt.org_z_bf96jsj9f.png" target="_self"><img alt="screenshot of the high-level internal representation (HIR) the compiler uses for the program in Compiler Explorer" border="0" height="174" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBupj21MdD-TzUlhfrb7502StciqEwWWcqY2cF1MqJ5D1SGlJeNpP7ZiBdNb_J8fM5oqNiFo2RBnOnCv4qM7gj2JjZx9_q0Rk9iI97TPVAd3Y50UJqstFoUJ71h3Ai1xg7HOWxYF4mai08zMG9FU2m7RXxZHpEQWK7hm-cTESp8p2hGb6V8z2jll9cqZk/s1600/godbolt.org_z_bf96jsj9f.png" style="margin-left: auto; margin-right: auto;" width="640" /></a></div><imgcaption><center><em>click to enlarge</em></center></imgcaption></image><br /> <p>If you look at the <span style="color: #0d904f; font-family: Courier;">code_sinking</span> pass you will see that the November 2023 compiler replaces <span style="color: #0d904f; font-family: Courier;">Return</span> HIR instructions with <span style="color: #0d904f; font-family: Courier;">Goto</span> instructions.</p> <p>Most of the passes are hidden when <i>Filters &gt; Hide Inconsequential Passes</i> is checked. You can uncheck this option and see all optimization passes, including ones that did not change the HIR (i.e. have no “diff” over the HIR).</p> <p>Let’s study another simple optimization, and look inside the optimization pipeline to see it in action. Consider this code:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;">class</span> <span style="color: blue; font-weight: bold;">ConstantFoldingDemo</span> { static <span style="color: #b00040;">int</span> <span style="color: blue;">demo</span>(<span style="color: #b00040;">int</span> num) { <span style="color: #b00040;">int</span> result = num; <span style="color: green; font-weight: bold;">if</span> (num == <span style="color: #666666;">2</span>) { result = num + <span style="color: #666666;">2</span>; } <span style="color: green; font-weight: bold;">return</span> result; } } </pre></div> <p>The above is functionally equivalent to the below:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;">class</span> <span style="color: blue; font-weight: bold;">ConstantFoldingDemo</span> { static <span style="color: #b00040;">int</span> <span style="color: blue;">demo</span>(<span style="color: #b00040;">int</span> num) { <span style="color: #b00040;">int</span> result = num; <span style="color: green; font-weight: bold;">if</span> (num == <span style="color: #666666;">2</span>) { result = <span style="color: #666666;">4</span>; } <span style="color: green; font-weight: bold;">return</span> result; } } </pre></div> <p>Can the compiler make this optimization for us? Let’s <a href="https://godbolt.org/z/zjx1r4Pvh" target="_self">load it in Compiler Explorer</a> and turn to the Opt Pipeline Viewer for answers.</p> <image><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl-IBHURMBmsLyRTi8bqG2UHpl9SSzgEjLpE5l42Dzdfc1ejl77_k1jxVuXKO2dnuYZX9YhbNCONwsUWN13AqexHMb1MukXzSVSXc0Jda41ZOo9x5byc1rRklf4Qj7p3AcxXZFgqcX9u0Nc09mpQzITxv06ZDLda9eQkoLKxta_1duiRfg-S1mu1NZgkk/s1600/godbolt.org_z_zjx1r4Pvh.png" target="_self"><img alt="screenshot of Opt Pipeline Viewer in Compiler Explorer" border="0" height="174" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl-IBHURMBmsLyRTi8bqG2UHpl9SSzgEjLpE5l42Dzdfc1ejl77_k1jxVuXKO2dnuYZX9YhbNCONwsUWN13AqexHMb1MukXzSVSXc0Jda41ZOo9x5byc1rRklf4Qj7p3AcxXZFgqcX9u0Nc09mpQzITxv06ZDLda9eQkoLKxta_1duiRfg-S1mu1NZgkk/s1600/godbolt.org_z_zjx1r4Pvh.png" style="margin-left: auto; margin-right: auto;" width="640" /></a></div><imgcaption><center><em>click to enlarge</em></center></imgcaption></image><br /> <p>The disassembly shows us that the compiler never bothers with “two plus two”, it knows that if <span style="color: #0d904f; font-family: Courier;">num</span> is 2 then <span style="color: #0d904f; font-family: Courier;">result</span> needs to be 4. This optimization is called <a href="https://en.wikipedia.org/wiki/Constant_folding" target="_self">constant folding</a>. Inside the conditional block where we know that <span style="color: #0d904f; font-family: Courier;">num == 2</span> we <i>propagate</i> the constant <span style="color: #0d904f; font-family: Courier;">2</span> into the symbolic name <span style="color: #0d904f; font-family: Courier;">num</span>, then <i>fold</i> <span style="color: #0d904f; font-family: Courier;">num + 2</span> into the constant <span style="color: #0d904f; font-family: Courier;">4</span>.</p> <p>You can see this optimization happening over the compiler’s IR by selecting the <span style="color: #0d904f; font-family: Courier;">constant_folding</span> pass in the Opt Pipeline Viewer.</p> <h3>Kotlin and Java, side by side</h3> <p>Now that we’ve seen the instructions for Java code, try changing the language to Android Kotlin. You should see this sample code, the Kotlin equivalent of the basic Java sample we’ve seen before:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;">fun</span> <span style="color: blue;">square</span>(num: Int): Int = num * num </pre></div> <image><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZwhhCzxk-8E8Ht7cqNEM8Tt1AZnhwIEXJU8guUuIZi3hipe_8XYUebA28vEFdjRl-JAdr3CkIi-lC5U2DgwLjyn6EzBXAwn051NKUXk3H8DqTjNgCmKKwNcRevmIc2jtflWERGYxgxHJ3UsksU_NEMmHhhYulzOF9bZo6MxqLb98hurOAbvLBwfse0FI/s1600/godbolt.org_z_GqfEYhEjK.png" target="_self"><img alt="screenshot of sample code in Kotlin in Compiler Explorer" border="0" height="174" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZwhhCzxk-8E8Ht7cqNEM8Tt1AZnhwIEXJU8guUuIZi3hipe_8XYUebA28vEFdjRl-JAdr3CkIi-lC5U2DgwLjyn6EzBXAwn051NKUXk3H8DqTjNgCmKKwNcRevmIc2jtflWERGYxgxHJ3UsksU_NEMmHhhYulzOF9bZo6MxqLb98hurOAbvLBwfse0FI/s1600/godbolt.org_z_GqfEYhEjK.png" style="margin-left: auto; margin-right: auto;" width="640" /></a></div><imgcaption><center><em>click to enlarge</em></center></imgcaption></image><br /> <p>You will notice that the source code is different but the sample program is functionally identical, and so is the output from <span style="color: #0d904f; font-family: Courier;">dex2oat</span>. Finding the square of a number results in the same instructions, whether you write your source code in Java or in Kotlin.</p> <p>You can take this opportunity to study interesting language features and discover how they work. For instance, let’s compare Java String concatenation with Kotlin String interpolation.</p> <p>In Java, you might write your code as follows:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;">class</span> <span style="color: blue; font-weight: bold;">StringConcatenationDemo</span> <span style="color: #666666;">{</span> <span style="color: #b00040;">void</span> <span style="color: blue;">stringConcatenationDemo</span><span style="color: #666666;">(</span>String myVal<span style="color: #666666;">)</span> <span style="color: #666666;">{</span> System<span style="color: #666666;">.</span><span style="color: #7d9029;">out</span><span style="color: #666666;">.</span><span style="color: #7d9029;">println</span><span style="color: #666666;">(</span><span style="color: #ba2121;">"The value of myVal is "</span> <span style="color: #666666;">+</span> myVal<span style="color: #666666;">);</span> <span style="color: #666666;">}</span> <span style="color: #666666;">}</span> </pre></div> <p>Let’s find out how Java String concatenation actually works by <a href="https://godbolt.org/z/7vqcea8fd" target="_self">trying this example in Compiler Explorer</a>.</p> <image><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAWpK-SGyrc2k3n-vJdoESPcFyCv8_S8_wBQX9NZDFsJNHEYtcvJjFjbtBcmCNWoOeLnA7gC74EmVfTFU8zrvPO2uofmSW2r5EgKjHsFEBus4tSdwBS8JX6bOfhm1t0jY2CNG5t1rz4ikkOLdadkrkXY89FSttx-dKLqzxGURf4UWId5v5feGbKaMBcN8/s1600/godbolt.org_z_7vqcea8fd.png" target="_self"><img alt="screenshot of sample code in Kotlin in Compiler Explorer" border="0" height="174" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAWpK-SGyrc2k3n-vJdoESPcFyCv8_S8_wBQX9NZDFsJNHEYtcvJjFjbtBcmCNWoOeLnA7gC74EmVfTFU8zrvPO2uofmSW2r5EgKjHsFEBus4tSdwBS8JX6bOfhm1t0jY2CNG5t1rz4ikkOLdadkrkXY89FSttx-dKLqzxGURf4UWId5v5feGbKaMBcN8/s1600/godbolt.org_z_7vqcea8fd.png" style="margin-left: auto; margin-right: auto;" width="640" /></a></div><imgcaption><center><em>click to enlarge</em></center></imgcaption></image><br /> <p>First you will notice that we changed the output compiler from <span style="color: #0d904f; font-family: Courier;">dex2oat</span> to <span style="color: #0d904f; font-family: Courier;">d8</span>. Reading Dalvik bytecode, which is the output from <span style="color: #0d904f; font-family: Courier;">d8</span>, is usually easier than reading the ARM64 instructions that <span style="color: #0d904f; font-family: Courier;">dex2oat</span> outputs. This is because Dalvik bytecode uses higher level concepts. Indeed you can see the names of types and methods from the source code on the left side reflected in the bytecode on the right side. Try changing the compiler to <span style="color: #0d904f; font-family: Courier;">dex2oat</span> and back to see the difference.</p> <p>As you read the <span style="color: #0d904f; font-family: Courier;">d8</span> output you may realize that Java String concatenation is actually implemented by rewriting your source code to use a <span style="color: #0d904f; font-family: Courier;">StringBuilder</span>. The source code above is rewritten internally by the Java compiler as follows:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;">class</span> <span style="color: blue; font-weight: bold;">StringConcatenationDemo</span> <span style="color: #666666;">{</span> <span style="color: #b00040;">void</span> <span style="color: blue;">stringConcatenationDemo</span><span style="color: #666666;">(</span>String myVal<span style="color: #666666;">)</span> <span style="color: #666666;">{</span> StringBuilder sb <span style="color: #666666;">=</span> <span style="color: green; font-weight: bold;">new</span> StringBuilder<span style="color: #666666;">();</span> sb<span style="color: #666666;">.</span><span style="color: #7d9029;">append</span><span style="color: #666666;">(</span><span style="color: #ba2121;">"The value of myVal is "</span><span style="color: #666666;">);</span> sb<span style="color: #666666;">.</span><span style="color: #7d9029;">append</span><span style="color: #666666;">(</span>myVal<span style="color: #666666;">);</span> System<span style="color: #666666;">.</span><span style="color: #7d9029;">out</span><span style="color: #666666;">.</span><span style="color: #7d9029;">println</span><span style="color: #666666;">(</span>sb<span style="color: #666666;">.</span><span style="color: #7d9029;">toString</span><span style="color: #666666;">());</span> <span style="color: #666666;">}</span> <span style="color: #666666;">}</span> </pre></div> <p>In Kotlin, we can use String interpolation:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;">fun <span style="color: blue;">stringInterpolationDemo</span><span style="color: #666666;">(</span><span style="color: #a0a000;">myVal:</span> String<span style="color: #666666;">)</span> <span style="color: #666666;">{</span> System<span style="color: #666666;">.</span><span style="color: #7d9029;">out</span><span style="color: #666666;">.</span><span style="color: #7d9029;">println</span><span style="color: #666666;">(</span><span style="color: #ba2121;">"The value of myVal is $myVal"</span><span style="color: #666666;">);</span> <span style="color: #666666;">}</span> </pre></div> <p>The Kotlin syntax is easier to read and write, but does this convenience come at a cost? If you try this example in Compiler Explorer, you may find that the Dalvik bytecode output is roughly the same! In this case we see that Kotlin offers an improved syntax, while the compiler emits similar bytecode. </p><p>At Google we study examples of language features in Compiler Explorer to learn about how high-level language features are implemented in lower-level terms, and to better inform ourselves on the different tradeoffs that we might make in choosing whether and how to adopt these language features. Recall our learning principle: tools, not rules. Rather than memorizing rules for how you should write your code, use the tools that will help you understand the upsides and downsides of different alternatives, and then make an informed decision. </p><h3>What happens when you minify your app?</h3> <p>Speaking of making informed decisions as an app developer, you should be minifying your apps with R8 when building your Release APK. Minifying generally does three things to optimize your app to make it smaller and faster:</p> <ul><ul> <p>1. <b>Dead code elimination:</b> find all the live code (code that is reachable from well-known program entry points), which tells us that the remaining code is not used, and therefore can be removed.</p></ul><ul> <p>2. <b>Bytecode optimization:</b> various specialized optimizations that rewrite your app’s bytecode to make it functionally identical but faster and/or smaller.</p></ul><ul> <p>3. <b>Obfuscation:</b> renaming all types, methods, and fields in your program that are not accessed by reflection (and therefore can be safely renamed) from their names in source code (<span style="color: #0d904f; font-family: Courier;">com.example.MyVeryLongFooFactorySingleton</span>) to shorter names that fit in less memory (<span style="color: #0d904f; font-family: Courier;">a.b.c</span>).</p></ul></ul> <p>Let’s see an example of all three benefits! Start by <a href="https://godbolt.org/z/hP4n7dq8n" target="_self">loading this view in Compiler Explorer</a>. <image></image></p><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-lVfEDqLGMJ9vhPcqTA7Aj-YcizLtEYGJtBsPerSfWQIoy1nWDnGg4o0KhdkZpNCp_6-eDpLH9LW4YIjetHseA2NJhwmcaj0BS7DlRyqJbrerCn8Oc01JG8LocV4JKsGtHC5lPTvbBj8qHeWpmz6tYIvJkdTKf_jLA06tjF2xGyZZWw43JgFWMmCxId0/s1600/godbolt.org_z_hP4n7dq8n.png" target="_self"><img alt="screenshot of sample code in Kotlin in Compiler Explorer" border="0" height="174" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-lVfEDqLGMJ9vhPcqTA7Aj-YcizLtEYGJtBsPerSfWQIoy1nWDnGg4o0KhdkZpNCp_6-eDpLH9LW4YIjetHseA2NJhwmcaj0BS7DlRyqJbrerCn8Oc01JG8LocV4JKsGtHC5lPTvbBj8qHeWpmz6tYIvJkdTKf_jLA06tjF2xGyZZWw43JgFWMmCxId0/s1600/godbolt.org_z_hP4n7dq8n.png" style="margin-left: auto; margin-right: auto;" width="640" /></a></div><imgcaption><center><em>click to enlarge</em></center></imgcaption><br /> <p>First you will notice that we are referencing types from the Android SDK. You can do this in Compiler Explorer by clicking Libraries and adding <i>Android API stubs</i>.</p> <p>Second, you will notice that this view has multiple source files open. The Kotlin source code is in <span style="color: #0d904f; font-family: Courier;">example.kt</span>, but there is another file called <span style="color: #0d904f; font-family: Courier;">proguard.cfg</span>.</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;">-keep <span style="color: green; font-weight: bold;">class</span> <span style="color: blue; font-weight: bold;">MinifyDemo</span> { <span style="color: green; font-weight: bold;">public</span> <span style="color: green; font-weight: bold;">void</span> <span style="color: blue;">goToSite</span>(...); } </pre></div> <p>Looking inside this file, you’ll see directives in the format of Proguard configuration flags, which is the legacy format for configuring what to keep when minifying your app. You can see that we are asking to keep a certain method of <span style="color: #0d904f; font-family: Courier;">MinifyDemo</span>. “Keeping” in this context means don’t shrink (we tell the minifier that this code is live). Let’s say we’re developing a library and we’d like to offer our customer a prebuilt <span style="color: #0d904f; font-family: Courier;">.jar</span> where they can call this method, so we’re keeping this as part of our API contract.</p> <p>We set up a view that will let us see the benefits of minifying. On one side you’ll see <span style="color: #0d904f; font-family: Courier;">d8</span>, showing the dex code without minification, and on the other side <span style="color: #0d904f; font-family: Courier;">r8</span>, showing the dex code with minification. By comparing the two outputs, we can see minification in action:</p> <ul><ul> <p>1. <b>Dead code elimination:</b> R8 removed all the logging code, since it never executes (as <span style="color: #0d904f; font-family: Courier;">DEBUG</span> is always false). We removed not just the calls to <span style="color: #0d904f; font-family: Courier;">android.util.Log</span>, but also the associated strings.</p></ul><ul> <p>2. <b>Bytecode optimization:</b> since the specialized methods <span style="color: #0d904f; font-family: Courier;">goToGodbolt</span>, <span style="color: #0d904f; font-family: Courier;">goToAndroidDevelopers</span>, and <span style="color: #0d904f; font-family: Courier;">goToGoogleIo</span> just call <span style="color: #0d904f; font-family: Courier;">goToUrl</span> with a hardcoded parameter, R8 inlined the calls to <span style="color: #0d904f; font-family: Courier;">goToUrl</span> into the call sites in <span style="color: #0d904f; font-family: Courier;">goToSite</span>. This inlining saves us the overhead of defining a method, invoking the method, and returning from the method.</p></ul><ul> <p>3. <b>Obfuscation:</b> we told R8 to keep the public method <span style="color: #0d904f; font-family: Courier;">goToSite</span>, and it did. R8 also decided to keep the method <span style="color: #0d904f; font-family: Courier;">goToUrl</span> as it’s used by <span style="color: #0d904f; font-family: Courier;">goToSite</span>, but you’ll notice that R8 renamed that method to <span style="color: #0d904f; font-family: Courier;">a</span>. This method’s name is an internal implementation detail, so obfuscating its name saved us a few precious bytes.</p> </ul></ul> <p>You can use R8 in Compiler Explorer to understand how minification affects your app, and to experiment with different ways to configure R8.</p> <p>At Google our engineers use R8 in Compiler Explorer to study how minification works on small samples. The authoritative tool for studying how a real app compiles is the <a href="https://developer.android.com/studio/debug/apk-analyzer#view_dex_files" target="_self">APK Analyzer in Android Studio</a>, as optimization is a whole-program problem and a snippet might not capture every nuance. But iterating on release builds of a real app is slow, so studying sample code in Compiler Explorer helps our engineers quickly learn and iterate.</p> <p>Google engineers build very large apps that are used by billions of people on different devices, so they care deeply about these kinds of optimizations, and strive to make the most use out of optimizing tools. But many of our apps are also very large, and so changing the configuration and rebuilding takes a very long time. Our engineers can now use Compiler Explorer to experiment with minification under different configurations and see results in seconds, not minutes.</p> <p>You may wonder what would happen if we changed our code to rename <span style="color: #0d904f; font-family: Courier;">goToSite</span>? Unfortunately our build would break, unless we also renamed the reference to that method in the Proguard flags. Fortunately, R8 now natively supports <a href="https://r8.googlesource.com/r8/+/refs/heads/main/doc/keepanno-guide.md" target="_self">Keep Annotations</a> as an alternative to Proguard flags. We can modify our program to use Keep Annotations:</p> <div style="background: #f8f8f8; overflow:auto;width:auto;border:0;"><pre style="margin: 0; line-height: 125%">@UsedByReflection(kind = KeepItemKind.CLASS_AND_METHODS) <span style="color: #008000; font-weight: bold">public</span> static <span style="color: #008000; font-weight: bold">void</span> <span style="color: #0000FF">goToSite</span>(Context context, String site) { ... } </pre></div> <p>Here is the <a href="https://godbolt.org/z/MPeqx7M4M" target="_self">complete example</a>. You’ll notice that we removed the <span style="color: #0d904f; font-family: Courier;">proguard.cfg</span> file, and under <i>Libraries</i> we added “R8 keep-annotations”, which is how we’re importing <span style="font-family: Courier;"><a href="https://storage.googleapis.com/r8-releases/raw/main/docs/keepanno/javadoc/com/android/tools/r8/keepanno/annotations/UsedByReflection.html" target="_self">@UsedByReflection</a></span>.</p> <p>At Google our engineers prefer annotations over flags. Here we’ve seen one benefit of annotations - keeping the information about the code in one place rather than two makes refactors easier. Another is that the annotations have a self-documenting aspect to them. For instance if this method was kept actually because it’s called from native code, we would annotate it as <span style="color: #0d904f; font-family: Courier;">@UsedByNative</span> instead.</p> <h3>Baseline profiles and you</h3> <p>Lastly, let’s touch on <a href="https://developer.android.com/topic/performance/baselineprofiles/overview" target="_self">baseline profiles</a>. So far you saw some demos where we looked at dex code, and others where we looked at ARM64 instructions. If you toggle between the different formats you will notice that the high-level dex bytecode is much more compact than low-level CPU instructions. There is an interesting tradeoff to explore here - whether, and when, to compile bytecode to CPU instructions?</p> <p>For any program method, the Android Runtime has three <a href="https://source.android.com/docs/core/runtime/configure#how_art_works" target="_self">compilation options</a>:</p> <ul><ul> <p>1. Compile the method Just in Time (<a href="https://source.android.com/docs/core/runtime/jit-compiler" target="_self">JIT</a>).</p></ul><ul> <p>2. Compile the method Ahead of Time (<a href="https://source.android.com/docs/core/runtime#AOT_compilation" target="_self">AOT</a>).</p></ul><ul> <p>3. Don’t compile the method at all, instead use a bytecode interpreter.</p> </ul></ul> <p>Running code in an interpreter is an order of magnitude slower, but doesn’t incur the cost of loading the representation of the method as CPU instructions which as we’ve seen is more verbose. This is best used for “cold” code - code that runs only once, and is not critical to user interactions.</p> <p>When ART detects that a method is “hot”, it will be JIT-compiled if it’s not already been AOT compiled. JIT compilation accelerates execution times, but pays the one-time cost of compilation during app runtime. This is where baseline profiles come in. Using baseline profiles, you as the app developer can give ART a hint as to which methods are going to be hot or otherwise worth compiling. ART will use that hint before runtime, compiling the code AOT (usually at install time, or when the device is idle) rather than at runtime. This is why <a href="https://android-developers.googleblog.com/2022/01/improving-app-performance-with-baseline.html" target="_self">apps that use Baseline Profiles see faster startup times</a>.</p> <p>With Compiler Explorer we can see Baseline Profiles in action.</p> <p>Let’s open <a href="https://godbolt.org/z/MGKfxh9hE" target="_self">this example</a>.</p> <image><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOn0hsv0Am0aTPdSKLvaDNkpoTC1dj0hSwY7D-Ld7RST_KyW7rjTScxqRwHsCq6oj-ARQHunsPLawKOS3hXdhCKVh7aSxBTfPLXg-ch49NurJCp7x9-SErozEWOlnvwaLBskR4yDO_jC_c8bctNrqveDLGaGYSRvpq6bPLTPmnoGL3zKY4i3Rb2oK4rZ0/s1600/godbolt.org_z_hP4n7dq8n.png" target="_self"><img alt="screenshot of sample code in Compiler Explorer" border="0" height="174" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOn0hsv0Am0aTPdSKLvaDNkpoTC1dj0hSwY7D-Ld7RST_KyW7rjTScxqRwHsCq6oj-ARQHunsPLawKOS3hXdhCKVh7aSxBTfPLXg-ch49NurJCp7x9-SErozEWOlnvwaLBskR4yDO_jC_c8bctNrqveDLGaGYSRvpq6bPLTPmnoGL3zKY4i3Rb2oK4rZ0/s1600/godbolt.org_z_hP4n7dq8n.png" style="margin-left: auto; margin-right: auto;" width="640" /></a></div><imgcaption><center><em>click to enlarge</em></center></imgcaption></image><br /> <p>The Java source code has two method definitions, <span style="color: #0d904f; font-family: Courier;">factorial</span> and <span style="color: #0d904f; font-family: Courier;">fibonacci</span>. This example is set up with a <a href="https://developer.android.com/topic/performance/baselineprofiles/manually-create-measure" target="_self">manual baseline profile</a>, listed in the file <span style="color: #0d904f; font-family: Courier;">profile.prof.txt</span>. You will notice that the profile only references the <span style="color: #0d904f; font-family: Courier;">factorial</span> method. Consequently, the <span style="color: #0d904f; font-family: Courier;">dex2oat</span> output will only show compiled code for <span style="color: #0d904f; font-family: Courier;">factorial</span>, while <span style="color: #0d904f; font-family: Courier;">fibonacci</span> shows in the output with no instructions and a size of 0 bytes.</p> <p>In the context of compilation modes, this means that <span style="color: #0d904f; font-family: Courier;">factorial</span> is compiled AOT, and <span style="color: #0d904f; font-family: Courier;">fibonacci</span> will be compiled JIT or interpreted. This is because we applied a different <a href="https://source.android.com/docs/core/runtime/configure#compiler_filters" target="_self">compiler filter</a> in the profile sample. This is reflected in the <span style="color: #0d904f; font-family: Courier;">dex2oat</span> output, which reads: “Compiler filter: speed-profile” (AOT compile only profile code), where previous examples read “Compiler filter: speed” (AOT compile everything).</p> <h2 style="text-align: left;"><span style="font-size: x-large;">Conclusion</span></h2> <p>Compiler Explorer is a great tool for understanding what happens after you write your source code but before it can run on a target device. The tool is easy to use, interactive, and shareable. Compiler Explorer is best used with sample code, but it goes through the same procedures as building a real app, so you can see the impact of all steps in the toolchain.</p> <p>By learning how to use tools like this to discover how the compiler works under the hood, rather than memorizing a bunch of rules of optimization best practices, you can make more informed decisions.</p> <p>Now that you've seen how to use the Java and Kotlin programming languages and the Android toolchain in Compiler Explorer, you can level up your Android development skills.</p> <p>Lastly, don't forget that Compiler Explorer is an open source project on <a href="https://github.com/compiler-explorer/compiler-explorer" target="_self">GitHub</a>. If there is a feature you'd like to see then it's just a Pull Request away.</p><br /> <p><em><small>Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.</small></em></p> <p></p><p></p><p></p>Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-20415975184423796642024-09-17T09:00:00.000-07:002024-09-17T09:01:01.179-07:00#WeArePlay | Nkenne: The app teaching African languages and culture<meta name="twitter:image" content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNrZUz7AsjqnFhJZ3BiBy2mDVmKO6hCv66KtgSq7vZtgt9ZZiljd7_JNFJEyuOg7tF1HfYqOqSnW6MQLRoYOaPalEg4vC4XVwstTgXz-hzYmzqeAGmEmZ4R56DNL8UtllCGOoCkVcCpkE73wue1m40mPu2tHjPirvMwBMZiQZARYWiMRlhYRkmTfwfaZM/s1600/%23WeArePlay%20Social%20.png"> <img style="display:none" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNrZUz7AsjqnFhJZ3BiBy2mDVmKO6hCv66KtgSq7vZtgt9ZZiljd7_JNFJEyuOg7tF1HfYqOqSnW6MQLRoYOaPalEg4vC4XVwstTgXz-hzYmzqeAGmEmZ4R56DNL8UtllCGOoCkVcCpkE73wue1m40mPu2tHjPirvMwBMZiQZARYWiMRlhYRkmTfwfaZM/s1600/%23WeArePlay%20Social%20.png"> <p><em>Posted by Robbie McLachlan, Developer Marketing</em><p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik4qrvAXEbwjc73FqR0tLgTgjSzdsYGxfiWG8MDOX0ATzF7xhnycsjl_KyDcxZoGZx7uiGPcAi8C-ByRwvTjgkOqVI6uGQZ0jg2VML-56P7fZlIkSMVA7XnEN0t406X67IlMJPXc2iVNUlJC0DclM-ITEJ71bTaDSQJ-wii2mwXdfnMAjZLoAVO2a0vWU/s1600/Android%20Devs%20_%20Google%20Devs%20-Blog_Header_1200x600.jpg" imageanchor="1" ><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik4qrvAXEbwjc73FqR0tLgTgjSzdsYGxfiWG8MDOX0ATzF7xhnycsjl_KyDcxZoGZx7uiGPcAi8C-ByRwvTjgkOqVI6uGQZ0jg2VML-56P7fZlIkSMVA7XnEN0t406X67IlMJPXc2iVNUlJC0DclM-ITEJ71bTaDSQJ-wii2mwXdfnMAjZLoAVO2a0vWU/s1600/Android%20Devs%20_%20Google%20Devs%20-Blog_Header_1200x600.jpg" data-original-width="1058" data-original-height="800" /></a> <p>In our latest film for <a href="https://play.google.com/console/about/weareplay/" target="_self">#WeArePlay</a>, which celebrates the people behind apps and games, we meet Michael and Shalom - a mother and son duo driven by a passion for sharing and teaching African languages. Discover how their app, Nkenne, goes beyond language learning—serving as a powerful tool for preserving cultural heritage and reconnecting people with their African language and culture.</p><br/> <iframe class="BLOG_video_class" allowfullscreen="" youtube-src-id="iBL6uELMV2I" width="100%" height="398" src="https://www.youtube.com/embed/iBL6uELMV2I"></iframe><br/> <h4><span style="font-size:large;">What inspired you to create Nkenne?</span></h4> <p><b>Michael:</b> Nkenne which means "of the mother," really came from a personal place. I wanted to learn Igbo, my native language from Nigeria, but there weren’t many resources out there that made it easy or accessible. My mom, Shalom, raised me in the U.S., and while I grew up hearing bits of Igbo, there wasn’t enough time or structure for me to fully learn it. During the pandemic, when everything paused, I realized how much I wanted to connect with my heritage, and that’s when the idea sparked. We realized that not just Igbo, but many African languages were becoming less common, even among those who speak them. So, we saw this as an opportunity to preserve these languages and help others reconnect with their roots.</p> <image><div style="text-align: center;"><img id="imgFull" alt="Nkenne Founders Cafe in Maine, US" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvIgVYYiJMpbJ8sacS1dCIQvtfNCC35vNPxpOeX_88flU30y0xhPELW7WPFSc_UQ5CLuNkVOj_tKjCX6TqlpuIVWTQ6w7sXD1Tc93VrqmwAySAbpjTw6KZtUFpVSeobaz7mdM_vk8SoKaIeN1QCjH1VTAt9raPIxUyK75uGPT2Dr3-GY8-gSuOzLD92gs/s1600/11_US_MAINE_NKENNE_FOUNDERS_CAFE.png" width="100%"/></div></image><br/> <h4><span style="font-size:large;">You’ve mentioned the goal of preserving African languages. How does Nkenne contribute to their preservation?</span></h4> <p><b>Shalom:</b> African languages are considered low-resource because they don't have as much digital content, formal documentation, or readily available learning tools. With Nkenne, we’re helping to change that. We’re not just teaching the languages, we’re documenting them, building lessons, and creating a resource for future generations. Many people in Nigeria, for example, don’t speak their native languages anymore. By creating Nkenne, we’re essentially building a digital library of African languages.</p> <h4><span style="font-size:large;">How does Nkenne integrate both language learning and cultural education? Why is it important to teach both?</span></h4> <p><b>Michael:</b> Understanding the cultural meaning behind a language makes learning richer. It’s not just vocabulary—it’s about connecting people with the culture behind it. We include blogs, podcasts, and lessons that dive into the traditions and customs tied to the language, so people understand not just the words, but the history and meaning behind them.</p> <p><b>Shalom:</b> Yes, learning a language without the cultural context leaves gaps. For instance, in Nigeria, using your left hand to hand someone an item is considered rude— we teach these cultural nuances in the app to help the user truly grasp the culture.</p> <image><div style="text-align: center;"><img id="imgFull" alt="The Nkenne app on device, showing avaiable languages" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggsRO9BbTCR5Ag9u5K96suo2AGirS4K8OR6BwYibmnTwH6Hau3fsE4ceD06AZMpo4vux1cDQjP_8AXQE4uH1AsrW81bSc14Zip-13PyKfv2qdfFwC0pTSqAQdA66PtQCU5xEzmx-AxEbiOWvFU8yCLFtMRTYW-uYeQncy4qAqiMTggdIjiXEW_VgcgbfE/s1600/08_US_MAINE_NKENNE_APP_LANGUAGES.png" width="100%"/></div></image><br/> <h4><span style="font-size:large;">What’s next for Nkenne?</span></h4> <p><b>Michael:</b> We're focused on expanding our language offerings to 30 by the end of 2025, including more African languages and Creole dialects from around the world. We're also working on enhancing our AI capabilities for language translation.</p> <p><b>Shalom:</b> We’re also deepening the community experience, adding more social features where users can connect, share, and practice together. It’s about building not just a language-learning platform, but a space where people from the diaspora and beyond can truly connect with their heritage.</p><br/> <p>Discover more <a href="https://play.google.com/console/about/weareplay/" target="_self">global #WeArePlay stories</a> and share your favorites.</p> <br /><br /> <p></p><center> How useful did you find this blog post? </center><p></p> <p></p><center> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=1%E2%98%85+%E2%80%93+Not+at+all&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=2%E2%98%85+%E2%80%93+Not+very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=3%E2%98%85+%E2%80%93+Somewhat&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=4%E2%98%85+%E2%80%93+Very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=5%E2%98%85+%E2%80%93+Extremely&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> </center><p></p> <div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s260/lockup_ic_Google_Play_H_260x53px_clr.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="53" data-original-width="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s200/lockup_ic_Google_Play_H_260x53px_clr.png" width="200" /></a></div><p></p><p></p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-36817572574019098202024-09-12T11:00:00.000-07:002024-09-12T13:42:19.443-07:00Developer Preview: Desktop windowing on Android Tablets <meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicPESghCRbndcBMRlq8Wnu7htMNL3y9CbNIyI7Y9jW66rsLy2l0fJ4xN6L3g0FAvaz2c8yrNBsPiKPGCLxynePqGfs1Ck276Chv9vfLvGZymzjHZHjfJKz72ncuokqpIhBtEQ4RGr3CmHhsJ7mKAcn2KyLxejWATmWL0BXceOW42zG1fJ8C5Rm2xzt4Vc/s1600/image1.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicPESghCRbndcBMRlq8Wnu7htMNL3y9CbNIyI7Y9jW66rsLy2l0fJ4xN6L3g0FAvaz2c8yrNBsPiKPGCLxynePqGfs1Ck276Chv9vfLvGZymzjHZHjfJKz72ncuokqpIhBtEQ4RGr3CmHhsJ7mKAcn2KyLxejWATmWL0BXceOW42zG1fJ8C5Rm2xzt4Vc/s1600/image1.png" style="display: none;" /> <em>Posted by <author>Francesco Romano – Developer Relations Engineer on Android, and Fahd Imtiaz – Product Manager, Android Developer</author></em> <div><br /></div> <p>To empower tablet users to get more done, we're enhancing freeform windowing, allowing them to run multiple apps simultaneously and resize windows for optimal multitasking. Today, we're excited to share that desktop windowing on Android tablets is available in developer preview.</p> <p>For app developers, the concept of Android apps running in freeform windows has already existed with solutions like Samsung DeX and ChromeOS. Updating your apps to support adaptive layouts, more robust multitasking, and adaptive inputs will ensure your apps work well on large screens across the Android ecosystem.</p> <p>Let’s explore how to optimize your apps for desktop windowing and deliver the optimal experience to users.</p> <h3>What is desktop windowing?</h3> <p>Desktop windowing allows users to run multiple apps simultaneously and resize app windows, offering a more flexible and desktop-like experience. This, along with a refreshed System UI and new APIs, allows users to be even more productive and creates a more seamless, desktop-like experience on tablets.</p> <p>In Figure 1, you can see the anatomy of the screen with desktop windowing enabled. Things to make note of:</p> <ul><ul> <li>Users can run multiple apps side-by-side, simultaneously</li></ul><ul> <li>Taskbar is fixed and shows the running apps, users can pin apps for quick access</li></ul><ul> <li>New header bar with window controls at the top of each window which apps can customize</li> </ul></ul> <image><div style="text-align: center;"><img alt="Desktop windowing on a Pixel Tablet" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicPESghCRbndcBMRlq8Wnu7htMNL3y9CbNIyI7Y9jW66rsLy2l0fJ4xN6L3g0FAvaz2c8yrNBsPiKPGCLxynePqGfs1Ck276Chv9vfLvGZymzjHZHjfJKz72ncuokqpIhBtEQ4RGr3CmHhsJ7mKAcn2KyLxejWATmWL0BXceOW42zG1fJ8C5Rm2xzt4Vc/s1600/image1.png" width="100%" /></div><imgcaption><center><em><b>Figure 1:</b> Desktop windowing on a Pixel Tablet.</em></center><center><i>Note: Images are examples and subject to change</i></center></imgcaption></image><br /> <h3>How can users invoke desktop windowing?</h3> <p>By default, apps open in full screen on Android tablets. To run the apps as a desktop window on Pixel Tablet, press and hold the window handle at the top in the middle of the screen and drag it within the UI, as seen in Figure 2.</p> <p>Once you are in the desktop space, all future apps will be launched as desktop windows as well.</p> <image><div style="text-align: center;"><img alt="A moving image demonstrating what completing the action 'press, hold, and drag the window handle to enter desktop windowing' looks like." border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_jE8Pjn_uQZQd9SbAwq2FuFZIWbtmi-iUhSlN4r7_lqlcAYj8IFx57ScR7Vn8nTR0L7XmkBB72-GtKshZbEx5qYT5GLqc_xomjGbE9x0xMTiwqzfzwnb_VySRgpZndUnLnMGGH3ZtcPqpeGAVCx8XwFfpr4C1G9INQSHrKW9NbVtA0rO-URuIPLzUwGg/s1600/image4.gif" width="100%" /></div><imgcaption><center><em><b>Figure 2.</b> Press, hold, and drag the window handle to enter desktop windowing.</em></center><center><i>Note: Images are examples and subject to change</i></center></imgcaption></image><br /> <p>You can also invoke desktop windowing from the menu that shows up below the window handle when you tap/click on it or use the keyboard shortcut meta key (Windows, Command, or Search) + Ctrl + Down.</p> <p>You can exit desktop windowing and display an app as full screen by closing all active windows or by grabbing the window handle at the top of the window and dragging the app to the top of the screen. You can also use the meta + H keyboard shortcut to run apps as full screen again.</p> <p>To return to the desktop, move a full screen app to the desktop space by using the methods mentioned above, or simply tap on the desktop space tile in the Recents screen.</p> <h3>What does this mean for app developers?</h3> <p>Desktop windowing on Android tablets creates new opportunities for your apps, particularly around productivity and multitasking. The possibility to resize and reposition multiple app windows allows users to easily compare documents, reference information while composing emails, and multitask efficiently.</p> <p>By optimizing for desktop windowing, you can deliver unique user experiences to match the growing demand for tablet-based productivity. At the same time, you'll enhance the overall user experience on tablets, making your apps more versatile and adaptable to different scenarios.</p> <p>If your app already meets the <a href="https://developer.android.com/docs/quality-guidelines/large-screen-app-quality#large_screen_optimized" target="_self">Tier 2</a> (Large Screens optimized) quality bar in the <a href="https://developer.android.com/docs/quality-guidelines/large-screen-app-quality" target="_self">Large screen app quality guidelines</a>, then there is minimal additional optimization required! If your app has not been optimized for large screens yet, updating it according to the Large screen app quality guidelines becomes even more crucial in the context of desktop windowing. Let’s see why:</p> <ul><ul><li><b>Freeform resizing enables users to resize apps to their preference for maximized productivity.</b> Considering this, developers should note:</li> <ul><ul><li>Apps with locked orientation are freely resizable. That means, even if an activity is locked to <a href="https://developer.android.com/guide/topics/manifest/activity-element#screen" target="_self">portrait orientation</a>, users can still resize the app to landscape orientation window. In a future update, apps declared as non-resizable will have their UI scaled while keeping the same aspect ratio.</li> <li><b>Adaptive layouts: </b>By adapting your UI, apps have an opportunity to effortlessly handle a wide range of window sizes, from compact to expanded screen layouts. In desktop windowing, apps can be resized down to a minimum size of 386dp x 352dp, so make sure to leverage <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/window-size-classes" target="_self">window size classes</a> to adjust your app's layout, content, and interactions to adapt to different window dimensions.</li> <li><b>State management:</b> With freeform resizing, configuration changes happen each time the window resizes, so your app should either handle these configuration changes gracefully or make sure you are preserving the app state when the OS initiates the re-creation of the app. As a reminder, users can change the screen density while your app is running, so it’s best to ensure that your app can handle screen density configuration changes as well.</li> </ul></ul><br /> <b><ul style="text-align: left;"><ul><ul><ul></ul></ul></ul></ul></b> <image><img alt="A moving image demonstrating how apps are fully resizable" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS5IKXTAQsXZFSIfuBhIYNghSGMoBCRCrXbx3Mp2U6ed9eHixlUVIQqtOBwwJFR3Tl00aT1gPKikSzEMw6muFEDC0EdeyyufMrOtaoGpZYxq90tXe1GUriskE_pzxhAVUyibdOTlwjGiqtwLQjo0kT1x7GQd225DmEOCLpqqCU0DhVL4MB1G2bVAnfuGE/s1600/image3.gif" style="font-weight: bold; text-align: center;" width="100%" /><br /><div style="text-align: center;"><em><b style="font-weight: bold;">Figure 3.</b> Apps with locked orientation are freely resizable.</em></div><b></b></image><br /> <li><b>Desktop windowing takes productivity on tablets to the next level with multiple apps running simultaneously. </b>Similar to split screen, Desktop windowing encourages users to have multiple windows open. Considering this, developers should note:&nbsp;</li> <ul><ul><li><b>Multitasking support:</b> For enhanced productivity, users can have two or more apps open simultaneously, and they expect to easily share content between apps, so add support for <a href="https://developer.android.com/develop/ui/compose/touch-input/user-interactions/drag-and-drop" target="_self">drag and drop</a> gestures. Also, ensure your app continues to function correctly even when not in focus, and if your app uses exclusive resources like camera or microphone, the app needs to <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/support-multi-window-mode#exclusive_resource_access" target="_self">handle resource loss gracefully</a> when other apps acquire the resource.&nbsp;</li> <li><b>Multi-instance support:</b> Users can run multiple instances of your app side-by-side; for example, a document editor application may allow users to start new documents while still being able to reference the already open documents. Apps can set this <a href="https://developer.android.com/reference/android/view/WindowManager#PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI" target="_self">new Multi-instance property</a> to declare that System UI should be shown for this app to allow it to be launched as multiple instances. Also note that in desktop windowing, <i><a href="https://developer.android.com/reference/android/content/Intent#FLAG_ACTIVITY_NEW_TASK" target="_self">new tasks</a> open in a new window</i>, so double-check the user journey if your app starts multiple tasks.</li></ul></ul><br /> <image><img alt="A moving image demonstrating how you can start another instance of Chrome by dragging a tab out og the app window." border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAQtCkHL7YuKy1inlhMZpAykRUattpFAftNevbBYDc5_Pmaj89NHaION-QGNQluq0YTxtHVU1P1cRvA19cmGxZOrdFoRvURGTFVxlh7ji1-L-Mb-en-q1jxBl69gPI_8bdQToDg-55SV-2PU4e79O9SjFfAAIILI1zDd-Oxtd0iqutDxUF9AwLylm54Ig/s1600/Responsive-layouts-GIF.gif" style="font-weight: bold; text-align: center;" width="100%" /><br /><div style="text-align: center;"><em><b style="font-weight: bold;">Figure 4.</b> Start another instance of Chrome by dragging a tab out of the app window.</em></div><b></b></image><image><div style="text-align: center;"><em>Note: Images are examples and subject to change</em></div></image><br /> <ul><li><b>With desktop windowing, input methods beyond touch and insets handling become even more important for a seamless user experience.</b>&nbsp;</li><ul> <ul><li><b>More input methods (keyboard, mouse):</b> Users are more likely to use your app with a variety of input methods like external keyboards, mice, and trackpads. Check that users can interact smoothly with your app using <a href="https://developer.android.com/codelabs/large-screens/add-keyboard-and-mouse-support-with-compose" target="_self">keyboard and mouse peripherals</a> or through the emulator. Developers can add support for app shortcuts and publish them using the keyboard shortcuts API, which allows users to easily view the supported app shortcuts through a standardized surface on Android devices.</li> <li><b>Insets handling:</b> All apps when running in desktop windowing have a header bar, even in immersive mode. Ensure your app's content isn't obscured by this. <i>The new header bar is reported as a caption bar</i> in Compose (<span style="font-family: courier;"><a href="https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/package-summary#(androidx.compose.foundation.layout.WindowInsets.Companion).captionBar()" target="_self">androidx.compose.foundation:foundation-layout.WindowInsets.Companion.captionBar</a></span>) and in Views (<span style="font-family: courier;"><a href="https://developer.android.com/reference/android/view/WindowInsets.Type#captionBar()">android.view.WindowInsets.Type.CAPTION_BAR</a></span>), which is part of the system bars. API 35 also introduced a new <a href="https://developer.android.com/reference/android/view/WindowInsetsController#APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND" target="_self">appearance type</a>, to make the header bar transparent, to allow apps to draw custom content inside.</li> </ul></ul></ul></ul></ul> <h3 style="text-align: left;">Get hands-on!&nbsp;</h3> <p>Today we’re announcing a developer preview that provides you with an early opportunity to experience and test desktop windowing. You can try it out on <a href="https://developer.android.com/about/versions/15/get#on_pixel" target="_self">Pixel Tablet</a> before it’s released to AOSP more broadly. The preview is available today. Update your Pixel Tablet to the latest Android 15 QPR1 Beta 2 release to try out desktop windowing. If you don’t have a Pixel Tablet handy, access the <a href="https://developer.android.com/about/versions/15/get#on_emulator" target="_self">Pixel Tablet emulator</a> in <a href="https://developer.android.com/studio/preview" target="_self">Android Studio Preview</a>, and select the Android 15.0 (Google APIs Tablet) target. Once your device is set up, select <b>Enable freeform windows</b> option in <b>Developer options</b> to explore the capabilities of desktop windowing and how your app behaves within this new environment.</p> <p>By optimizing your apps for desktop windowing on Pixel Tablet, you are not only enhancing the app experience on that specific device but also future-proofing your apps for the broader Android ecosystem where freeform windowing will become prevalent. We're excited about the windows of opportunities enabled by desktop windowing, and we look forward to seeing how you adapt your apps for an enhanced user experience.</p> <p>We're committed to improving the desktop windowing experience through future updates. Make sure to test your app and give us <a href="https://developer.android.com/about/versions/15/feedback" target="_self">feedback</a>. Say tuned for more developer guides and resources!</p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-6975909262489099452024-09-11T09:00:00.000-07:002024-09-11T09:10:08.267-07:00Streamlining Android authentication: Credential Manager replaces legacy APIs<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_U3Am1xHEJCOfvxwHh3sU-TgtPGh7ScMYQH4PhmXyZuLsnGoT1eRhmpU5L8qq07jxICVcHcWJAmR4vjMhN8RMBA_xC3pmtgnGQ0EZk6ce7PmatwSMdYpFt3ZfuPWIf7IAMbD4ZCqJ_t4ciOJeyEUM_ASkQfMhHAuEjKpxjnkYnTK0ugRz42oPyTTv-7s/s1600/social-Blog-post-describing-migration-from-existing-Auth-APIs-to-CredMan-API.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_U3Am1xHEJCOfvxwHh3sU-TgtPGh7ScMYQH4PhmXyZuLsnGoT1eRhmpU5L8qq07jxICVcHcWJAmR4vjMhN8RMBA_xC3pmtgnGQ0EZk6ce7PmatwSMdYpFt3ZfuPWIf7IAMbD4ZCqJ_t4ciOJeyEUM_ASkQfMhHAuEjKpxjnkYnTK0ugRz42oPyTTv-7s/s1600/social-Blog-post-describing-migration-from-existing-Auth-APIs-to-CredMan-API.png" style="display: none;" /> <em>Posted by Diego Zavala and Jason Lucibello – Product Managers</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZAwTuEczCixWe-6SN-cKy9wx7VuFML578tLjcX-sI4TfzG0M3Y7ODYo_dOEWZzrizvLDgQit-aRGtvmixausO1waHpb_ERBvwmkX6vMMBdFqJXMTGfW43B2KyVZVigGgRcBESvFnR8UST5aAzRBM1mn7FSz-ICYUoxe44NfsxAinWDB48XOhMN_rVEg/s1600/header-Blog-post-describing-migration-from-existing-Auth-APIs-to-CredMan-API.png"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZAwTuEczCixWe-6SN-cKy9wx7VuFML578tLjcX-sI4TfzG0M3Y7ODYo_dOEWZzrizvLDgQit-aRGtvmixausO1waHpb_ERBvwmkX6vMMBdFqJXMTGfW43B2KyVZVigGgRcBESvFnR8UST5aAzRBM1mn7FSz-ICYUoxe44NfsxAinWDB48XOhMN_rVEg/s1600/header-Blog-post-describing-migration-from-existing-Auth-APIs-to-CredMan-API.png" /></a> <div><br /></div> <p>In 2023, we introduced <a href="https://developers.googleblog.com/en/simple-and-secure-sign-in-on-android-with-credential-manager-and-passkeys/" target="_self">Credential Manager for Android</a>. Credential Manager creates a unified experience for passkeys, Sign in with Google, and passwords, allowing seamless sign-in and eliminating the need for users to type in usernames or passwords.</p> <image><div style="text-align: center;"><img id="imgFull" alt="ALT TEXT" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaARrezLbthyphenhyphen9QwkRXvUHVkyyC5JTDyZbSpWbvRyRaDLXTeAZtf7_SiPX0IW9yR0SSlRogoYhj4MB3pGb0fmjTTw5vxUAGatS9k_1sLmr_6FZfKcA0HjNJ-ik2NJ8QujtNwwyu31WA1Wvmr_DPcj3yiTVh3a0WkZ2Kf8jpcib0vNFmYitPmeE3961b3sg/s16000/unnamed%20(90).png" width="50%"/></div><imgcaption><center><em>Fig 1. <a href="https://github.com/android/identity-samples/tree/credman-compose/Shrine" target="_self">Sample app</a> showing Credential Manager dialog in a sign-in flow with a passkey, a password, and a Sign in with Google options</em></center></imgcaption></image><br/> <p>To bring Credential Manager’s benefits to more Android users and simplify developers’ integration efforts, APIs that were <a href="https://android-developers.googleblog.com/2023/10/pdates-to-google-identity-services-gis-credential-manager-api.html" target="_self">previously deprecated</a> will continue their phased removals and shutdowns. These APIs include:</p> <ul><ul> <li><a href="https://developer.android.com/identity/sign-in/smart-lock-migration" target="_self">Smart Lock for Passwords API</a></li></ul><ul> <li><a href="https://developers.google.com/identity/one-tap/android/save-passwords" target="_self">Credential Saving API</a></li></ul><ul> <li><a href="https://developers.google.com/android/reference/com/google/android/gms/auth/api/identity/SignInClient#public-abstract-taskpendingintent-getsigninintent-getsigninintentrequest-getsigninintentrequest" target="_self">Sign in with Google button API</a></li></ul><ul> <li><a href="https://developers.google.com/identity/one-tap/android/overview" target="_self">One Tap Sign-in API</a></li></ul><ul> <li><a href="https://developers.google.com/identity/sign-in/android/legacy-gsi-start" target="_self">Google Sign-In for Android (GSI) API</a></li> </ul></ul> <p><b>Developers with apps that still use these APIs should migrate to <a href="https://developer.android.com/identity/sign-in/credential-manager" target="_self">Credential Manager</a> as soon as possible.</b> Credential Manager supports all authentication features included in these legacy APIs, as well as streamlined journeys for users and modernizes the experience with passkey support and streamlined user journeys. Developers looking to implement authorization functionality for Google Accounts, such as scoped access to a service like Google Drive, should continue to use the <span style="font-family: Courier;"><a href="https://developers.google.com/identity/authorization/android" target="_self">AuthorizationClient</a></span> API.</p> <h4><span style="font-size: large;">Current status of APIs as of September 2024, update plans, and recommended migration guides.</span></h4> <blockquote> <div><b>API:</b> <a href="https://developers.google.com/identity/smartlock-passwords/android/overview">Smart Lock for Passwords</a></div> <div><b>Status: </b>Removed</div> <div><b>Next Update: Fully shut down</b> in Q1 2025</div> <div><b>Migration guide:</b> <a href="https://developer.android.com/identity/sign-in/smart-lock-migration">Migrate from Smart Lock for Passwords to Credential Manager</a></div> <div><br /></div> <div><b>API:</b> <a href="https://developers.google.com/identity/one-tap/android/save-passwords">Credential Saving API</a></div> <div><b>Status: </b>Deprecated</div> <div><b>Next Update:</b> Removed in H1 2025</div> <div><b>Migration guide:</b> <a href="https://developer.android.com/identity/sign-in/smart-lock-migration">Migrate passwords to Credential Manager</a></div> <div><br /></div> <div><b>API:</b> <a href="https://developers.google.com/android/reference/com/google/android/gms/auth/api/identity/SignInClient#public-abstract-taskpendingintent-getsigninintent-getsigninintentrequest-getsigninintentrequest">Sign in with Google button</a></div> <div><b>Status:</b> Deprecated</div> <div><b>Next Update:</b> Removed in H1 2025</div> <div><b>Migration guide:</b> <a href="https://developer.android.com/identity/sign-in/credential-manager-siwg#trigger-siwg">Migrate to the Sign in with Google button and Credential Manager</a></div> <div><br /></div> <div><b>API:</b> <a href="https://developers.google.com/identity/one-tap/android/overview">One Tap Sign-in</a></div> <div><b>Status:</b> Deprecated</div> <div><b>Next Update:</b> Removed in H2 2025</div> <div><b>Migration guide:</b> <a href="https://developer.android.com/identity/sign-in/credential-manager-siwg">Authenticate users with Sign in with Google and Credential Manager</a></div> <div><br /></div> <div><b>API:</b> <a href="https://developers.google.com/identity/sign-in/android/legacy-gsi-start">Google Sign-In for Android</a></div> <div><b>Status:</b> Deprecated</div> <div><b>Next Update:</b> Removed in H2 2025</div> <div><b>Migration guide:</b> <a href="https://developer.android.com/identity/sign-in/legacy-gsi-migration">Migrate from legacy Google Sign-In to Credential Manager</a></div> </blockquote> <div><h4 style="font-size: medium;">What does each status mean?</h4></div> <ul><ul> <li><b><i>Deprecated</i>:</b> API is still in the SDK and functional, but will be removed and fully shut down in the future. Developers are recommended to migrate to Credential Manager at this time.</li></ul><ul> <li><b><i>Removed</i>:</b> API is still functional for users, but is no longer included in the SDK. New app versions compiled with the most recent SDK would fail in the build process if your code still utilizes the removed API. If your app still relies on any of these APIs, you should migrate to Credential Manager as soon as possible.</li></ul><ul> <li><b><i>Fully shut down</i>:</b> API is no longer functional, and it will fail when a request is sent by an app.</li> </ul></ul> <h3>Credential Manager offers streamlined, more secure auth journeys</h3> <p>Credential Manager delivers multiple advantages to users and developers over the deprecated APIs:</p> <ul><ul>1. <b>Easier, more secure sign-ins with passkeys:</b> Passkeys are an alternative to passwords that provide an easier and more secure authentication experience, based on industry standards. Credential Manager brings support for passkeys to Android apps.</ul></ul><br /> <ul><ul>2. <b>Frictionless, one-tap sign-in:</b> Users select their preferred saved credential from the options offered, without needing to remember or type username or passwords.</ul></ul><br /> <ul><ul>3. <b>Unified UI across all credentials:</b> Credential Manager’s one-tap sign-in works with passkeys, Sign in with Google, and passwords. It deduplicates methods for the same account, so users no longer need to remember which method they last used, or which one is the “right” method.</ul></ul><br /> <ul><ul>4. <b>Extended support for password managers:</b> Users benefit from using the credentials stored in their preferred password manager on Credential Manager flows, and can even enable multiple password managers at the same time! Passwords managers not only protect users’ credentials, but they also provide additional action and protections to keep users safe, such as upgrading passwords to passkeys, alerting users to password reuse, and containing usage to affiliated apps and domains.</ul></ul><br /> <ul><ul>5. <b>Simplified development:</b> Developers can consolidate their sign-in logic into a single, modern API, reducing development overhead and maintenance efforts. New authentication functionality will be released through Credential Manager going forward.</ul></ul><br /> <h3>Adopting Credential Manager is an intuitive upgrade for developers</h3> <p>For developers previously using our deprecated APIs, the transition to Credential Manager is smooth and intuitive. Developers like X (formerly known as Twitter), Pinterest have already experienced the benefits of the upgrade. X shared with us that Credential Manager’s unified approach made migration and maintenance effortless, while Pinterest expressed a smooth process for both users and engineers with Credential Manager.</p> <image><div style="text-align: center;"><img alt="Quote text reads: 'The Credential Manager library allowed us to unify Smart Lock, Sign in with Google, and passkeys under one cohesive umbrella, significantly reducing the amount of code required. The unified process made migration and maintenance effortless, empowering us to enhance security and user experience with ease' Saurabh Arora, Staff SoftwareEngineer, X (formerly Twitter)" border="0" height="640" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrIS-4Ueu0oFX2uPHJxrkNPpaqfO9yifqsSfsUspbL5pSZOUGtTuW8WG7BvaBwnT3QLjOEIw1an9bliWnP6GY3XDnJMDE_A9wlxhbzTKx_2nqELedHQtTO62AlSMOkpbNyHbKAD1TcB-tu_ypy49kkRWPKBzDclqDCx-JI77Quh4UDj3G08SChrgPNVZE/s1600/X%20_%20Pinterest%20Quote%20%281%29.png" width="100%" /></div></image><br /> <image><div style="text-align: center;"><img alt="Quote text reads: 'Migrartingo ur codebase to Credential Manager on Android was a smooth process for users and engineers, which aallowed us to have more cohesive and simplified process to support and maintain authentication at Pinterest. Our Android users have benfitted from frictionless sign-in and sign-up using Google, currently accounting for over 75% of user authentications.' - Jorge Garmendia Identity Product safety and Compliance Client Engineering Lead, Pinterest" border="0" height="640" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjFzavZuM-YBZwA8OlgLN0_BcdleoHw0eN9384iZX1oSf6Q1tZfJeL2Dm4qdGCtKnC5Jf-LwJvvRdAvP2zXY7CrxDb-J-tkK8fRKnY4bybNd-qcJW0cufN0i0ZCAqadWUD1Yh-kLwQ7NTIQXvlv-3JGFdJPrKENzOPNaYOSIQSkDicqh2LrYJzRrNU8wQ/s1600/X%20_%20Pinterest%20Quote.png" width="100%" /></div></image> <p>Developers can use the following guides to make adopting Credential Manager even easier:</p> <ul><ul> <li>Get started: <a href="https://developer.android.com/identity/sign-in/credential-manager" target="_self">Credential Manager Implementation Guide</a></li></ul><ul> <li><a href="https://developer.android.com/identity/sign-in/smart-lock-migration" target="_self">Migrate from Smart Lock for Passwords to Credential Manager guide</a></li></ul><ul> <li><a href="https://developer.android.com/identity/sign-in/legacy-gsi-migration" target="_self">Migrate from legacy Google Sign-In to Credential Manager</a></li></ul><ul> <li><a href="https://developer.android.com/identity/sign-in/credential-manager-siwg" target="_self">Authenticate users with Sign in with Google using Credential Manager</a></li> </ul></ul> <h3>Share your feedback</h3> <p>Your input is very valuable to us as we continue to refine and improve our authentication services. Please keep providing us feedback on the <a href="https://issuetracker.google.com/issues/new?component=1301097&amp;template=1773864" target="_self">issue tracker</a> and <a href="https://forms.gle/ENz7UStJ7vy4uTZv8" target="_self">share your experience</a> integrating Credential Manager!</p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-46143972386451252812024-09-09T10:01:00.000-07:002024-09-09T10:01:00.110-07:00Jetpack Compose APIs for building adaptive layouts using Material guidance now stable<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjQjeNUPPsxNcdHmOSd54uH6MSoMiJysuH_kAdzzhyMmhxWpeepDnS6GP0dhoPP7U9RLHENlmaOOQNpKcTR1MA21TinJdXfc73BJFrGqg3SdhceL_bjIhW99PSgvZFZzPqR_kDCCnjVakUiKn_KMZCvOlD4FWqbCTAy5vbNMh6qjyJ1qKouAzjef3DFfQ/s1600/Android-Large-Screen-Form-Factors-Social.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjQjeNUPPsxNcdHmOSd54uH6MSoMiJysuH_kAdzzhyMmhxWpeepDnS6GP0dhoPP7U9RLHENlmaOOQNpKcTR1MA21TinJdXfc73BJFrGqg3SdhceL_bjIhW99PSgvZFZzPqR_kDCCnjVakUiKn_KMZCvOlD4FWqbCTAy5vbNMh6qjyJ1qKouAzjef3DFfQ/s1600/Android-Large-Screen-Form-Factors-Social.png" style="display: none;" /> <em>Posted by <author>Alex Vanyo – Developer Relations Engineer</author></em> <div><br/></div> <p>The 1.0 stable version of <a href="https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive" target="_self">the Compose adaptive APIs with Material guidance</a> is out, ready to be used in production. The library helps you build <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive" target="_self">adaptive layouts</a> that provide an optimized user experience on any window size.</p> <iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/Nwnj01s-gOo" width="100%" youtube-src-id="Nwnj01s-gOo"></iframe> <p>The team at SAP Mobile Start were early adopters of the Compose adaptive APIs. It took their developers <a href="https://android-developers.googleblog.com/2024/09/sap-integrates-compose-adaptive-api-for-responsive-navigation-ui.html" target="_self">only five minutes to integrate the <span style="font-family: Courier;">NavigationSuiteScaffold</span></a> from the new Compose Material 3 adaptive library, rapidly adapting the app’s navigation UI to different window sizes.</p> <p>Each of the new components in the library, <span style="color: #0d904f; font-family: Courier;">NavigationSuiteScaffold</span>, <span style="color: #0d904f; font-family: Courier;">ListDetailPaneScaffold</span> and <span style="color: #0d904f; font-family: Courier;">SupportingPaneScaffold</span> are <i>adaptive</i>: based on the window size and posture, different components are displayed to the user based on which one is most appropriate in the current context. This helps build UI that adapts to a wide variety of window sizes instead of just stretching layouts.</p> <p>For an overview of the components, check out the dedicated <a href="https://www.youtube.com/watch?v=xPUZENis4gc" target="_self">I/O session</a> and our <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive" target="_self">new documentation</a> pages to get started.</p> <p>In this post, we’re going to take a more detailed look at the layering of the new library so you have a better understanding of how customisable it is, to fit a wide variety of use cases you might have.</p> <p>Similar to <a href="https://developer.android.com/develop/ui/compose/layering" target="_self">Compose itself</a>, the adaptive libraries are layered into multiple dependencies, so that you can choose the appropriate level of abstraction for your application.There are four new artifacts as part of the adaptive libraries:</p> <ul><ul> <li>For the core building blocks for building adaptive UI, including computing the window size class and the current posture, add <span style="color: #0d904f; font-family: Courier;">androidx.compose.material3.adaptive:adaptive:1.0.0</span></li></ul><div><br /></div><ul> <li>For implementing multi-pane layouts, add <span style="color: #0d904f; font-family: Courier;">androidx.compose.material3.adaptive:adaptive-layout:1.0.0</span></li></ul><div><br /></div><ul> <ul><ul><li>Contains the multi-pane scaffold layouts <span style="font-family: Courier;"><a href="https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/package-summary#ListDetailPaneScaffold%28androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1%29" target="_self">ListDetailPaneScaffold</a></span> and <span style="font-family: Courier;"><a href="https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/package-summary#SupportingPaneScaffold%28androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1%29" target="_self">SupportingPaneScaffold</a></span></li></ul></ul></ul><div><br /></div><ul> <li>For standalone navigators for the multi-pane scaffold layouts, add <span style="color: #0d904f; font-family: Courier;">androidx.compose.material3.adaptive:adaptive-navigation:1.0.0</span></li></ul><div><br /></div><ul> <li>For implementing adaptive navigation UI, add <span style="color: #0d904f; font-family: Courier;">androidx.compose.material3:material3-adaptive-navigation-suite:1.3.0</span></li> </ul></ul> <p>The libraries have the following dependencies:</p> <image><div style="text-align: center;"><img alt="Flow diagram showing dependencies between material3-adaptive 1.0.0 and material 1.3.0 libraries" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijyMpfuQveO7_inLD_hYQiSP4RHLx9NJX7dF_J3_EYDhzPmCLIPUw_4dhxBgdz8u-OAoH7SBm-_SwNsutG23cxPDsBCR_lJNJjbt_j4UZ4nGYmakHQw3OSZ6Q2qf2UOj2K5gQ0GlR-LYECwhFSBjUK7zaKlZ0nG7nkKU28qC66_vo_BjhPgTZmX_f-L3w/s1600/image2.png" width="100%" /></div><imgcaption><center><em>New library dependency graph</em></center></imgcaption></image><br /> <p>To explore this layering more, let’s start with the highest level example with the most built-in functionality using a <span style="color: #0d904f; font-family: Courier;">NavigableListDetailPaneScaffold</span> from <span style="color: #0d904f; font-family: Courier;">androidx.compose.material3.adaptive:adaptive-navigation</span>:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="font-family: courier;">val navigator <span style="color: #666666;">=</span> rememberListDetailPaneScaffoldNavigator<span style="color: #666666;">&lt;</span>Any<span style="color: #666666;">&gt;()</span> NavigableListDetailPaneScaffold<span style="color: #666666;">(</span> navigator <span style="color: #666666;">=</span> navigator<span style="color: #666666;">,</span> listPane <span style="color: #666666;">=</span> <span style="color: #666666;">{</span> <span style="color: #408080; font-style: italic;">// List pane</span> <span style="color: #666666;">},</span> detailPane <span style="color: #666666;">=</span> <span style="color: #666666;">{</span> <span style="color: #408080; font-style: italic;">// Detail pane</span> <span style="color: #666666;">},</span> <span style="color: #666666;">)</span></span> </pre></div><br /> <p>This snippet of code gives you all of our recommended adaptive behavior out of the box for a list-detail layout: determining how many panes to show based on the current window size, hiding and showing the correct pane when the window size changes depending on the previous state of the UI, and having the back button conditionally bring the user back to the list, depending on the window size and the current state.</p> <image><div style="text-align: center;"><img alt="A list layout adapting to and from a list detail layout depending on the window size" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfcVgJvk0K6ANCGUEBcCP7XnCjkVRYNynUiNGWz_pmukdMi_tFqXzaZTnGbYnlNSouFaNBC7KP0HpVaXXkoPtCDZ0uWPkBgbKgsucj5H6k44SSmZypBPM3eZvzwNZZdAEf5U8SrMvgL3xmWdBsraS1fu_wgViyUPW1YpPoqBDONSf6WIklmM9vJxaTGsE/s1600/image1.gif" width="100%" /></div></image><br /> <p>This encapsulates a lot of behavior – and this might be all you need, and you don’t need to go any deeper!</p> <p>However, there may be reasons why you may want to tweak this behavior, or more directly manage the state by hoisting parts of it in a different way.</p> <p>Remember, each layer builds upon the last. This snippet is at the outermost layer, and we can start unwrapping the layers to customize it where we need.</p> <p>Let’s go one level deeper with <span style="color: #0d904f; font-family: Courier;">NavigableListDetailPaneScaffold</span> and drop down one layer. Behavior won’t change at all with these direct inlinings, since we are just inlining the default behavior at each step:</p> <p>(Fun fact: You can follow along with this directly in Android Studio and for any other component you desire. If you choose <b>Refactor &gt; Inline</b> function, you can directly replace a component with its implementation. You can’t delete the original function in the library of course.)</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="font-family: courier;">val navigator <span style="color: #666666;">=</span> rememberListDetailPaneScaffoldNavigator<span style="color: #666666;">&lt;</span>Any<span style="color: #666666;">&gt;()</span> BackHandler<span style="color: #666666;">(</span> enabled <span style="color: #666666;">=</span> navigator<span style="color: #666666;">.</span><span style="color: #7d9029;">canNavigateBack</span><span style="color: #666666;">(</span>BackNavigationBehavior<span style="color: #666666;">.</span><span style="color: #7d9029;">PopUntilContentChange</span><span style="color: #666666;">)</span> <span style="color: #666666;">)</span> <span style="color: #666666;">{</span> navigator<span style="color: #666666;">.</span><span style="color: #7d9029;">navigateBack</span><span style="color: #666666;">(</span>BackNavigationBehavior<span style="color: #666666;">.</span><span style="color: #7d9029;">PopUntilContentChange</span><span style="color: #666666;">)</span> <span style="color: #666666;">}</span> ListDetailPaneScaffold<span style="color: #666666;">(</span> directive <span style="color: #666666;">=</span> navigator<span style="color: #666666;">.</span><span style="color: #7d9029;">scaffoldDirective</span><span style="color: #666666;">,</span> value <span style="color: #666666;">=</span> navigator<span style="color: #666666;">.</span><span style="color: #7d9029;">scaffoldValue</span><span style="color: #666666;">,</span> listPane <span style="color: #666666;">=</span> <span style="color: #666666;">{</span> <span style="color: #408080; font-style: italic;">// List pane</span> <span style="color: #666666;">},</span> detailPane <span style="color: #666666;">=</span> <span style="color: #666666;">{</span> <span style="color: #408080; font-style: italic;">// Detail pane</span> <span style="color: #666666;">},</span> <span style="color: #666666;">)</span></span> </pre></div><br /> <p>With the first inlining, we see the <span style="color: #0d904f; font-family: Courier;">BackHandler</span> that <span style="color: #0d904f; font-family: Courier;">NavigableListDetailPaneScaffold</span> includes by default. If using <span style="color: #0d904f; font-family: Courier;">ListDetailPaneScaffold</span> directly, back handling is left up to the developer to include and hoist to the appropriate place.</p> <p>This also reveals how the navigator provides two pieces of state to control the <span style="color: #0d904f; font-family: Courier;">ListDetailPaneScaffold</span>:</p> <ul><ul> <li><span style="color: #0d904f; font-family: Courier;">directive</span> —- how the panes should be arranged in the <span style="color: #0d904f; font-family: Courier;">ListDetailPaneScaffold</span>, and </li></ul><ul> <li><span style="color: #0d904f; font-family: Courier;">value</span> —- the current state of the panes, as calculated from the directive and the current navigation state.</li> </ul></ul> <p>These are both controlled by the navigator, and the next unpeeling shows us the default arguments to the navigator for <span style="color: #0d904f; font-family: Courier;">directive</span> and the adapt strategy, which is used to calculate <span style="color: #0d904f; font-family: Courier;">value</span>:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="font-family: courier;">val navigator <span style="color: #666666;">=</span> rememberListDetailPaneScaffoldNavigator<span style="color: #666666;">&lt;</span>Any<span style="color: #666666;">&gt;(</span> scaffoldDirective <span style="color: #666666;">=</span> calculatePaneScaffoldDirective<span style="color: #666666;">(</span>currentWindowAdaptiveInfo<span style="color: #666666;">()),</span> adaptStrategies <span style="color: #666666;">=</span> ListDetailPaneScaffoldDefaults<span style="color: #666666;">.</span><span style="color: #7d9029;">adaptStrategies</span><span style="color: #666666;">(),</span> <span style="color: #666666;">)</span> BackHandler<span style="color: #666666;">(</span> enabled <span style="color: #666666;">=</span> navigator<span style="color: #666666;">.</span><span style="color: #7d9029;">canNavigateBack</span><span style="color: #666666;">(</span>BackNavigationBehavior<span style="color: #666666;">.</span><span style="color: #7d9029;">PopUntilContentChange</span><span style="color: #666666;">)</span> <span style="color: #666666;">)</span> <span style="color: #666666;">{</span> navigator<span style="color: #666666;">.</span><span style="color: #7d9029;">navigateBack</span><span style="color: #666666;">(</span>BackNavigationBehavior<span style="color: #666666;">.</span><span style="color: #7d9029;">PopUntilContentChange</span><span style="color: #666666;">)</span> <span style="color: #666666;">}</span> ListDetailPaneScaffold<span style="color: #666666;">(</span> directive <span style="color: #666666;">=</span> navigator<span style="color: #666666;">.</span><span style="color: #7d9029;">scaffoldDirective</span><span style="color: #666666;">,</span> value <span style="color: #666666;">=</span> navigator<span style="color: #666666;">.</span><span style="color: #7d9029;">scaffoldValue</span><span style="color: #666666;">,</span> listPane <span style="color: #666666;">=</span> <span style="color: #666666;">{</span> <span style="color: #408080; font-style: italic;">// List pane</span> <span style="color: #666666;">},</span> detailPane <span style="color: #666666;">=</span> <span style="color: #666666;">{</span> <span style="color: #408080; font-style: italic;">// Detail pane</span> <span style="color: #666666;">},</span> <span style="color: #666666;">)</span></span> </pre></div><br /> <p>The directive controls the behavior for how many panes to show and the pane spacing, based on <span style="color: #0d904f; font-family: Courier;">currentWindowAdaptiveInfo</span>, which contains the size and posture of the window.</p> <p>This can be customized with a different directive, to show two panes side-by-side at a smaller medium width:</p> <div style="background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="font-family: courier;">val navigator <span style="color: #666666;">=</span> rememberListDetailPaneScaffoldNavigator<span style="color: #666666;">&lt;</span>Any<span style="color: #666666;">&gt;(</span> scaffoldDirective <span style="color: #666666;">=</span> calculatePaneScaffoldDirectiveWithTwoPanesOnMediumWidth<span style="color: #666666;">(</span>currentWindowAdaptiveInfo<span style="color: #666666;">()),</span> adaptStrategies <span style="color: #666666;">=</span> ListDetailPaneScaffoldDefaults<span style="color: #666666;">.</span><span style="color: #7d9029;">adaptStrategies</span><span style="color: #666666;">(),</span> <span style="color: #666666;">)</span></span> </pre></div><br /> <p>By default, showing two panes at a medium width can result in UI that is too narrow, especially for complex content. However, this can be a good option to use the window space more optimally by showing two panes for less complex content.</p> <p>The <span style="font-family: Courier;"><a href="https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/AdaptStrategy" target="_self">AdaptStrategy</a></span> controls what happens to panes when there isn’t enough space to show all of them. Right now, this always hides panes for which there isn’t enough space.</p> <p>This directive is used by the navigator to drive its logic and, combined with the adapt strategy to determine the scaffold value, the resulting target state for each of the panes.</p> <p>The scaffold directive and the scaffold value are then passed to the <span style="color: #0d904f; font-family: Courier;">ListDetailPaneScaffold</span>, driving the behavior of the scaffold.</p> <p>This layering allows hoisting the scaffold state away from the display of the scaffold itself. This layering also allows custom implementations for controlling how the scaffold works and for hoisting related state. For example, if you are using a custom navigation solution instead of the navigator, you could drive the <span style="color: #0d904f; font-family: Courier;">ListDetailPaneScaffold</span> directly with state derived from your custom navigation solution.</p> <p>The layering is enforced in the library with the different artifacts:</p> <ul><ul> <li><span style="color: #0d904f; font-family: Courier;">androidx.compose.material3.adaptive:adaptive</span> contains the underlying methods to calculate the current window adaptive info</li></ul><ul> <li><span style="color: #0d904f; font-family: Courier;">androidx.compose.material3.adaptive:adaptive-layout</span> contains the layouts <span style="color: #0d904f; font-family: Courier;">ListDetailPaneScaffold</span> and <span style="color: #0d904f; font-family: Courier;">SupportingPaneScaffold</span></li></ul><ul> <li><span style="color: #0d904f; font-family: Courier;">androidx.compose.material3.adaptive:adaptive-navigation</span> contains the navigator APIs (like <span style="color: #0d904f; font-family: Courier;">rememberListDetailPaneScaffoldNavigator</span>)</li> </ul></ul> <p>Therefore, if you aren’t going to use the navigator and instead use a custom navigation solution, you can skip using <span style="color: #0d904f; font-family: Courier;">androidx.compose.material3.adaptive:adaptive-navigation</span> and depend on <span style="color: #0d904f; font-family: Courier;">androidx.compose.material3.adaptive:adaptive-layout</span> directly.</p> <p>When adding the <a href="https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive" target="_self">Compose Adaptive library</a> to your app, start with the most fully featured layer, and then unwrap if needed to tweak behavior. As we continue to work on the library and add new features, we’ll keep adding them to the appropriate layer. Using the higher-level layers will mean that you will be able to get these new features most easily. If you need to, you can use lower layers to get more fine-grained control, but that also means that more responsibility for behavior is transferred to your app, just like the layering in Compose itself.</p> <p>Try out the new components today, and send us your <a href="https://issuetracker.google.com/issues/new?component=742043" target="_self">feedback</a> for bugs and feature requests.</p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-52051644838482653662024-09-09T09:59:00.000-07:002024-09-11T09:22:01.510-07:00SAP integrated NavigationSuiteScaffold in just 5 minutes to create adaptive navigation UI<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBzW7JV84Qr9OyMrtdTAkzQmXZEdgVW_IPoSdPqumWq7OzNXus8EKI0658MD8mTe97-YURygLNuOSvRZjFCD2plbvoYogBC_TSg_g7bd45PueLMk2eUEPjWGWQG4y_j5SCu4TGkMiAXLjttq9sKzMBATNdCSL9Ax55vS92yNbrftfTJsAAmfxw0IxG00w/s1600/4%20%284%29.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBzW7JV84Qr9OyMrtdTAkzQmXZEdgVW_IPoSdPqumWq7OzNXus8EKI0658MD8mTe97-YURygLNuOSvRZjFCD2plbvoYogBC_TSg_g7bd45PueLMk2eUEPjWGWQG4y_j5SCu4TGkMiAXLjttq9sKzMBATNdCSL9Ax55vS92yNbrftfTJsAAmfxw0IxG00w/s1600/4%20%284%29.png" style="display: none;" /> <em>Posted by <author>Alex Vanyo – Developer Relations Engineer</author></em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBzW7JV84Qr9OyMrtdTAkzQmXZEdgVW_IPoSdPqumWq7OzNXus8EKI0658MD8mTe97-YURygLNuOSvRZjFCD2plbvoYogBC_TSg_g7bd45PueLMk2eUEPjWGWQG4y_j5SCu4TGkMiAXLjttq9sKzMBATNdCSL9Ax55vS92yNbrftfTJsAAmfxw0IxG00w/s1600/4%20%284%29.png"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBzW7JV84Qr9OyMrtdTAkzQmXZEdgVW_IPoSdPqumWq7OzNXus8EKI0658MD8mTe97-YURygLNuOSvRZjFCD2plbvoYogBC_TSg_g7bd45PueLMk2eUEPjWGWQG4y_j5SCu4TGkMiAXLjttq9sKzMBATNdCSL9Ax55vS92yNbrftfTJsAAmfxw0IxG00w/s1600/4%20%284%29.png" /></a> <div><br /></div> <p><a href="https://play.google.com/store/apps/details?id=com.sap.mobile.apps.sapstart&amp;hl=en_US&amp;pli=1" target="_self">SAP Mobile Start</a> is an app that centralizes access to SAP's mobile business suite, a hub for users to keep track of their companies’ processes and data so they can efficiently manage their daily to-dos while on the move.</p> <p>Recently, SAP Mobile Start developers prioritized building an adaptive app that looks great across devices, including tablets and foldables, to create a more seamless user experience. Using Jetpack Compose and Material 3 design, the team efficiently implemented intuitive, user-friendly features to increase accessibility across its users’ preferred devices.</p><br /> <iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/Nwnj01s-gOo" width="100%" youtube-src-id="Nwnj01s-gOo"></iframe> <h3>Adaptive design across devices</h3> <p>With over 300 million daily active users on foldables, tablets, and Chromebooks today, building apps that adapt to varied screen sizes is important for providing an optimal user experience. But simply stretching the UI to fit different screen sizes can drastically alter it from its original form, obscuring the interface and impairing the user experience.</p> <p>“We focused on situations where we could make better use of available space on large screens,” said Laura Bergmann, UX designer for SAP. “We wanted to get rid of screens that are stretched from edge to edge, full-screen drill-downs or dialogs, and use space more efficiently.”</p> <p>Now, after optimizing for different devices, SAP Mobile Start dynamically adjusts its layouts by swapping components and showing or hiding content based on the available window size instead of stretching UI elements to match a device's screen.</p> <p>The SAP team also implemented <a href="https://m3.material.io/foundations/layout/canonical-layouts/overview" target="_self">canonical layouts</a>, common UI designs that split a screen into panes according to its size. By separating content into panes, SAP’s users can manage their business workflows more productively. Depending on the window size class, the supporting pane adjusts the UI without additional custom logic. For example, compact windows typically utilize one pane, while larger windows can utilize multiple.</p> <p>“Adopting the new canonical layouts from Google helped us focus more on designing unique app capabilities for SAP’s business scenarios,” said Laura. “With the available navigational elements and patterns, we can now channel our efforts into creating a more engaging user experience without reinventing the wheel.”</p> <p>SAP developers started by implementing supporting panes to create multi-pane layouts that efficiently utilize on-screen space. The first place developers added supporting panes was on the app’s “To-Do” details page. To-dos used to be managed in a single pane, making it difficult to review the comments and tickets simultaneously. Now, tickets and comments are reviewed in primary and secondary panes on the same screen using <span style="font-family: Courier;"><a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/build-a-supporting-pane-layout" target="_self">SupportingPaneScaffold</a></span>.</p> <image><div style="text-align: center;"><img alt="We focused on making better use of the available space in large screens. We wanted to move away from UIs that are stretched to adaptive layouts that enhance productivity.” — Laura Bergmann, UX designer at SAP" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg653W8qwIb9_AFI7ITBBsTlxb5mCdrniD26hsY6x5GEJ_LT2KxGYcSQgnsmpY8S6fC9Cd69hJgNB83MtSPbEqVjhWemB1_C9p-7L08NW4b2KGrX6fp_RfBm49EAv0N1fGbBvT8a_SqMN7udREittNaq53u6gXyY8sUTogoVlxxrnjcnYs7LsQBRzSa-Mw/s1600/Quote%20card.png" width="100%" /></div></image><br /> <h3>Fast implementation using Compose Material 3 Adaptive library</h3> <p>SAP Mobile Start is built entirely with Jetpack Compose, Android’s modern declarative toolkit for building native UI. Compose helped SAP developers build new UI faster and easier than ever before thanks to composables, reusable code blocks for building common UI components. The team also used <a href="https://developer.android.com/develop/ui/compose/navigation" target="_self">Compose Navigation</a> to integrate seamless navigation between composables, optimizing travel between new UI on all screens.</p> <p><b>It took developers only five minutes to integrate the <span style="font-family: Courier;"><a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/build-adaptive-navigation" target="_self">NavigationSuiteScaffold</a></span> from the new Compose Material 3 adaptive library</b>, rapidly adapting the app’s navigation UI to different window sizes, switching between a bottom navigation bar and a vertical navigation rail. It also eliminated the need for custom logic, which previously determined the navigation component based on various window size classes. The <b><span style="color: #0d904f; font-family: Courier;">NavigationSuiteScaffold</span> also reduced the custom navigation UI logic code by 59%</b>, from 379 lines to 156.</p> <p>“Jetpack Compose simplified UI development,” said Aditya Arora, lead Android developer. “Its declarative nature, coupled with built-in support for Material Design and dark theme, significantly increased our development efficiency. By simply describing the desired UI, we've reduced code complexity and improved maintainability.”</p> <p>SAP developers used live edit and layout inspector in <a href="https://developer.android.com/studio?gad_source=1&amp;gclid=CjwKCAjwlbu2BhA3EiwA3yXyu49PJrxggvHzNbZDQursYHUMrDR2r6DO4y_sZ1wETWZrivolJgWmZxoCiuoQAvD_BwE&amp;gclsrc=aw.ds" target="_self">Android Studio</a> to test and optimize the app for large screens. These features were “total game changers” for the SAP team because they helped iterate and inspect layout issues faster when optimizing for new screens.</p> <p>With its <a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/tooling/preview/PreviewScreenSizes" target="_self">@PreviewScreenSizes</a> annotation and device streaming powered by Firebase, Jetpack Compose also made testing the app's UI across various screen sizes easier. SAP developers look forward to <a href="https://developer.android.com/studio/preview/compose-screenshot-testing" target="_self">Compose Screenshot Testing</a> being completed, which will further streamline UI testing and ensure greater visual consistency within the app.</p> <p>Using Jetpack Compose, SAP developers also quickly and easily implemented new Material 3 design concepts from the <a href="https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/package-summary" target="_self">Compose M3 Adaptive library</a>. Material 3 design emphasizes personalizing the app experience, improving interactions with modern visual aesthetics.</p> <p>Compose's flexibility made replacing the standard Material Theme with their own custom Fiori Horizon Theme simple, ensuring a consistent visual appearance across SAP apps. “As early adopters of the Compose M3 Adaptive library, we collaborated with Google to refine the API,” said Aditya. “Since our app is completely Compose-based, leveraging the new Compose Material 3 Adaptive library was a piece of cake.”</p> <image><div style="text-align: center;"><img alt="A list layout adapting to and from a list detail layout depending on the window size" border="0" height="402" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-tOL7mvrIQLIVHrGK2-NDRDsdfOubusup5gIRteyKiovyj1GVp1GO0c-V9ITT4fxezOwwTbR8ts253rfzukHsuWGPl6NtmH523sGxyECD-Vm7AagTpke5TNyyc6yvHk4CtoZubp6gw6yuWMvEcK59OIAx8qyrJ9Wwmaa-DcmkrVon3NlVqCQBzx2SI9c/w640-h402/SAP-UI-example-foldable.png" width="640" /></div></image><br /> <p>As large-screen devices like tablets, foldables, and Chromebooks become more popular, building layouts that adapt to varied screen sizes becomes increasingly crucial. For SAP Mobile Start developers, reimagining their app across devices using Jetpack Compose and Material 3 design guidelines was simple. Using Android’s collection of tools and resources, creating adaptive UIs for all the new form factors hitting the market today is faster and easier than ever.</p> <p>“Optimizing for large screens is crucial. The market for tablets, foldables, and Chromebooks is booming. Don't miss out on this opportunity to improve your user experience and expand your app's reach,” said Aditya.</p> <h3>Get started</h3> <p>Learn how to improve your UX by optimizing for <a href="https://developer.android.com/multidevice" target="_self">large screens and foldables</a> using <a href="https://developer.android.com/develop/ui/compose" target="_self">Jetpack Compose</a> and <a href="https://m3.material.io/" target="_self">Material 3</a> design.</p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-83969070617588017692024-09-03T17:30:00.000-07:002024-09-10T12:58:19.719-07:00TalkBack uses Gemini Nano to increase image accessibility for users with low vision<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyt1BMbDBKktC7oEkQv6efegROOJslm4s8yVAU_7U5hvmWZFvwSxLqc_htntRjuMvfH87I1HdNMRqlg7M0OsWh5w8mXis7xR1L1lJ2Fpou0VS3z8eT4b0I-cdd04bJ3oLDDxhkT_XioceBM1uRj2SA3NTolIchBLeUE7ro3JlYtcyhHloXi1NE_1bH5fg/s1600/image1.gif" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyt1BMbDBKktC7oEkQv6efegROOJslm4s8yVAU_7U5hvmWZFvwSxLqc_htntRjuMvfH87I1HdNMRqlg7M0OsWh5w8mXis7xR1L1lJ2Fpou0VS3z8eT4b0I-cdd04bJ3oLDDxhkT_XioceBM1uRj2SA3NTolIchBLeUE7ro3JlYtcyhHloXi1NE_1bH5fg/s1600/image1.gif" style="display: none;" /> <em>Posted by Terence Zhang – Developer Relations Engineer and Lisie Lillianfeld - Product Manager</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyt1BMbDBKktC7oEkQv6efegROOJslm4s8yVAU_7U5hvmWZFvwSxLqc_htntRjuMvfH87I1HdNMRqlg7M0OsWh5w8mXis7xR1L1lJ2Fpou0VS3z8eT4b0I-cdd04bJ3oLDDxhkT_XioceBM1uRj2SA3NTolIchBLeUE7ro3JlYtcyhHloXi1NE_1bH5fg/s1600/image1.gif"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyt1BMbDBKktC7oEkQv6efegROOJslm4s8yVAU_7U5hvmWZFvwSxLqc_htntRjuMvfH87I1HdNMRqlg7M0OsWh5w8mXis7xR1L1lJ2Fpou0VS3z8eT4b0I-cdd04bJ3oLDDxhkT_XioceBM1uRj2SA3NTolIchBLeUE7ro3JlYtcyhHloXi1NE_1bH5fg/s1600/image1.gif" /></a> <p><a href="https://support.google.com/accessibility/android/answer/6283677?hl=en" target="_self">TalkBack</a> is Android’s screen reader in the <a href="https://play.google.com/store/apps/details?id=com.google.android.marvin.talkback&amp;hl=en_US" target="_self">Android Accessibility Suite</a> that describes text and images for Android users who have blindness or low vision. The TalkBack team is always working to make Android more accessible. Today, thanks to Gemini Nano with multimodality, TalkBack automatically provides users with blindness or low vision more vivid and detailed image descriptions to better understand the images on their screen.</p> <h2><span style="font-size: x-large;">Increasing accessibility using Gemini Nano with multimodality</span></h2> <p>Advancing accessibility is a core part of Google’s mission to build for everyone. That’s why TalkBack has a feature to describe images when developers didn’t include descriptive alt text. This feature was powered by a small ML model called Garcon. However, Garcon produced short, generic responses and couldn’t specify relevant details like landmarks or products.</p> <p>The development of Gemini Nano with multimodality was the perfect opportunity to use the latest AI technology to increase accessibility with TalkBack. Now, when TalkBack users opt in on eligible devices, the screen reader uses Gemini Nano’s new multimodal capabilities to automatically provide users with clear, detailed image descriptions in apps including Google Photos and Chrome, even if the device is offline or has an unstable network connection.</p> <p>“Gemini Nano helps fill in missing information,” said Lisie Lillianfeld, product manager at Google. “Whether it’s more details about what’s in a photo a friend sent or the style and cut of clothing when shopping online.”</p> <h2><span style="font-size: x-large;">Going beyond basic image descriptions</span></h2> <p>Here’s an example that illustrates how Gemini Nano improves image descriptions: When Garcon is presented with a panorama of the Sydney, Australia shoreline at night, it might read: “Full moon over the ocean.” Gemini Nano with multimodality can paint a richer picture, with a description like: “A panoramic view of Sydney Opera House and the Sydney Harbour Bridge from the north shore of Sydney, New South Wales, Australia.”</p> <p>“It's amazing how Nano can recognize something specific. For instance, the model will recognize not just a tower, but the Eiffel Tower,” said Lisie. “This kind of context takes advantage of the unique strengths of LLMs to deliver a helpful experience for our users.”</p> <p>Using an on-device model like Gemini Nano was the only feasible solution for TalkBack to provide automatically generated detailed image descriptions for images, even while the device is offline.</p> <p>“The average TalkBack user comes across 90 unlabeled images per day, and those images weren't as accessible before this new feature,” said Lisie. The feature has gained positive user feedback, with early testers writing that the new image descriptions are a “game changer” and that it’s “wonderful” to have detailed image descriptions built into TalkBack.</p><br /> <image><div style="text-align: center;"><img alt="Gemini Nano with multimodality was critical to improving the experience for users with low vision. Providing detailed on-device image descriptions wouldn’t have been possible without it. — Lisie Lillianfeld, Product Manager at Google" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQf5vmKVusi2AFG0l_rZY1fCiWRC6gr-P4lcN7QMUSxnqj1JY0V67Y1Y2Avn0EzQ_XhjefQqgOVrPoBQIxQc6IHSrDCsZBR50xX8SmZJA2uFkbzTbKcOxjQKPAPZataZLtx25jJIv62Wdi9i43Kj-Uilh19NtZP6p3yYxFRuB0K1fDdIw7D13Qepwg2hA/s1600/image3.png" width="100%" /></div></image><br /> <h2><span style="font-size: x-large;">Balancing inference verbosity and speed</span></h2> <p>One important decision the Android accessibility team made when implementing Gemini Nano with multimodality was between inference verbosity and speed, which is partially determined by image resolution. Gemini Nano with multimodality currently accepts images in either 512 pixels or 768 pixels.</p> <p>“The 512-pixel resolution emitted its first token almost two seconds faster than 768 pixels, but the output wasn't as detailed,” said Tyler Freeman, a senior software engineer at Google. “For our users, we decided a longer, richer description was worth the increased latency. We were able to hide the perceived latency a bit by streaming the tokens directly to the text-to-speech system, so users don’t have to wait for the full text to be generated before hearing a response.”</p> <h2><span style="font-size: x-large;">A hybrid solution using Gemini Nano and Gemini 1.5 Flash</span></h2> <p>TalkBack developers also implemented a hybrid AI solution using Gemini 1.5 Flash. With this server-based AI model, TalkBack can provide the best of on-device and server-based generative AI features to make the screen reader even more powerful.</p> <p>When users want more details after hearing an automatically generated image description from Gemini Nano, TalkBack gives the user an option to listen to more by running the image through Gemini Flash. When users focus on an image, they can use a three-finger tap to open the TalkBack menu and select the “Describe Image” option to send the image to Gemini 1.5 Flash on the server and get even more details.</p> <p>By combining the unique advantages of both Gemini Nano's on-device processing with the full power of cloud-based Gemini 1.5 Flash, TalkBack provides blind and low-vision Android users a helpful and informative experience with images. The “describe image” feature powered by Gemini 1.5 Flash launched to TalkBack users on more Android devices, so even more users can get detailed image descriptions.</p> <br /> <image><div style="text-align: center;"><img alt="Animated UI example of TalkBack in action, describing a photo of a sunny view of Sydney Harbor, Australia, with the Sydney Opera House and Sydney Harbour Bridge in the frame." border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRYjwjCsu2AcISEshdOyJpUergWau2HQaJEvwg5qhW-S5WV3O773h9cyT3QO8KMy6I1NsU3Y3vbpZ3wzHux4AvKWS2PWSZ1rSxgxvrpTFF1EfqmDiBYwKaY3Lw1wtQKKZKXTFJziju-13iAvY2X8hendjqzDZ3oxe7v_lrRHAsF4NNOGSVvngn2TAu0ac/s1600/image2.gif" width="100%" /></div></image> <h2><span style="font-size: x-large;">Compact model, big impact</span></h2> <p>The Android accessibility team recommends developers looking to use the Gemini Nano with multimodality prototype and test on a powerful, server-side model first. There developers can understand the UX faster, iterate on prompt engineering, and get a better idea of the highest quality possible using the most capable model available.</p> <p>While Gemini Nano with multimodality can include missing context to improve image descriptions, it’s still best practice for developers to provide detailed alt text for all images on their apps or websites. If the alt text is not provided, TalkBack can help fill in the gaps.</p> <p>The Android accessibility team’s goal is to create inclusive and accessible features, and leveraging Gemini Nano with multimodality to provide vivid and detailed image descriptions automatically is a big step towards that. Furthermore, their hybrid approach towards AI, combining the strengths of both Gemini Nano on device and Gemini 1.5 Flash in the server, showcases the transformative potential of AI in promoting inclusivity and accessibility and highlights Google's ongoing commitment to building for everyone.</p> <h2><span style="font-size: x-large;">Get started</span></h2> <p>Learn more about <a href="https://developer.android.com/ai/aicore" target="_self">Gemini Nano</a> for app development.</p> <br /> <p><i>This blog post is part of our series: Spotlight Week on Android 15, where we provide resources — blog posts, videos, sample code, and more — all designed to help you prepare your apps and take advantage of the latest features in Android 15. You can <a href="https://android-developers.googleblog.com/2024/09/android-15-spotlight-week.html" target="_self">read more in the overview of Spotlight Week: Android 15</a>, which will be updated throughout the week.</i></p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-10102942361403210282024-09-03T11:10:00.000-07:002024-09-06T09:38:19.083-07:00Our first Spotlight Week: diving into Android 15<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR0TdhMN6h-G45zXLRmJtg6s9mqTAVE2oNBefzhJYIucR5odw5WtaVOvlIpY9shR36t1HHXi5ZEQM18fWv9TNsgpQVxnFVsRB75Qxfk96C7ognjjqs6M85D1Go18fkn2fDLGrZNC8bRR-LiQvL6wtIWyI_dwYRmIKEx4Ef5eli3wcswEW-b7DMejvOcbE/s1600/AndroidSpotlight_Android15_Blog_Card.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR0TdhMN6h-G45zXLRmJtg6s9mqTAVE2oNBefzhJYIucR5odw5WtaVOvlIpY9shR36t1HHXi5ZEQM18fWv9TNsgpQVxnFVsRB75Qxfk96C7ognjjqs6M85D1Go18fkn2fDLGrZNC8bRR-LiQvL6wtIWyI_dwYRmIKEx4Ef5eli3wcswEW-b7DMejvOcbE/s1600/AndroidSpotlight_Android15_Blog_Card.png" style="display: none;" /> <em>Posted by Aaron Labiaga- Android Developer Relations Engineer</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTydOm5voDz-5BOLceHlbNYE7m_L9xE8Ze6-UKQ3cDufxRLrO7EgtA57PALcouXbo6TtSY6c0_QGRPFSqH4igiaOf7pCHCxvMxqwhgwRZMwKSsZEuDNjJ0PBHM-JcyI_pH2_VoxNcqiTi3FbZ8GfRtasRwOAbQkbsSItQ1-4bQn-gydBHJiGbQpUzsxMg/s1600/AndroidSpotlight_Android15_Blog_Header.png"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTydOm5voDz-5BOLceHlbNYE7m_L9xE8Ze6-UKQ3cDufxRLrO7EgtA57PALcouXbo6TtSY6c0_QGRPFSqH4igiaOf7pCHCxvMxqwhgwRZMwKSsZEuDNjJ0PBHM-JcyI_pH2_VoxNcqiTi3FbZ8GfRtasRwOAbQkbsSItQ1-4bQn-gydBHJiGbQpUzsxMg/s1600/AndroidSpotlight_Android15_Blog_Header.png" /></a> <p>By now, you’ve probably heard the news: <a href="https://android-developers.googleblog.com/2024/09/android-15-is-released-to-aosp.html" target="_self">Android 15 was just released earlier today to AOSP</a>. To celebrate, we’re kicking off a new series called “Spotlight Week” where we’ll shine a light on technical areas across Android development and equip you with the tools you need to take advantage of each area.</p> <p>The Android 15 "Spotlight Week" will provide resources — blog posts, videos, sample code, and more — all designed to help you prepare your apps and take advantage of the latest features. These changes strive to improve the Android ecosystem, but updating the OS comes with potential app compatibility implications and integrations that require detailed guidance.</p> <iframe class="BLOG_video_class" allowfullscreen="" youtube-src-id="HZ5tWTtTKNo" width="100%" height="398" src="https://www.youtube.com/embed/HZ5tWTtTKNo"></iframe> <h3><b>Here’s what we’re covering this week in our Spotlight Week on Android 15:</b></h3> <ul><li><h4><span style="font-size:large;"><b>Android 15 goes to AOSP</b></span></h4></li></ul> <ul> Big news for the Android world as the latest release - <a href="https://android-developers.googleblog.com/2024/09/android-15-is-released-to-aosp.html" target="_self">Android 15 - moves to AOSP</a>.</ul> <ul><br /></ul><ul>The <a href="https://developer.android.com/about/versions/15/summary" target="_self">Android 15 summary</a> page outlines what a developer needs to know about what is new in the release, behavioral changes affecting all apps, and changes applicable only when targeting the new SDK level 35.</ul> <div><br /></div> <ul><li><h4><span style="font-size:large;"><b>Edge-to-edge</b></span></h4></li></ul> <ul><b>Tuesday, September 3:</b> To kick-off the week, a change that will most likely be impacting your app, <a href="https://developer.android.com/about/versions/15/behavior-changes-15#edge-to-edge" target="_self">Edge-to-Edge</a> are APIs that lays out your app to optimize for screen real estate. It will be <a href="https://developer.android.com/about/versions/15/behavior-changes-15#edge-to-edge" target="_self">enforced for all apps targeting Android 15</a>, making the status bar and navigation bar transparent, for a more high-quality experience. Understand how these changes will affect your app by reading the documentations linked. Learn how to work around these changes by reading the <a href="https://medium.com/androiddevelopers/insets-handling-tips-for-android-15s-edge-to-edge-enforcement-872774e8839b" target="_self">Insets handling tips for Android 15's edge-to-edge enforcement blog post</a>.</ul> <div><br /></div> <ul><li><h4><span style="font-size:large;"><b>Building for the future of Android, an in-depth <a href="https://youtu.be/YKPqjsYBFvI?si=bML2DncABZp15ssv" target="_self">video</a></b></span></h4></li></ul> <ul><b>Wednesday, Sept 4:</b> Watch now</ul><br/> <iframe class="BLOG_video_class" allowfullscreen="" youtube-src-id="YKPqjsYBFvI" width="100%" height="398" src="https://www.youtube.com/embed/YKPqjsYBFvI"></iframe> <div><br /></div> <ul><li><h4><span style="font-size:large;"><b>Foreground services and a live Android 15 Q&amp;A </b></span></h4></li></ul> <ul><b>Thursday, September 5:</b> <a href="https://developer.android.com/about/versions/15/behavior-changes-15#fgs-hardening" target="_self">Foreground services changes</a> are coming in Android 15, and we’re introducing a new foreground service type, updating the exemption scenarios that allow a foreground service to start from the background, and updating the max duration of certain foreground service types. These changes are intended to improve user experience by preventing apps from misusing foreground service that may drain a user’s battery. Plus we’ll have a live Q&amp;A: you can start submitting questions on <a href="https://x.com/AndroidDev" target="_self">X</a> using #AskAndroid or submit them in the comments in the <a href="https://www.linkedin.com/feed/update/urn:li:activity:7237081975931428865/" target="_self">LinkedIn post</a>, and tune in on <a href="https://www.youtube.com/live/pIDRLI9L_ks" target="_self">YouTube</a>.</ul><br/> <iframe class="BLOG_video_class" allowfullscreen="" youtube-src-id="pIDRLI9L_ks" width="100%" height="398" src="https://www.youtube.com/embed/pIDRLI9L_ks"></iframe> <div><br /></div> <ul><li><h4><span style="font-size:large;"><b>Passkeys and Picture-in-Picture</b></span></h4></li></ul> <ul><b>Friday, September 6:</b> <a href="https://developer.android.com/identity/sign-in/credential-manager#about-passkeys" target="_self">Passkeys</a> enable a more streamlined and secured means of authenticating your users. Learn more about passkeys through our <a href="https://github.com/android/identity-samples/tree/main/CredentialManager" target="_self">sample code</a> and about the updates made to further simplify the login process in Android 15. Plus, we're highlighting a <a href="https://developer.android.com/develop/ui/views/picture-in-picture" target="_self">Picture-in-Picture</a> <a href="https://github.com/android/platform-samples/tree/main/samples/user-interface/picture-in-picture" target="_self">sample code</a> that is applicable to apps with video functionality.</ul> <div><br /></div> <p>That’s just a taste of what we’re covering in our Spotlight Week on Android 15. Keep checking back to this blog post for updates, where we’ll be adding links and more throughout the week. Plus, follow <a href="https://x.com/Android" target="_self">Android Developers on X</a> and <a href="https://www.linkedin.com/showcase/android_by_google/" target="_self">Android by Google at Linkedin</a> throughout the week to hear even more about Android 15.</p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-37448099345369828622024-09-03T11:00:00.001-07:002024-09-03T11:48:39.175-07:00Google Maps improved download reliability by 10% using user initiated data transfer API<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx0SQUf-Z-u-qwpat9BgpA61D1bhLCBwOmE-ukIfvO-FgTy0zihtZM-iTR89cdLNK5g0E4ap-Z4UaStm6fclQHXJ7jwT3rwGNufi2k0bJesOQSmS6a3wiZuUOtsOeQsMTa1D9LbW2f8-m20wY73UltcsnMDWt9GFF1-R6wKTpBifncDFVxxd8l5lbJspM/s1600/Android_Maps_Gif_v02.gif" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx0SQUf-Z-u-qwpat9BgpA61D1bhLCBwOmE-ukIfvO-FgTy0zihtZM-iTR89cdLNK5g0E4ap-Z4UaStm6fclQHXJ7jwT3rwGNufi2k0bJesOQSmS6a3wiZuUOtsOeQsMTa1D9LbW2f8-m20wY73UltcsnMDWt9GFF1-R6wKTpBifncDFVxxd8l5lbJspM/s1600/Android_Maps_Gif_v02.gif" style="display: none;" /> <em>Posted by Alice Yuan – Developer Relations Engineer, in collaboration with Software Engineers – Matthew Valgenti and Emma Li – at Google</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx0SQUf-Z-u-qwpat9BgpA61D1bhLCBwOmE-ukIfvO-FgTy0zihtZM-iTR89cdLNK5g0E4ap-Z4UaStm6fclQHXJ7jwT3rwGNufi2k0bJesOQSmS6a3wiZuUOtsOeQsMTa1D9LbW2f8-m20wY73UltcsnMDWt9GFF1-R6wKTpBifncDFVxxd8l5lbJspM/s1600/Android_Maps_Gif_v02.gif"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx0SQUf-Z-u-qwpat9BgpA61D1bhLCBwOmE-ukIfvO-FgTy0zihtZM-iTR89cdLNK5g0E4ap-Z4UaStm6fclQHXJ7jwT3rwGNufi2k0bJesOQSmS6a3wiZuUOtsOeQsMTa1D9LbW2f8-m20wY73UltcsnMDWt9GFF1-R6wKTpBifncDFVxxd8l5lbJspM/s1600/Android_Maps_Gif_v02.gif" /></a> <h3>What is user initiated data transfer?</h3> <p>In Android 14 we introduced user-initiated data transfer jobs, or UIDT. You can use the new API <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/app/job/JobInfo.Builder#setUserInitiated%28boolean%29" target="_self">setUserInitiated</a></span> in <a href="https://developer.android.com/reference/android/app/job/JobScheduler" target="_self">JobScheduler</a> to specify that the job is a user-initiated data transfer job. This API is helpful for use cases that require long-duration (&gt;10 minutes), user-initiated transfer of data over network. UIDT is also an alternative API to using a dataSync foreground service, which has <a href="https://developer.android.com/about/versions/15/behavior-changes-15#datasync-timeout" target="_self">new timeout behavior for apps that target Android 15</a>.</p> <p>UIDT is intended to support user initiated use cases such as downloading files from a remote server, uploading files to a remote server or transferring data between two devices via Wi-Fi transport. Since the release of Android 14, the new API has been adopted by a growing number of Android apps running on hundreds of millions of user devices.</p><br/> <h3>What are the benefits if I adopt user-initiated data transfer?</h3> <p>The Android team’s extensive analysis found gaps in foreground services and WorkManager for long duration, user initiated data transfers. Although WorkManager could support retries and constraints, it could not support long duration work which are often necessary for data transfer operations. Developers also found it challenging to use foreground service, which did not provide an ideal user experience during interruption of network connectivity.</p> <p>JobScheduler’s user initiated data transfer API helps solve for these gaps by offering developers the following benefits:</p> <ul><ul> <li>Long duration, immediate background work execution that is not impacted by existing job quotas based on app standby buckets.</li></ul><ul> <li>Helps improve consistency in API behavior across all devices, and the behavior is enforced through <a href="https://source.android.com/compatibility/cts" target="_self">Compatibility Test Suite</a> (CTS).</li></ul><ul> <li>Improved reliability of data transfer compared to using a foreground service as indicated by Google Maps own benchmarks.</li></ul><ul> <li>Support for execution when certain constraints are met, such as running only on Wi-Fi or only when the device is charging.</li></ul><ul> <li>Gracefully manages job timeouts and retries.</li></ul><ul> <li>Reduced memory usage and reduced notification clutter when the app is waiting for constraints to be met.</li> </ul></ul> <p>If you’re looking to do short or interruptible background work, WorkManager is still the recommended solution. Check out <a href="https://developer.android.com/develop/background-work/background-tasks/data-transfer-options" target="_self">data transfer background task options</a> to learn more.</p> <image><div style="text-align: center;"><img alt="“We successfully launched UIDT on Android 14 in early 2024 migrating from our foreground service implementation. After a retroactive analysis on Android 14 vs Android 13 implementation, we now see a 10%+ improvement in download failure rate of offline downloads!”- Matthew Valgenti, Software Engineer at Google" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBpu4XMrcSUTGCF880NYxJVljC0Q42z0WDtkI-c2jBZSw2Hb8t-BdFVWBPBwQNbOcj5o-6Q_6BDD-x0kZx9BZgSjdYr_SCVOswno8d5Dev8QfL83b8Q3ZICm48OYGq3NPf69spDMK1DmSEvwZXoNs3g5CURBVVgkMwqYzUSP5ASnL2GGRwloBxAyPzS-w/s1600/Android_Maps_QuoteCard_01.png" width="100%" /></div></image><br /> <h3>Google Maps successfully launched UIDT and saw improvement in download reliability!</h3> <p>Google Maps decided to use UIDT for their offline maps download use case. This use case ensures that users are able to download offline maps so they have map data even when they lose network connectivity.</p> <h4><span style="font-size: large;"><i>What was Google Maps’ main motivation for adopting UIDT?</i></span></h4> <p>Google Maps decided to adopt UIDT to ensure that the download service works with the latest Android releases and continues to be reliable and efficient.</p> <blockquote><i>“We implemented several features and optimizations, such as resumable downloads so that if a user's internet connection is interrupted or they exit the app before the download is complete, the download resumes from where it left off when the user returns to the app or their connection is restored.”</i> - Emma Li, Software Engineer at Google</blockquote> <h4><span style="font-size: large;"><i>What is the trigger point to start UIDT in Google Maps?</i></span></h4> <p>The UIDT is triggered when a user decides to download a map region to have that data offline. When a user hits download, the UIDT is triggered immediately and processing of the region begins as soon as possible.</p> <h4><span style="font-size: large;"><i>What were Google Maps’ adoption results?</i></span></h4> <p>Google Maps rolled out the project using experiment flags to understand metrics impact after each ramp stage.</p> <blockquote><i>“We successfully launched UIDT on Android 14 in early 2024 migrating from our foreground service implementation. After a retroactive analysis on Android 14 vs Android 13 implementation, <b>we now see a 10%+ improvement in download failure rate of offline downloads!</b>” </i>- Matthew Valgenti, Software Engineer at Google</blockquote><br/> <h3>How do I get started implementing user initiated data transfer API?</h3> <p>In order to adopt user initiated data transfer, you will need to integrate with the JobScheduler platform API and gate the change to Android 14 or higher.</p> <p>Check out the following developer documentation to get started with user initiated data transfer:</p> <ul><ul> <li><a href="https://developer.android.com/develop/background-work/background-tasks/uidt" target="_self">Integrate user initiated data transfer</a> on how to integrate setUserInitiated API.</li></ul><ul> <li><a href="https://developer.android.com/develop/background-work/background-tasks/data-transfer-options" target="_self">Data transfer background task options</a> on what APIs to use depending on your data transfer use case.</li></ul><ul> <li>Check out <a href="https://developer.android.com/about/versions/15/" target="_self">Android 15 documentation</a> to learn more about A15 behavior changes.</li> </ul></ul><br/> <p><i>This blog post is part of our series: Spotlight Week on Android 15, where we provide resources — blog posts, videos, sample code, and more — all designed to help you prepare your apps and take advantage of the latest features in Android 15. You can <a href="https://android-developers.googleblog.com/2024/09/android-15-spotlight-week.html" target="_self">read more in the overview of Spotlight Week: Android 15</a>, which will be updated throughout the week.</i></p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-16090758447942243952024-09-03T11:00:00.000-07:002024-09-03T11:15:12.752-07:00Android 15 is released to AOSP<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSsm-VOSXQxga12qPriOIQUpFTJkoDhU_0lOXT0OV8sHHtFcMa8UrEfWD9k396_CCw5GFI3Hwm9dBTCu37JISVih_GuX5fNISgTG3RAOIaZkN7D_YqVQio-KlOm9zEz6ieWvsFzY1bIQ8popBkgQb4wPWY0MRU8tkjsEnNncKVzLfOj5gACe_UoEqTMeY/s1600/android15black.max-1920x1070.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSsm-VOSXQxga12qPriOIQUpFTJkoDhU_0lOXT0OV8sHHtFcMa8UrEfWD9k396_CCw5GFI3Hwm9dBTCu37JISVih_GuX5fNISgTG3RAOIaZkN7D_YqVQio-KlOm9zEz6ieWvsFzY1bIQ8popBkgQb4wPWY0MRU8tkjsEnNncKVzLfOj5gACe_UoEqTMeY/s1600/android15black.max-1920x1070.png" style="display: none;" /> <em> Posted by Matthew McCullough – VP of Product Management, Android Developer</em> <div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSsm-VOSXQxga12qPriOIQUpFTJkoDhU_0lOXT0OV8sHHtFcMa8UrEfWD9k396_CCw5GFI3Hwm9dBTCu37JISVih_GuX5fNISgTG3RAOIaZkN7D_YqVQio-KlOm9zEz6ieWvsFzY1bIQ8popBkgQb4wPWY0MRU8tkjsEnNncKVzLfOj5gACe_UoEqTMeY/s1600/android15black.max-1920x1070.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1024" data-original-width="1024" height="416" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSsm-VOSXQxga12qPriOIQUpFTJkoDhU_0lOXT0OV8sHHtFcMa8UrEfWD9k396_CCw5GFI3Hwm9dBTCu37JISVih_GuX5fNISgTG3RAOIaZkN7D_YqVQio-KlOm9zEz6ieWvsFzY1bIQ8popBkgQb4wPWY0MRU8tkjsEnNncKVzLfOj5gACe_UoEqTMeY/w640-h416/android15black.max-1920x1070.png" width="640" /></a> <p>Today we're releasing Android 15 and making the source code available at the <a href="https://source.android.com/" target="_self">Android Open Source Project</a>&nbsp;(AOSP). Android 15 will be available on supported Pixel devices in the coming weeks, as well as on select devices from Samsung, Honor, iQOO, Lenovo, Motorola, Nothing, OnePlus, Oppo, realme, Sharp, Sony, Tecno, vivo, and Xiaomi in the coming months.</p> <p>We're proud to continue our work in open source through the AOSP. Open source allows anyone to build upon and contribute to Android, resulting in devices that are more diverse and innovative. You can leverage your app development skills in <a href="https://developer.android.com/studio" target="_self">Android Studio</a> with <a href="https://developer.android.com/compose" target="_self">Jetpack Compose</a> to create applications that thrive across the entire ecosystem. You can even <a href="https://cs.android.com/" target="_self">examine the source code</a> for a deeper understanding of how Android works.</p> <a id="improving-developer-experience"></a> <p>Android 15 continues our mission of building a <a href="#privacy-and-security-enhancements">private and secure</a> platform that helps <a href="#improving-developer-experience">improve your productivity</a> while giving you new capabilities to produce <a href="#improving-typography-and-internalization">beautiful apps</a>, <a href="#camera-and-media-improvements">superior media and camera experiences</a>, and an intuitive <a href="#improving-user-experience">user experience</a>, particularly on tablets and foldables.</p> <p>Starting today, we're kicking off a new educational series called <a href="https://android-developers.googleblog.com/2024/09/android-15-spotlight-week.html" target="_self">Spotlight Weeks</a>, where we dive into technical topics across Android, beginning with a week of content on Android 15. <a href="https://android-developers.googleblog.com/2024/09/android-15-spotlight-week.html" target="_self">Check out what we'll be covering</a> throughout the week, as well as today's deep dive into <a href="https://medium.com/androiddevelopers/insets-handling-tips-for-android-15s-edge-to-edge-enforcement-872774e8839b" target="_self">edge-to-edge</a>.</p> <h2>Improving your developer experience</h2> <p>While most of our work to improve your productivity centers around tools like <a href="https://developer.android.com/studio" target="_self">Android Studio</a>, <a href="https://developer.android.com/jetpack/compose" target="_self">Jetpack Compose</a>, and the <a href="https://developer.android.com/jetpack" target="_self">Android Jetpack</a> libraries, each new Android platform release includes quality-of-life updates to improve the development experience. For example, Android 15 gives you new insights and telemetry to allow you to further tune your app experience, so you can make changes that improve the way your app runs on any platform release.</p> <ul><ul> <li>The <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/app/ApplicationStartInfo" target="_self">ApplicationStartInfo</a></span> API helps provide insight into your app startup including the startup reason, time spent in launch phases, start temperature, and more.</li></ul><ul> <li>The <span style="font-family: Courier;"><a href="https://developer.android.com/reference/androidx/core/os/Profiling" target="_self">Profiling</a></span> class within Android Jetpack, streamlining the use of the new <span style="font-family: Courier;"><a href="https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothProfileManager" target="_self">ProfilingManager</a></span> API in Android 15, lets your app request <a href="https://developer.android.com/reference/androidx/core/os/HeapProfileRequestBuilder" target="_self">heap profiles</a>, <a href="https://developer.android.com/reference/androidx/core/os/JavaHeapDumpRequestBuilder" target="_self">heap dumps</a>, <a href="https://developer.android.com/reference/androidx/core/os/StackSamplingRequestBuilder" target="_self">stack samples</a>, or <a href="https://developer.android.com/reference/androidx/core/os/SystemTraceRequestBuilder" target="_self">system traces</a>, enabling a new way to collect telemetry about how your app runs on user devices.</li></ul><ul> <li>The <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/app/usage/StorageStats#getAppBytesByDataType%28int%29" target="_self">StorageStats.getAppBytesByDataType([type])</a></span> API gives you new insights into how your app is using storage, including apk file splits, ahead-of-time (AOT) and speedup related code, dex metadata, libraries, and guided profiles.</li></ul><ul> <li>The <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/graphics/pdf/PdfRenderer" target="_self">PdfRenderer APIs</a></span> now include capabilities to incorporate advanced features such as rendering <a href="https://developer.android.com/reference/android/graphics/pdf/LoadParams" target="_self">password-protected files</a>, annotations, <a href="https://developer.android.com/reference/android/graphics/pdf/models/FormEditRecord" target="_self">form editing</a>, <a href="https://developer.android.com/reference/android/graphics/pdf/PdfRenderer.Page#searchText%28java.lang.String%29" target="_self">searching</a>, and <a href="https://developer.android.com/reference/android/graphics/pdf/PdfRenderer.Page#selectContent%28android.graphics.pdf.models.selection.SelectionBoundary,%20android.graphics.pdf.models.selection.SelectionBoundary,%20boolean%29" target="_self">selection</a> with copy. Linearized PDF optimizations are supported to speed local PDF viewing and reduce resource use. The <a href="https://developer.android.com/jetpack/androidx/releases/pdf" target="_self">Jetpack PDF library</a> uses these APIs to simplify adding PDF viewing capabilities to your app, with planned support for older Android releases.</li></ul><ul> <a id="improving-typography-and-internalization"></a> <li>Newly-added OpenJDK APIs include support for additional <a href="https://developer.android.com/sdk/api_diff/v-dp2-incr/changes/java.lang.Math" target="_self">math</a>/<a href="https://developer.android.com/sdk/api_diff/v-dp2-incr/changes/java.lang.StrictMath" target="_self">strictmath</a> methods, many <a href="https://developer.android.com/sdk/api_diff/v-dp2-incr/changes/pkg_java.util" target="_self">util updates</a> including sequenced <a href="https://developer.android.com/reference/java/util/SequencedCollection" target="_self">collection</a>/<a href="https://developer.android.com/reference/java/util/SequencedMap" target="_self">map</a>/<a href="https://developer.android.com/reference/java/util/SequencedSet" target="_self">set</a>, <a href="https://developer.android.com/sdk/api_diff/v-dp2-incr/changes/java.util.zip.Deflater" target="_self">ByteBuffer support in Deflater</a>, and <a href="https://developer.android.com/sdk/api_diff/v-dp2-incr/changes/pkg_java.security.spec" target="_self">security key updates</a>. These APIs are updated on <a href="https://android-developers.googleblog.com/2023/11/the-secret-to-androids-improved-memory-latest-android-runtime-update.html" target="_self">over a billion devices running Android 12+ through Android 15 through Google Play system updates</a>, so you can broadly take advantage of the latest programming features.</li></ul><ul> <li>Newly added SQLite APIs include support for <a href="https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteDatabase?hl=en#begintransactionreadonly" target="_self">read-only deferred transactions</a>, new ways to retrieve the count of <a href="https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteDatabase?hl=en#getlastchangedrowcount" target="_self">changed rows</a> or the <a href="https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteDatabase?hl=en#getlastinsertrowid" target="_self">last inserted row ID</a> without issuing an additional query, and direct support for <a href="https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteDatabase?hl=en#createrawstatement" target="_self">raw SQLite statements</a>.</li></ul><ul> <li>Android 15 adds new Canvas drawing capabilities, including <a href="https://developer.android.com/reference/android/graphics/Matrix44" target="_self">Matrix44</a> to help manipulate the Canvas in 3D and <a href="https://developer.android.com/reference/android/graphics/Canvas#clipShader%28android.graphics.Shader%29" target="_self">clipShader</a>/<a href="https://developer.android.com/reference/android/graphics/Canvas#clipOutShader%28android.graphics.Shader%29" target="_self">clipOutShader</a> to enable complex shapes by intersecting either the current shader or a difference of the current shader.</li> </ul></ul> <h2>Improving typography and internationalization</h2> <p>Android helps you make beautiful apps that work well across the global diversity of the Android ecosystem.</p> <ul><ul> <li>You can now create a <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/graphics/fonts/FontFamily" target="_self">FontFamily</a></span> instance from variable fonts in Android 15 without having to specify <b>wght</b> and <b>ital</b> axes using the <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/graphics/fonts/FontFamily.Builder#buildVariableFamily%28%29" target="_self">buildVariableFamily</a></span> API; the text renderer will automatically adjust the values of the <b>wght</b> and <b>ital</b> axes to match the displaying text with compatible fonts.</li></ul><ul> <a id="camera-and-media-improvements"></a> <li>The font file in Android 15 for Chinese, Japanese, and Korean (CJK) languages, <a href="https://developer.android.com/about/versions/15/features#cjk-variable-font" target="_self">NotoSansCJK</a>, is now a variable font, opening up new possibilities for creative typography.</li></ul><ul> <li>Android 15 <a href="https://developer.android.com/about/versions/15/features#hentaigana-font" target="_self">bundles the old Japanese Hiragana (also known as Hentaigana) font</a> by default, helping add a distinctive flair to design while preserving more accurate transmission and understanding of ancient Japanese documents.</li></ul><ul> <li><a href="https://developer.android.com/reference/android/text/Layout#JUSTIFICATION_MODE_INTER_CHARACTER" target="_self">JUSTIFICATION_MODE_INTER_CHARACTER</a> in Android 15 improves justification for languages that use white space for segmentation such as Chinese and Japanese.</li> </ul></ul> <h2>Camera and media improvements</h2> <p>Each Android release helps you bring superior media and camera experiences to your users.</p> <ul><ul> <li>For screens that contain both HDR and SDR content, Android 15 allows you to control the HDR headroom with <span style="font-family: Courier;"><a href="https://developer.android.com/reference/kotlin/android/view/Window?hl=en#setdesiredhdrheadroom" target="_self">setDesiredHdrHeadroom</a></span> to prevent SDR content from appearing too washed-out.</li></ul><ul> <li>Android 15 supports intelligently adjusting audio loudness and dynamic range compression levels for apps with AAC audio content that contains loudness metadata so that audio levels can adapt to user devices and surroundings. To enable, instantiate a <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/media/LoudnessCodecController" target="_self">LoudnessCodecController</a></span> with the audio session ID from the associated <a href="https://developer.android.com/reference/android/media/AudioTrack" target="_self">AudioTrack</a>.</li></ul><ul> <a id="improving-user-experience"></a> <li><a href="https://developer.android.com/about/versions/15/features/low-light-boost" target="_self">Low Light Boost</a> in Android 15 adjusts the exposure of the Preview stream in low-light conditions, enabling enhanced image previews, scanning QR codes in low light, and more.</li></ul><ul> <li>Advanced flash strength adjustments in Android 15 enable precise control of flash intensity in both <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL" target="_self">SINGLE</a> and <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#FLASH_TORCH_STRENGTH_DEFAULT_LEVEL" target="_self">TORCH</a> modes while capturing images.</li></ul><ul> <li>Android 15 extends Universal MIDI Packets support to virtual MIDI apps, enabling composition apps to control synthesizer apps as a <a href="https://developer.android.com/reference/android/media/midi/MidiUmpDeviceService" target="_self">virtual MIDI 2.0 device</a> just like they would with an USB MIDI 2.0 device.</li> </ul></ul> <h2>Improving the user experience</h2> <p>We continue to refine the Android user experience with every release, while working to improve performance and battery life. Here is just some of what Android 15 brings to make the experience more intuitive, performant, and accessible.</p> <ul><ul> <li>Users can save their favorite split-screen app combinations for quick access and pin the taskbar on screen to quickly switch between apps for <a href="https://developer.android.com/about/versions/15/features#large-screen-multitasking" target="_self">better large screen multitasking</a> on Android 15; making sure your <a href="https://io.google/2024/explore/d16737ba-e336-4b68-8928-24692a88e644/" target="_self">app is adaptive</a> is more important than ever.</li></ul><ul> <li>Android 15 defaults to displaying apps <a href="https://developer.android.com/about/versions/15/behavior-changes-15#window-insets" target="_self">edge-to-edge</a> when they target SDK 35. Also, the system bars will be transparent or translucent and content will draw behind by default. To ensure your app is ready check out "<a href="https://developer.android.com/develop/ui/views/layout/edge-to-edge#handle-overlaps" target="_self">Handle overlaps using insets</a>" (Views) or <a href="https://developer.android.com/develop/ui/compose/layouts/insets" target="_self">Window insets in Compose</a>. Also <a href="https://developer.android.com/develop/ui/compose/layouts/insets#inset-handling" target="_self">many of the Material 3 composables</a> help handle insets for you.</li></ul><ul> <li>Android 15 enables <a href="https://developer.android.com/guide/topics/ui/accessibility/testing#talkback" target="_self">TalkBack</a> to support Braille displays that are using the HID standard over both USB and secure Bluetooth to help Android support a wider range of Braille displays.</li></ul><ul> <li>On supported Android 15 devices,&nbsp;<span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/nfc/NfcAdapter" target="_self">NfcAdapter</a></span> allows apps to request <a href="https://developer.android.com/reference/android/nfc/NfcAdapter#setObserveModeEnabled%28boolean%29" target="_self">observe mode</a> as well as register filters, enabling one-tap transactions in many cases across multiple NFC capable apps.</li></ul><ul> <li>Apps can <a href="https://developer.android.com/reference/android/view/WindowManager#COMPAT_SMALL_COVER_SCREEN_OPT_IN" target="_self">declare a property</a> to allow your Application or Activity to be presented on the small cover screens of supported flippable devices.</li></ul><ul> <li>Android 15 greatly enhances <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/app/AutomaticZenRule" target="_self">AutomaticZenRules</a></span> to allow apps to further customize Attention Management (Do Not Disturb) rules by adding types, icons, trigger descriptions, and the ability to trigger <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/service/notification/ZenDeviceEffects" target="_self">ZenDeviceEffects</a></span>.</li></ul><ul> <li>Android 15 now includes OS–level support for app archiving and unarchiving. Archiving removes the APK and any cached files, but persists user data and returns the app as displayable through the <span style="font-family: Courier;"><a href="https://developer.android.com/reference/android/content/pm/LauncherApps" target="_self">LauncherApps</a></span> APIs, and the original installer can restore it upon a request to <a href="https://developer.android.com/reference/android/content/pm/PackageInstaller#requestUnarchive%28java.lang.String,%20android.content.IntentSender%29" target="_self">unarchive</a>.</li></ul><ul> <a id="privacy-and-security-enhancements"></a> <li>Foreground services change on Android 15 as part of our work to improve battery life and multitasking performance, including <a href="https://developer.android.com/about/versions/15/behavior-changes-15#datasync-timeout" target="_self">data sync timeouts</a>, a <a href="https://developer.android.com/about/versions/15/behavior-changes-15#mediaprocessing-fgs-type" target="_self">new media processing foreground service type</a>, and <a href="https://developer.android.com/about/versions/15/behavior-changes-15#fgs-boot-completed" target="_self">restrictions on launching foreground services from <span style="font-family: Courier;">BOOT_COMPLETED</span></a> and <a href="https://developer.android.com/about/versions/15/behavior-changes-15#fgs-sysalert" target="_self">while an app holds the <span style="font-family: Courier;">SYSTEM_ALERT_WINDOW</span> permission</a>.</li></ul><ul> <li>Beginning with Android 15, <a href="https://android-developers.googleblog.com/2024/08/adding-16-kb-page-size-to-android.html" target="_self">16 KB page size support will be available</a> on select devices as a developer option. When Android uses this larger page size, our initial testing shows an <a href="https://developer.android.com/guide/practices/page-sizes#benefits" target="_self">overall performance boost of 5-10%</a> while using ~9% additional memory. </li> </ul></ul> <h2>Privacy and security enhancements</h2> <p>Privacy and security are at the core of everything we do, and we work to make meaningful improvements to protect your apps and our users with each platform release.</p> <ul><ul> <li><a href="https://developer.android.com/about/versions/15/features#private-space" target="_self">Private space</a> in Android 15 lets users create a separate space on their device where they can keep sensitive apps away from prying eyes, under an additional layer of authentication. <a href="https://developer.android.com/about/versions/15/behavior-changes-all#private-space-changes" target="_self">Some types of apps</a> such as <a href="https://developer.android.com/about/versions/15/behavior-changes-all#private-space-medical-apps" target="_self">medical apps</a>, <a href="https://developer.android.com/about/versions/15/behavior-changes-all#private-space-launcher-apps" target="_self">launcher apps</a>, and <a href="https://developer.android.com/about/versions/15/behavior-changes-all#private-space-app-store-apps" target="_self">app stores</a> may need to take additional steps to function as expected in a user's private space.</li></ul><ul> <li>Android 15 supports <a href="https://developer.android.com/identity/sign-in/single-tap-biometric" target="_self">sign-in using passkeys with a single tap</a>, as well as support to <a href="https://developer.android.com/identity/autofill/credential-manager-autofill" target="_self">autofill saved credentials</a> to relevant input fields.</li></ul><ul> <li>Android 15 adds <a href="https://developer.android.com/reference/android/view/WindowManager#addScreenRecordingCallback%28java.util.concurrent.Executor,%20java.util.function.Consumer%3Cjava.lang.Integer%3E%29" target="_self">support for apps</a> to detect that they are being recorded so that you can inform the user that they're being recorded if your app is performing a sensitive operation.</li></ul><ul> <li>Android 15 adds the <a href="https://developer.android.com/guide/topics/manifest/application-element#allowCrossUidActivitySwitchFromBelow" target="_self"><span style="font-family: courier;">allowCrossUidActivitySwitchFromBelow</span></a> attribute that blocks apps that don't match the top UID on the stack from launching activities to help prevent <a href="https://developer.android.com/about/versions/15/behavior-changes-15#block_apps_that_dont_match_the_top_uid_on_the_stack_from_launching_activities" target="_self">task hijacking attacks</a>. </li></ul><ul> <li><span style="color: #0d904f; font-family: courier;">PendingIntent</span> creators <a href="https://developer.android.com/guide/components/activities/background-starts" target="_self">block background activity launches</a> by default in Android 15 to help prevent apps from accidentally creating a <span style="color: #0d904f; font-family: courier;">PendingIntent</span> that could be abused by malicious actors.</li> </ul></ul> <h2>Get your apps, libraries, tools, and game engines ready!</h2> <p>If you develop an SDK, library, tool, or game engine, it's particularly important to prepare any necessary updates immediately to prevent your downstream app and game developers from being blocked by compatibility issues and allow them to target the latest SDK features. Please let your developers know if updates are needed to fully support Android 15.</p> <p>Testing your app involves installing your production app using Google Play or other means onto a device or emulator running Android 15. Work through all your app's flows and look for functional or UI issues. Review the <a href="https://developer.android.com/about/versions/15/behavior-changes-all" target="_self">behavior changes</a> to focus your testing. Here are several changes to consider that apply even if you don't yet target Android 15:</p> <ul><ul> <li><a href="https://developer.android.com/about/versions/15/behavior-changes-all#enhanced-stop-states" target="_self">Package stopped state changes</a> - Android 15 updates the behavior of the package <span style="color: #0d904f; font-family: Courier;"> FLAG_STOPPED</span> state to keep apps stopped until the user launches or indirectly interacts with the app.</li></ul><ul> <li><a href="https://developer.android.com/about/versions/15/behavior-changes-all#16-kb" target="_self">Support for 16KB page sizes</a> - Beginning with Android 15, 16 KB page size support will be available on select devices as a developer option. Additionally, Android Studio also offers an emulator system image with 16 KB support through the SDK manager. If your app or library uses the NDK, either directly or indirectly through a library, you can use the developer option in the QPR beta or the Android 15 emulator system image to test and fix applications to prepare for Android devices with 16 KB page sizes in the near future.</li></ul><ul> <li><a href="https://developer.android.com/about/versions/15/behavior-changes-all#private-space-changes" target="_self">Private space support</a> - Test that your app/library works when installed in a private space; we have guidance for <a href="https://developer.android.com/about/versions/15/behavior-changes-all#private-space-medical-apps" target="_self">medical apps</a>, <a href="https://developer.android.com/about/versions/15/behavior-changes-all#private-space-launcher-apps" target="_self">launcher apps</a>, and <a href="https://developer.android.com/about/versions/15/behavior-changes-all#private-space-app-store-apps" target="_self">app stores</a>.</li></ul><ul> <li><a href="https://developer.android.com/about/versions/15/behavior-changes-all#png-emoji-font" target="_self">Removed legacy emoji font file</a> - Some Android 15 devices such as Pixel will no longer have the bitmap NotoColorEmojiLegacy.ttf file included for compatibility since Android 13 and will only have the default vector file.</li> </ul></ul> <p>Please thoroughly exercise libraries and SDKs that your app is using during your compatibility testing. You may need to update to current SDK versions or reach out to the developer for help if you encounter any issues.</p> <p>Once you’ve published the Android 15-compatible version of your app, you can start the <a href="https://developer.android.com/about/versions/15/migration#setup_sdk" target="_self">process</a> to <a href="https://developer.android.com/distribute/best-practices/develop/target-sdk" target="_self">update your app's <span style="font-family: Courier;">targetSdkVersion</span></a>.</p> <h2>App compatibility</h2> <p>We’re working to make updates faster and smoother with each platform release by prioritizing app compatibility. In Android 15 we’ve made most app-facing changes opt-in until your app targets SDK version 35. This gives you more time to make any necessary app changes.</p> <p>To make it easier for you to test the opt-in changes that can affect your app, based on your feedback we’ve made many of them toggleable again this year. With the toggles, you can force-enable or disable the changes individually from Developer options or adb. <a href="https://developer.android.com/about/versions/15/reference/compat-framework-changes" target="_self">Check out how to do this, here</a>.</p> <image><div style="text-align: center;"><img alt="App compatibility toggles in Developer Options on Android 15" border="0" height="400" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw7alNgfrYaJ9IQ3O8zP5PseG7A1kN74xpYiaBrrw-ztMUg8jN1nj7iSh3w6g12sIDwJVTLXP8c3QD30ITrAOu6iicYNkIEHF_N9hJS84pf2q0vbOYzYOM2DEkHdo0BySXrelYGMc0vZVW8dbwccPgiB29EGIp1vN6a_w05nJUKf5t9blnXMNSSu4qlEM/w325-h400/image1.png" width="325" /></div><imgcaption><center><em>App compatibility toggles in Developer Options</em></center></imgcaption></image><br /> <p>To help you migrate your app to target Android 15, the <a href="https://developer.android.com/build/sdk-upgrade-assistant" target="_self">Android SDK Upgrade Assistant</a> within the latest Android Studio Koala Feature Drop release now covers android 15 API changes and walks you through the steps to upgrade your <span style="color: #0d904f; font-family: Courier;">targetSdkVersion</span>.</p> <image><div style="text-align: center;"><img alt="Android SDK upgrade assistant in Android Studio Koala feature drop" border="0" height="400" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4xAlAmJwx2A9aSCNHbtD2reHc5usnUdIq55im38vzHNt9fPav1F-lliPU5JgwXIW9xd0NhQ5W2As7ZmHpxapdJSxIXUq8lTh78Dpeyf1lYM8B6sjzQiFjYjrM9NKZQw2iuTP1PFDFILbxYVoJuBZ-hvPSl2muXmcJxHKMNDSZlAlUmK0iBvw-ofY3ZgU/s1600/image2.png" width="100%" /></div><imgcaption><center><em>Android SDK upgrade assistant in Android Studio Koala feature drop</em></center></imgcaption></image><br /> <h2>Get started with Android 15</h2> <p>If you have a supported Pixel device, you will receive the public Android 15 over the air update when it becomes available. If you don't want to wait, you can get the most recent quarterly platform release (QPR) beta by joining the <a href="https://developer.android.com/about/versions/15/get-qpr1" target="_self">Android 15 QPR beta program</a> at any time.</p> <p>If you're already in the <a href="https://developer.android.com/about/versions/15/get-qpr1" target="_self">QPR beta program</a> on a Pixel device that supports the next Android release, you'll likely have been offered the opportunity to install the first Android 15 QPR beta update. If you want to opt-out of the beta program without wiping your device, don't install the beta and instead wait for an update to the release version when it is made available on your Pixel device. Once you've applied the stable release update, you can opt out without a data wipe as long as you don't apply the next beta update.</p> <p>Stay tuned for the next five days of our <a href="https://android-developers.googleblog.com/2024/09/android-15-spotlight-week.html" target="_self">Spotlight Week on Android 15</a>, where we'll be covering topics like <a href="https://medium.com/androiddevelopers/insets-handling-tips-for-android-15s-edge-to-edge-enforcement-872774e8839b" target="_self">edge-to-edge</a>, passkeys, updates to foreground services, picture-in-picture, and more. Follow along on our <a href="https://android-developers.googleblog.com/" target="_self">blog</a>, <a href="https://x.com/androiddev" target="_self">X</a>, <a href="https://www.linkedin.com/showcase/androiddev/" target="_self">LinkedIn</a> or <a href="http://www.youtube.com/androiddevelopers" target="_self">YouTube</a> channels. Thank you again to everyone who participated in our Android developer preview and beta program. We're looking forward to seeing how your apps take advantage of the updates in Android 15.</p> <p>For complete information, visit the <a href="https://developer.android.com/about/versions/15" target="_self">Android 15 developer site</a>.</p><br /> <p><small><i>Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.</i></small></p> </div>Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-52088046786547146472024-09-03T06:00:00.000-07:002024-09-03T06:35:36.763-07:00#WeArePlay | Estante Mágica, the app helping kids publish their own books<meta name="twitter:image" content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNrZUz7AsjqnFhJZ3BiBy2mDVmKO6hCv66KtgSq7vZtgt9ZZiljd7_JNFJEyuOg7tF1HfYqOqSnW6MQLRoYOaPalEg4vC4XVwstTgXz-hzYmzqeAGmEmZ4R56DNL8UtllCGOoCkVcCpkE73wue1m40mPu2tHjPirvMwBMZiQZARYWiMRlhYRkmTfwfaZM/s1600/%23WeArePlay%20Social%20.png"> <img style="display:none" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNrZUz7AsjqnFhJZ3BiBy2mDVmKO6hCv66KtgSq7vZtgt9ZZiljd7_JNFJEyuOg7tF1HfYqOqSnW6MQLRoYOaPalEg4vC4XVwstTgXz-hzYmzqeAGmEmZ4R56DNL8UtllCGOoCkVcCpkE73wue1m40mPu2tHjPirvMwBMZiQZARYWiMRlhYRkmTfwfaZM/s1600/%23WeArePlay%20Social%20.png"> <p><em>Posted by Robbie McLachlan, Developer Marketing</em><p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik4qrvAXEbwjc73FqR0tLgTgjSzdsYGxfiWG8MDOX0ATzF7xhnycsjl_KyDcxZoGZx7uiGPcAi8C-ByRwvTjgkOqVI6uGQZ0jg2VML-56P7fZlIkSMVA7XnEN0t406X67IlMJPXc2iVNUlJC0DclM-ITEJ71bTaDSQJ-wii2mwXdfnMAjZLoAVO2a0vWU/s1600/Android%20Devs%20_%20Google%20Devs%20-Blog_Header_1200x600.jpg" imageanchor="1" ><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik4qrvAXEbwjc73FqR0tLgTgjSzdsYGxfiWG8MDOX0ATzF7xhnycsjl_KyDcxZoGZx7uiGPcAi8C-ByRwvTjgkOqVI6uGQZ0jg2VML-56P7fZlIkSMVA7XnEN0t406X67IlMJPXc2iVNUlJC0DclM-ITEJ71bTaDSQJ-wii2mwXdfnMAjZLoAVO2a0vWU/s1600/Android%20Devs%20_%20Google%20Devs%20-Blog_Header_1200x600.jpg" data-original-width="1058" data-original-height="800" /></a> <p>In our latest film for <a href="https://play.google.com/console/about/weareplay/" target="_self">#WeArePlay</a>, which celebrates the people behind apps and games, we meet Robson from Rio de Janeiro, Brazil. As the co-founder of <a href="https://play.google.com/store/apps/details?id=br.com.estantemagica.simplificacao.app" target="_self">Estante Mágica</a>, he created an app that turns kids into published authors, sparking their imagination and love for reading. Robson's journey from the favelas to creating a platform that inspires millions of young minds is helping to revolutionize education in Brazil. Discover how Estante Mágica is making a lasting impact on education, one story at a time.</p><br/> <iframe class="BLOG_video_class" allowfullscreen="" youtube-src-id="GXngpeOx84c" width="100%" height="398" src="https://www.youtube.com/embed/GXngpeOx84c"></iframe><br/> <h4><span style="font-size:large;">What was the inspiration behind Estante Mágica?</span></h4> <p>It’s a combination of my personal journey and a deep belief in the transformative power of education. Growing up in the Rocinha favela, I saw first-hand how education could change lives — my illiterate grandparents always believed that education was the key to real change, and passed that belief down to me. I wanted to create a tool that nurtures literacy so I teamed up with my friend Pedro to create Estante Mágica.</p> <p>Estante Mágica, which translates to "Magic Bookshelf," is our way of giving every child the chance to become an author, create something magical that they can be proud of, and to see their own imagination come to life. We designed the app to be a bridge, reaching not just urban schools but also rural and underserved communities, including indigenous villages and areas with fewer resources.</p> <h4><span style="font-size:large;">Can you tell us about a moment that showed you the power of Estante Mágica?</span></h4> <p>Recently, I visited a school in a small village in Rio de Janeiro. The principal apologized for being late to our meeting, explaining that she had just met with a father and mother who wanted to enroll in adult education classes. When she asked them why they wanted to learn to read and write in their 30s and 40s, they told her, "Our son wrote a book here last year, and we don't know how to read it. It's our dream to be able to read the book our son wrote." That moment hit me hard. It was proof that our app isn’t just about helping kids become authors; it's about inspiring entire families to embrace literacy and education.</p> <image><div style="text-align: center;"><img id="imgFull" alt="Founder of Estante Magica, Robson Omelo, taking a photo of a child particiopating on Autograph Day" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVR2aF-SdMaIaozT8c7ZtH4TmNhq38hOhV4BVw7zLZIwTZeLpk1scYjkQQpHZdLn808eWHGO8NNNcSNUW8whXIkgsiYAezD1_lrwWcve9dbMjIcIuBYbvka5ZlCfQQ1dnW82P38nArjZVwaXd8Fp0fa8K5lX4q2G5xFStL3VMZ8x3-zhiu97SX_vPBbiE/s1600/07_BRAZIL_ESTANTE%20MA%CC%81GICA_COFOUNDER_ROBSON%20MELO.jpg" width="100%"/></div></image> <div><br/></div> <h4><span style="font-size:large;">Tell us about the Autograph Days</span></h4> <p>These events are held at schools and are all about celebrating the young authors who have created their own books. Each child receives a printed copy of their book, and the day is set up just like a traditional book signing event. The event is not only about the children’s hard work but also a moment of pride for parents and teachers, who see the joy and confidence this experience brings to the kids. </p> <image><div style="text-align: center;"><img id="imgFull" alt="image of the Estante Magica app on a mobile device" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIE5psnah9rbzYmxhqB7OuWx2hNslBtOG92fgdROGV3FqWYQT7N-UVgzHx-53Pb8at3pzNCqIWtjKSM_iE3aQjqmaki27iNCO1SgxtUG-SEVImJFm7KZ_1kilAxA5qti9rtocyNhIu-Chdpl8zxtGotppFQxhY-whcf42q3X6dw_hccwF_daN54-69vR4/s1600/12_BRAZIL_ESTANTE%20MA%CC%81GICA_APPSHOT.png" width="100%"/></div></image><br/> <h4><span style="font-size:large;">What’s next for Estante Mágica?</span></h4> <p>One major focus is integrating more AI into the app. We want to make it so that when kids create their characters or stories, they can interact with them more dynamically. Imagine a character in a game being able to respond to a child’s questions or comments – that’s the kind of interaction we’re aiming for. We’re keeping an eye on some new features like text-to-video and image-to-video which could add a whole new layer to how kids can bring their stories to life. Ultimately, we’re planning to bring the magic of storytelling to children around the world and expand our platform to more schools, especially in underserved areas.</p><br/> <p>Discover more <a href="https://play.google.com/console/about/weareplay/" target="_self">global #WeArePlay stories</a> and share your favorites. </p> <br /><br /> <p></p><center> How useful did you find this blog post? </center><p></p> <p></p><center> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=1%E2%98%85+%E2%80%93+Not+at+all&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=2%E2%98%85+%E2%80%93+Not+very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=3%E2%98%85+%E2%80%93+Somewhat&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=4%E2%98%85+%E2%80%93+Very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=5%E2%98%85+%E2%80%93+Extremely&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> </center><p></p> <div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s260/lockup_ic_Google_Play_H_260x53px_clr.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="53" data-original-width="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s200/lockup_ic_Google_Play_H_260x53px_clr.png" width="200" /></a></div><p></p><p></p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-47013631243673355432024-08-29T11:00:00.000-07:002024-08-30T12:22:37.866-07:00Android Studio Koala Feature Drop is Stable! <meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2KM5LWyivoeSm9FWZnOXWcaqveOjbU8NMg0Z5X87ZyPdCttXF5ZOdC3XLMNZeo9eHMWAD_6JKLxdeOQdWaj0ZOfRPWnXll8gD_1UFkMSKlEWiEy7uxZGjztKX6Dzq7_vdVhaRuRRJYcmGg1XMZyswxG7jneYNHqQTy2lb_AM_NKfa-u0xp63JNuPWW2E/s1600/image3.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2KM5LWyivoeSm9FWZnOXWcaqveOjbU8NMg0Z5X87ZyPdCttXF5ZOdC3XLMNZeo9eHMWAD_6JKLxdeOQdWaj0ZOfRPWnXll8gD_1UFkMSKlEWiEy7uxZGjztKX6Dzq7_vdVhaRuRRJYcmGg1XMZyswxG7jneYNHqQTy2lb_AM_NKfa-u0xp63JNuPWW2E/s1600/image3.png" style="display: none;" /> <em>Posted by <a href="https://x.com/sandhyam1312" target="_self">Sandhya Mohan</a>, Product Manager, Android Studio</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2KM5LWyivoeSm9FWZnOXWcaqveOjbU8NMg0Z5X87ZyPdCttXF5ZOdC3XLMNZeo9eHMWAD_6JKLxdeOQdWaj0ZOfRPWnXll8gD_1UFkMSKlEWiEy7uxZGjztKX6Dzq7_vdVhaRuRRJYcmGg1XMZyswxG7jneYNHqQTy2lb_AM_NKfa-u0xp63JNuPWW2E/s1600/image3.png"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2KM5LWyivoeSm9FWZnOXWcaqveOjbU8NMg0Z5X87ZyPdCttXF5ZOdC3XLMNZeo9eHMWAD_6JKLxdeOQdWaj0ZOfRPWnXll8gD_1UFkMSKlEWiEy7uxZGjztKX6Dzq7_vdVhaRuRRJYcmGg1XMZyswxG7jneYNHqQTy2lb_AM_NKfa-u0xp63JNuPWW2E/s1600/image3.png" /></a> <p>Today, we are thrilled to announce the stable release of <a href="https://developer.android.com/studio" target="_self">Android Studio</a> Koala Feature Drop (2024.1.2)!🐨 </p> <p>Earlier this year, we <a href="https://android-developers.googleblog.com/2024/05/more-frequent-focused-updates-for-android-studio.html" target="_self">announced</a> that every Android Studio animal version will have two releases: a platform release and a feature drop release. These more frequent updates get important IntelliJ updates to you faster, while we focus on quality and polish for Android-specific features. The Koala platform release was launched in June. Today, we'll walk through the <a href="https://android-developers.googleblog.com/2024/05/more-frequent-focused-updates-for-android-studio.html" target="_self">feature drop release</a>.</p> <p>Get access to cutting-edge features like new devices in device streaming, Compose previews for Glance widgets, USB cable speed detection, support for Android 15 in the Android SDK Upgrade Assistant, and much more. All of these new features are designed to accelerate your Android app development workflow in building next-generation and high-quality apps.</p> <p>Read on to learn more about all the updates, quality improvements, and new features across your key workflows in Android Studio Koala Feature Drop, and <a href="https://developer.android.com/studio" target="_self">download</a> the latest stable version today to try them out! </p> <iframe class="BLOG_video_class" allowfullscreen="" youtube-src-id="ZTYMPmbfx7E" width="100%" height="398" src="https://www.youtube.com/embed/ZTYMPmbfx7E"></iframe><br/> <h2><span style="font-size: x-large;">Develop</span></h2> <h3><span style="font-size: large;">Android Device Streaming: more devices and improved sign-up</span></h3> <p>Android Device Streaming now includes the following devices, in addition to the portfolio of 20+ device models already available:</p> <ul><ul> <li>Google Pixel 9</li></ul><ul> <li>Google Pixel 9 Pro</li></ul><ul> <li>Google Pixel 9 Pro XL</li></ul><ul> <li>Google Pixel 9 Pro Fold</li></ul><ul> <li>Google Pixel 8a</li></ul><ul> <li>Samsung Galaxy Fold5</li></ul><ul> <li>Samsung Galaxy S23 Ultra</li> </ul></ul> <p>Additionally, if you're new to Firebase, Android Studio automatically creates and sets up a no-cost Firebase project for you when you sign-in to Android Studio to use Device Streaming. As a result, you can get to streaming the device you need much faster. <a href="https://firebase.google.com/docs/test-lab/usage-quotas-pricing#device-streaming" target="_self">Learn more about Android Device Streaming quotas</a>, including promotional quota for the Firebase Blaze plan projects available for a limited time.</p> <p>As we announced at Google I/O 2024, we’re further expanding the selection of devices available by working with partners, such as Samsung, Xiaomi, and OnePlus, to allow you to connect to devices hosted in their device labs. To learn more and enroll in the upcoming Early Access Preview, see <a href="https://android-developers.googleblog.com/2024/08/android-device-streaming-announcing-early-access.html" target="_self">the official blog post</a>.</p> <image><div style="text-align: center;"><img alt="a screengrab showing device streaming in Android Studio" border="0" height="400" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir2JGeX01B04392ePR5D2bv4Ry5kISGMqXseecwfkWd_HucPoT96oNNhE4OmwxHgQsAbodYH5rTjdSSy44iFnqQ08NroGTyUnpRGQYPGVVYoY22OlkNVTzxgBrVY3OnrtFjvE9BF4nQ2Py4DXrNZs7I014GxTamZnCBpCPzB-dAhERMLz-xbnjY-FR4nM/w640-h400/image5.png" width="640" /></div><imgcaption><center><em>Device Streaming</em></center></imgcaption></image><br /> <h3><span style="font-size: large;">Target Android 15 using Android SDK Upgrade Assistant</span></h3> <p>The <a href="https://developer.android.com/build/sdk-upgrade-assistant" target="_self">Android SDK Upgrade Assistant</a> provides a step-by-step wizard to help you upgrade your <span style="font-family: Courier;"><a href="https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#target" target="_self">targetSdkVersion</a></span>. It also pulls documentation directly into Android Studio, saving you time and effort. Android Studio Koala Feature Drop adds support for upgrading projects to Android 15 (API Level 35).</p> <image><div style="text-align: center;"><img alt="a screengrab showing Android SDK Upgrade Assistant in Android Studio" border="0" height="603" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3g7bfBkRaWiIMGBvhePg72RxJnBfTE7jOXrGzxGzU9fg9X-_7b8OallQEQxZOPoODJvHeGN0qamHJfeeug-8FA3MCR8bbRfMt9sldCBltnPtqJ8VRH7uId85dFxGLcP20GU7VTZ6N2Tm4pFUHKpG7IuubAwe4QdY5-ogN0D6CouVF7SOlSCkBI2jrc9o/w640-h603/image2.png" width="640" /></div><imgcaption><center><em>Android SDK Upgrade Assistant </em></center></imgcaption></image><br /> <h3><span style="font-size: large;">Updated sign-in flow to Google services</span></h3> <p>It's now easier to sign in to multiple Google services with one authentication step. Whether you use Gemini in Android Studio, Firebase for Android Device Streaming, Crashlytics in App Quality Insights, Google Play for Android Vitals reports, or some combination of these services, the new sign-in flow makes it easier to get up and running. With granular permissions scoping, you'll always be in control of which services have access to your account. To get started, click the profile avatar on the top right corner and sign-in with your developer account.</p> <image><div style="text-align: center;"><img alt="a moving image showing the updated sign-in wizard in Android Studio" border="0" height="416" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUTUShkxIxCe8Lvm1KxXH0O2N0EKP0aK1mw_wPjJcF8G3MKRNxZT46eonkzguTzoo83wi2gM_NsRuHa0yQRupCWX8YIK1xa4b449Wkvv076KHL8Dth2GOg2j_UgQC5w8hnmqg_Wo3uI8zwnBBC6N45cGCn0uYD5FGv0lmAxFmmKBzvKElxHodjLehvm2M/w640-h416/image4.gif" width="640" /></div><imgcaption><center><em>Updated sign-in wizard</em></center></imgcaption></image><br /> <h3><span style="font-size: large;">Wear OS Tile Preview Panel</span></h3> <p>You can now <a href="https://developer.android.com/training/wearables/tiles/preview" target="_self">view snapshots of your Wear OS app's tiles</a> by including version 1.4 of the <a href="https://developer.android.com/jetpack/androidx/releases/wear-tiles" target="_self">Jetpack Tiles library</a>. This preview panel is particularly useful if your tile's appearance changes based on certain conditions, such as content that depends on the device's display size, or a sports event reaching halftime.</p> <image><div style="text-align: center;"><img alt="Wear OS Tile Preview Panel in Android Studio" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfyq8DJqipjze4lnYVQwDNbt76IrZeidXhG5CwdFZWCJesvUOH2CprASFA5aunNkWvylaUyu_iI_ps4pp73lqpjYBxsZHBL4Zi87N3sdD1xNJSc_u6WA8HKgfF7NzCw1O0xUJLNOYacYJi0Ks2nmyaekfEIstoFe6htU7SLo1UFzObCwRgFaHY21i9UDg/s16000/image11.png" /></div><imgcaption><center><em>Wear OS Tile Preview Panel</em></center></imgcaption></image><br /> <h3><span style="font-size: large;">Compose Glance widget previews</span></h3> <p>Android Studio Koala Feature Drop makes it easy to preview your <a href="https://developer.android.com/jetpack/compose/glance" target="_self">Jetpack Compose Glance widgets</a> directly within the IDE. You can even use multi-previews to preview at standard widget sizes and their designed widget breakpoints (<a href="https://github.com/android/platform-samples/blob/main/samples/user-interface/appwidgets/src/main/java/com/example/platform/ui/appwidgets/glance/layout/utils/PreviewAnnotations.kt" target="_self">sample code</a>). Catch potential UI issues and fine-tune your widget's appearance early in the development process or while debugging any UI issues. <a href="https://developer.android.com/studio/preview/features#glance-widget-preview" target="_self">Learn more</a>.</p> <image><div style="text-align: center;"><img alt="Previews for Compose Glance widgets in Android Studio" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO45BrUDbaNRo0IeG-02BA_GLhXY4sIjwmbQwJ6CnrufUuZ8hR9cQ-f27pe4KEXxlKEFRD6Xr6UWU6t-upv-pauf2PR0AQTIvOADBT7dwvLOvvRjkcvi8oTFM3KX-dUlcjDIQ8vhbh8Z29Kq24fna7n6JZb4O6BDpA2FEFv6yeH0EaGf5r6HH9SmpoQ6A/s1600/image8.png" /></div><imgcaption><center><em>Previews for Compose Glance widgets</em></center></imgcaption></image><br /> <h3><span style="font-size: large;">Live Edit (Compose)</span></h3> <p><a href="https://developer.android.com/develop/ui/compose/tooling/iterative-development#live-edit" target="_self">Live Edit</a> is now enabled in <a href="https://developer.android.com/develop/ui/compose/tooling/iterative-development#enable_live_edit" target="_self">manual mode</a> by default. It has increased stability and more robust change detection, including support for import statements. Note that starting with Android Studio Koala Feature Drop, the default shortcut to push your changes in manual mode has been updated to Control+' (Command+' on macOS). You can customize the shortcut on the <b>Keymap</b> settings page.</p> <image><div style="text-align: center;"><img alt="a moving demonstration of making an update with Live Edit in manual mode in Android Studio" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcnRvqjU_-BSzhbekP6Ak4B-SReJgIAEDJ20N64pJ8mbbV4zFzy01vKc0p5Q3pGfCZ8CH8LeeOkA42iptfTW1URo6pQtUEJqvK3UftMPdbXww7-rSh8os1mSc_acVAuqIfTjErJQD8KWMeN4Ud_uU46Jc642RvC1-k6ihCvB_C2K_o03m2O2mGu1Z5vTY/s1600/image9.gif" /></div><imgcaption><center><em>Making an update with Live Edit in manual mode</em></center></imgcaption></image><br /> <h2><span style="font-size: x-large;">Debug</span></h2> <h3><span style="font-size: large;">USB Cable Speed Detection</span></h3> <p>Android Studio now detects when it's possible to connect your Android device with a faster USB cable and suggests an upgrade that maximizes your device capabilities. Using an appropriate USB cable optimizes app installation time and minimizes latency when using tools such as the Android Studio debugger. USB cable speed detection is currently available for macOS and Linux. <a href="https://d.android.com/r/studio-ui/usb-check" target="_self">Learn more</a>.</p> <p>While most readily available USB cables are still the older USB 2.0 standard, the majority of modern devices support the significantly faster USB 3.0. Upgrading to a USB 3.0 cable can potentially increase your data transfer speeds up to 10x.</p> <image><div style="text-align: center;"><img alt="USB cable speed detection warning in Android Studio" border="0" height="102" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwyCyBJw2m3ZEtMpLw0LoHro4qGol7stsngv23kw8eRkylzavjFmgXda_yge88XZA8Qx3u-x9F5xsXax2GJxaHYFU6bnXgUUIryJhNthCSv0w_bBsoTQyxC531xO4WCrFA2ce-LFO6C7rFHLVtbYsiZAcfkJAtpyWJUDIjQTz4DKQFcnSdyw4GqUDFD9U/w400-h102/image7.png" width="400" /></div><imgcaption><center><em>USB cable speed detection</em></center></imgcaption></image><br /> <h3><span style="font-size: large;">Device UI Shortcuts</span></h3> <p>To help you build and debug your UI, we've introduced Device UI shortcuts button action in the Running Devices tool window in Android Studio. Use the shortcuts to view the effect of common UI settings such as dark theme, font size, screen size, app language and TalkBack. You can use the shortcuts with emulators, mirrored physical devices, and devices streamed from Firebase Test Lab. Device UI shortcuts are available for devices running API level 33 or higher. <a href="https://d.android.com/r/studio-ui/debug/device-ui-setting-shortcuts" target="_self">Learn more</a>.</p> <image><div style="text-align: center;"><img alt="Device UI Setting Shortcuts in Running Device Window in Android Studio" border="0" height="640" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjezz9BXEVZndzv8-FGYTaISfQC72npxx-AEOGkV6bu21FqnarCxvd1f2nrInPuddPpGNO5VJH-vrta3SG4INfTbdNL5RngjjtR5UlGUBCTex-GNWgc11jVi_9JDGq-WsU9u2cfwHMJUA7aWSfxLRKmFTjOQ3_NSmZAbyf_cwrQx6nRnAyUxgm41CDHvFo/w388-h640/image6.gif" width="388" /></div><imgcaption><center><em>Device UI Setting Shortcuts in Running Device Window</em></center></imgcaption></image><br /> <h3><span style="font-size: large;">Pixel 8a in Emulator</span></h3> <p>The Android Emulator (35.1+) now supports the Pixel 8a in the stable channel, enabling you to test your apps on more Pixel devices without needing a physical device. Find the new Pixel 8a in the phone category when you create a new virtual device. Additionally, you can find Pixel 9 devices in the canary release channel of Android Studio.</p> <image><div style="text-align: center;"><img alt="Pixel 8a in Emulator in Android Studio" border="0" height="416" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR1cF7JgFrK_ahHPCvtuYvo7sRmzzAUB1yyNkAlh3DRDSWG63McjOyZoqaekpaZJaoIP43YmBasQUZ1zqcxsvafAGXuOE7bFiTUUa53cqTIxeEQhdSzce4BaDcBXWseog6URaJfPeQpK558ggbTP4wxbk8LwG32UEJCxECoLrlpCi00vt1Ys9-dMyEs3c/w640-h416/image1.png" width="640" /></div><imgcaption><center><em>Pixel 8a in Emulator</em></center></imgcaption></image><br /> <h2><span style="font-size: x-large;">Optimize</span></h2> <h3><span style="font-size: large;">Faster and improved Profiler with a task-centric approach</span></h3> <p>Popular performance optimization tasks like capturing a system trace with <a href="https://developer.android.com/studio/profile#profileable-apps" target="_self">profileable apps</a> now start up to 60% faster<sup>*</sup>. The Profiler's task-centric redesign also makes it easier to start the task you're interested in, whether it's profiling your app's CPU, memory, or <a href="https://developer.android.com/studio/profile/power-profiler" target="_self">power usage</a>. For example, you can start a system trace task to profile and improve your app's startup time right from the UI as soon as you open the Profiler.</p> <image><div style="text-align: center;"><img alt="Pixel 8a in Emulator in Android Studio" border="0" height="209" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWkrar-bRxOGoVY20ncqNwjPlVY1slwLxe3wmgcFqQ2SJzNdCWlTHWvWnZmItpEFKYMzQvUAJWmUOQqsU7gdR9QJreDHMwYN4XD91zLPCuQ6BFGDnvMHc0jEAmrF_ZrLfesMvnWXg6XgK1YCXVEXad8fnlA_gIhITRuE8xv0kWFi6fCjg0aV926pQMPf4/w640-h209/image10.png" width="640" /></div><imgcaption><center><em>Faster and improved Profiler with a task-centric approach</em></center><center><span style="font-size: small; text-align: start;"><em>* Based on internal data, as tested in April 2024</em></span><br style="text-align: start;" /></center></imgcaption></image><br /> <h2><span style="font-size: x-large;">Quality improvements</span></h2> <p>Beyond new features, we also continue to improve the overall quality and stability of Android Studio. In fact, the Android Studio team addressed over 520 bugs during the Koala Feature Drop development cycle.</p> <h2><span style="font-size: x-large;">IntelliJ platform update</span></h2> <p>Android Studio Koala Feature Drop (2024.1.2) includes the IntelliJ 2024.1 platform release, which has many new features such as comprehensive support for the latest Java** 22 features, an improved terminal, and sticky lines in the editor to simplify working with large files and exploring new codebases.</p> <ul><ul> <li>The improved terminal features a fresh new look, with commands separated into distinct blocks, along with an expanded set of features, such as smooth navigation between blocks, command completion, and easy access to the command history. <a href="https://blog.jetbrains.com/idea/2024/02/the-new-terminal-beta-is-now-in-jetbrains-ides/" target="_self">Learn more</a>.</li></ul><ul> <li>Sticky lines in the editor keeps key structural elements, like the beginnings of classes or methods, pinned to the top of the editor as you scroll and provides an option to promptly navigate through the code by clicking on a pinned line. <a href="https://www.jetbrains.com/idea/whatsnew/2024-1/" target="_self">Learn more</a>. </li></ul><ul> <li>Basic IDE functionalities like code highlighting and completion now work for Java and Kotlin during project indexing, which should enhance your startup experience.</li> </ul></ul> <p>See the full release notes <a href="https://blog.jetbrains.com/idea/2024/04/intellij-idea-2024-1/" target="_self">here</a>.</p> <h2><span style="font-size: x-large;">Summary</span></h2> <p>To recap, Android Studio Koala Feature Drop includes the following enhancements and features:</p> <h3><span style="font-size: large;">Develop</span></h3> <ul><ul> <li>Android Device Streaming: more devices and improved sign-up</li></ul><ul> <li>Target Android 15 using Android SDK Upgrade Assistant</li></ul><ul> <li>Updated sign-in flow to Google services</li></ul><ul> <li>Wear OS Tile Preview Panel</li></ul><ul> <li>Compose Glance widget previews</li></ul><ul> <li>Live Edit (Compose)</li> </ul></ul> <h3><span style="font-size: large;">Debug</span></h3> <ul><ul> <li>USB Cable Speed Detection</li></ul><ul> <li>Device UI Settings Picker</li></ul><ul> <li>Pixel 8a in Emulator</li> </ul></ul> <h3><span style="font-size: large;">Optimize</span></h3> <ul><ul> <li>New Task UX for Profilers</li> </ul></ul> <h3><span style="font-size: large;">Quality Improvements</span></h3> <ul><ul> <li>520+ bugs addressed</li> </ul></ul> <h3><span style="font-size: large;">IntelliJ Platform Update</span></h3> <ul><ul> <li>Improved terminal</li></ul><ul> <li>Sticky lines in the editor to simplify working with large codebases</li></ul><ul> <li>Enhanced startup experience</li> </ul></ul> <h2><span style="font-size: x-large;">Getting Started</span></h2> <p>Ready for next-level Android development? <a href="https://developer.android.com/studio" target="_self">Download</a> Android Studio Koala Feature Drop and unlock these cutting-edge features today! As always, your feedback is important to us – <a href="https://developer.android.com/studio/known-issues" target="_self">check known issues</a>, <a href="https://developer.android.com/studio/report-bugs" target="_self">report bugs</a>, <a href="https://developer.android.com/studio/report-bugs" target="_self">suggest improvements</a>, and be part of our vibrant community on <a href="https://www.linkedin.com/showcase/androiddev/posts/?feedView=all" target="_self">LinkedIn</a>, <a href="https://medium.com/androiddevelopers" target="_self">Medium</a>, <a href="https://www.youtube.com/c/AndroidDevelopers/videos" target="_self">YouTube</a>, or <a href="https://twitter.com/androidstudio" target="_self">X</a>. Let's build the future of Android apps together!</p> <div><br/></div> <p><em><small>**Java is a trademark or registered trademark of Oracle and/or its affiliates.</small></em></p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-71022436548426615252024-08-27T10:02:00.000-07:002024-08-27T10:02:00.113-07:00Instagram’s early adoption of Ultra HDR transforms user experience in only 3 months<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnvYV5d_rytXuC4KhfcS50lf1NccvuktVkvPM4jduMMVWjpaZ9_FkPhd2CR3ofdxnRhoFAZJLT3uyDJloQLYatT0IDKdgM54TzXZrFUd204P2UJBxMBKxqwcbhcbQKivPRi-ky7vbcQ_-vsEOX6H6I4weU3IgIehJ8NlkrR9_nOojzRm0qBxQ281qODH4/s1600/image2.gif" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnvYV5d_rytXuC4KhfcS50lf1NccvuktVkvPM4jduMMVWjpaZ9_FkPhd2CR3ofdxnRhoFAZJLT3uyDJloQLYatT0IDKdgM54TzXZrFUd204P2UJBxMBKxqwcbhcbQKivPRi-ky7vbcQ_-vsEOX6H6I4weU3IgIehJ8NlkrR9_nOojzRm0qBxQ281qODH4/s1600/image2.gif" style="display: none;" /> <em>Posted by Mayuri Khinvasara Khabya – Developer Relations Engineer, Google; in partnership with Bismark Ito - Android Developer, Rex Jin - Android Developer and Bei Yi - Partner Engineering </em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnvYV5d_rytXuC4KhfcS50lf1NccvuktVkvPM4jduMMVWjpaZ9_FkPhd2CR3ofdxnRhoFAZJLT3uyDJloQLYatT0IDKdgM54TzXZrFUd204P2UJBxMBKxqwcbhcbQKivPRi-ky7vbcQ_-vsEOX6H6I4weU3IgIehJ8NlkrR9_nOojzRm0qBxQ281qODH4/s1600/image2.gif"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnvYV5d_rytXuC4KhfcS50lf1NccvuktVkvPM4jduMMVWjpaZ9_FkPhd2CR3ofdxnRhoFAZJLT3uyDJloQLYatT0IDKdgM54TzXZrFUd204P2UJBxMBKxqwcbhcbQKivPRi-ky7vbcQ_-vsEOX6H6I4weU3IgIehJ8NlkrR9_nOojzRm0qBxQ281qODH4/s1600/image2.gif" /></a> <p>Meta’s <a href="https://play.google.com/store/apps/details?id=com.instagram.android&amp;hl=en_US" target="_self">Instagram</a> is one of the world's most popular social networking apps that helps people connect, find communities, and grow their businesses in new and innovative ways. Since its release in 2010, photographers and creators alike have embraced the platform, making it a go-to hub of artistic expression and creativity.</p> <p>Instagram developers saw an opportunity to build a richer media experience by becoming an early adopter of <a href="https://developer.android.com/media/grow/ultra-hdr" target="_self">Ultra HDR image format</a>, a new feature introduced with <a href="https://developer.android.com/about/versions/14?gad_source=1&amp;gclid=CjwKCAjwtNi0BhA1EiwAWZaANDrNm2527yufNbJ7Cn_kW7L3kynd8o4XmPNwDlwjO4vJEwYByMvKWRoC1jcQAvD_BwE&amp;gclsrc=aw.ds" target="_self">Android 14</a>. <b>With its adoption of Ultra HDR, Instagram completely transformed and improved its user experience in just 3 months.</b></p> <iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/gGFHVi3NPWM" width="100%" youtube-src-id="gGFHVi3NPWM"></iframe> <h3>Enhancing Instagram photo quality with Ultra HDR</h3> <p>The development team wanted to be an early adopter of Ultra HDR because photos and videos are Instagram's most important form of interaction and expression, and improving image quality aligns with Meta’s goal of connecting people, communities, and businesses. “Android rapidly adopts the latest media technology so that we can bring the benefits to users,” said Rex Jin, an Android developer on the Instagram Media Platform team.</p> <p>Instagram developers started implementing Ultra HDR in late September 2023. Ultra HDR images store more information about light intensity for more detailed highlights, shadows, and crisper colors. It also enables capturing, editing, sharing, and viewing HDR photos, a significant improvement over standard dynamic range (SDR) photos while still being backward compatible. Users can seamlessly post, view, edit, and apply filters to Ultra HDR photos without compromising image quality.</p> <p>Since the update, Instagram has seen a large surge in Ultra HDR photo uploads. <b>Users have also embraced their new ability to edit up to 10 Ultra HDR images simultaneously</b> and share photos that retain the full color and dynamic camera capture range. Instagram’s pioneering integration of Ultra HDR earned industry-wide recognition and praise when it was announced at <a href="https://www.youtube.com/watch?v=J7x0E0hLaJ8&amp;t=2254s" target="_self">Samsung Unpacked</a> and in a <a href="https://www.theverge.com/2024/3/4/24090244/google-pixel-ultra-hdr-instagram-march-feature-drop" target="_self">Pixel Feature Drop</a>.</p> <image><div style="text-align: center;"><img alt="Image sharing is how Instagram started and we want to ensure we always provide the best and greatest image quality to users and creators. — Bei Yi,, partner engineering at Meta" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBqEIpAEyMJrO8MMhL5dLXOcyjj4g4UY27_szdmUJloQe6aOj_fYw45cqFN8nCP9pK9KR2FosPthsjVs-sMLbdEqw577XffXpIanStAsvW3RleD11SlccbJhAtwxw-SEzimuPjwraBeypWdLam1O6aBMp2dXxNV1eDiJ4nVBN1R6fHb0v7vbo2eaWmK6U/s1600/image1.png" width="100%" /></div></image><br /> <h3>Pioneering Ultra HDR integrations</h3> <p>Being early adopters of Android 14 meant working with beta versions of the operating system and addressing the challenges associated with implementing a brand-new feature that’s never been tested publicly. For example, Instagram developers needed to find innovative solutions to handle the expanded color space and larger file sizes of Ultra HDR images while maintaining compatibility with Instagram's diverse editing features and filters.</p> <p>The team found solutions during the development process by using code examples for <a href="https://github.com/android/platform-samples/blob/main/samples/camera/camera2/src/main/java/com/example/platform/camera/imagecapture/Camera2UltraHDRCapture.kt" target="_self">HDR photo capture</a> and <a href="https://developer.android.com/media/grow/ultra-hdr/display" target="_self">rendering</a>. Instagram also partnered with Google's Android Camera &amp; Media team to address the challenges of displaying Ultra HDR images, share its developer experience, and provide feedback during integration. The partnership helped speed up the integrations, and the feedback shared was implemented faster.</p> <p>“With Android being an open source project, we can build more optimized media solutions with better performance on Instagram,” said Bismark Ito, an Android developer at Instagram. “I feel accomplished when I find a creative solution that works on a range of devices with different hardware capabilities.”</p> <image><div style="text-align: center;"><img alt="UI image of an uploaded Instagram post that was taken using Ultra HDR" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHijdiJSl-zZowmEVsDY5PU6is3oV-YS1vFtLjv7nQLxLE3u3WWVyM501kehqcq2vsvNkhhRz-vWa2o0IAO628qLrqQdWBVpJXFAxyYqJhhuVvZpe3lKYTECVePuhh2Dm7NL4RBDWJphgh_rtvyF1tkuwEESbYVln3-yRPtNMydVsGIVIRzoX99F9bWpk/s1600/image3.png" width="100%" /></div><imgcaption><center><em>UI image of an uploaded Instagram post that was taken using Ultra HDR</em></center></imgcaption></image><br /> <h3>Building for the future with Android 15</h3> <p>Ultra HDR has significantly enhanced Instagram’s photo-sharing experience, and Meta is already planning to expand support to more devices and add future image and video quality improvements. With the upcoming <a href="https://developer.android.com/about/versions/15" target="_self">Android 15</a> release, the company plans to explore new APIs and features that amplify its mission of connecting people, communities, and businesses.</p> <p>As the Ultra HDR development process showed, being the first to adopt a new feature involves navigating new challenges to give users the best possible experience. However, collaborating with Google teams and Android’s open source community can help make the process smoother.</p> <h2><span style="font-size: x-large;">Get started</span></h2> <p>Learn how to revolutionize your app’s user experience with <a href="https://developer.android.com/media/grow/ultra-hdr" target="_self">Ultra HDR</a> images.</p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-68376062070291485832024-08-27T10:00:00.000-07:002024-08-30T14:28:30.992-07:00The Recorder app on Pixel sees a 24% boost in engagement with Gemini Nano-powered feature<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEfja494tCX3OKqgDUurqjnXdA9pVyerXmhUMgShMxoEfj-6cQtI9XgOHYZ4_a92R6sh6sUd0cNQwk_vatKXwxf4ea0I9fXYebY353oDX2Ofcs-DpTLBUg5sGdrOj0CZj0gZfpr8C0q2Dj7d58Cd8sw0RhAWJnivQzbnFGBVSYAVcH2sj53QGFh4ytMgU/s1600/image1.gif" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEfja494tCX3OKqgDUurqjnXdA9pVyerXmhUMgShMxoEfj-6cQtI9XgOHYZ4_a92R6sh6sUd0cNQwk_vatKXwxf4ea0I9fXYebY353oDX2Ofcs-DpTLBUg5sGdrOj0CZj0gZfpr8C0q2Dj7d58Cd8sw0RhAWJnivQzbnFGBVSYAVcH2sj53QGFh4ytMgU/s1600/image1.gif" style="display: none;" /> <em>Posted by Terence Zhang – Developer Relations Engineer and Kristi Bradford - Product Manager</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEfja494tCX3OKqgDUurqjnXdA9pVyerXmhUMgShMxoEfj-6cQtI9XgOHYZ4_a92R6sh6sUd0cNQwk_vatKXwxf4ea0I9fXYebY353oDX2Ofcs-DpTLBUg5sGdrOj0CZj0gZfpr8C0q2Dj7d58Cd8sw0RhAWJnivQzbnFGBVSYAVcH2sj53QGFh4ytMgU/s1600/image1.gif"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEfja494tCX3OKqgDUurqjnXdA9pVyerXmhUMgShMxoEfj-6cQtI9XgOHYZ4_a92R6sh6sUd0cNQwk_vatKXwxf4ea0I9fXYebY353oDX2Ofcs-DpTLBUg5sGdrOj0CZj0gZfpr8C0q2Dj7d58Cd8sw0RhAWJnivQzbnFGBVSYAVcH2sj53QGFh4ytMgU/s1600/image1.gif" /></a> <p>Google Pixel’s <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.recorder&amp;hl=en_US" target="_self">Recorder</a> app allows people to record, transcribe, save, and share audio. To make it easier for users to manage and revisit their recordings, Recorder’s developers turned to Gemini Nano, a powerful on-device large language model (LLM). This integration introduces an AI-powered audio summarization feature to help users more easily find the right recordings and quickly grasp key points.</p> <p>Earlier this month, Gemini Nano got a power boost with the introduction of the new Gemini Nano with Multimodality model. The Recorder app is already leveraging this upgrade to summarize longer voice recordings, with improved processing for grammar and nuance.</p> <iframe class="BLOG_video_class" allowfullscreen="" youtube-src-id="-VcYUdNOp3s" width="100%" height="398" src="https://www.youtube.com/embed/-VcYUdNOp3s"></iframe> <h3>Meeting user needs with on-device AI</h3> <p>Recorder developers initially experimented with a cloud-based solution, achieving impressive levels of performance and quality. However, to prioritize accessibility and privacy for their users, they sought an on-device solution. The development of Gemini Nano presented a perfect opportunity to build the concise audio summaries users were looking for, all while keeping data processing on the device.</p> <p>Gemini Nano is Google’s most efficient model for on-device tasks. “Having the LLM on-device is beneficial to users because it provides them with more privacy, less latency, and it works wherever they need since there’s no internet required,” said Kristi Bradford, the product manager for Pixel’s essential apps.</p> <p>To achieve better results, Recorder also fine-tuned the model using data that matches its use case. This is done using low order rank adaptation (LoRA), which enables Gemini Nano to consistently output three-bullet point descriptions of the transcript that include any speaker names, key takeaways, and themes.</p> <p>AICore, an Android system service that centralizes runtime, delivery, and critical safety components for LLMs, significantly streamlined Recorder's adoption of Gemini Nano. The availability of a developer SDK for running GenAI workloads allowed the team to build the transcription summary feature in just four months, with only four developers. This efficiency was achieved by eliminating the need for maintaining in-house models.</p> <p>Since its release, <b>Recorder users have been using the new AI-powered summarization feature averaging 2 to 5 times daily, and the number of overall saved recordings increased by 24%.</b> This feature has contributed to a significant increase in app engagement and user retention overall. The Recorder team also noted that feedback about the new feature has been positive, with many users citing the time the new AI-powered summarization feature saves them.</p> <image><div style="text-align: center;"><img alt="“We were surprised by how truly capable the model was… before and after LoRA tuning.” — Kristi Bradford, product manager for Pixel’s essential apps" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGkLLmI7pmGJ_z7MvIhd5WXQCF1pkcsuyb9lU2019R-maxWN7zC8CSlWU6zEGrR62ykdkgk_YblPGapWWslidRZ5yVLezQImeBFPwjLOJhV521c0zs0p9Jj2a6-bjltDKJ4L2aj2CVbd6bPyfaE0YdOozvidFlcYeBOrKOSLaeGSvlDLxuHygum_yIFEI/s1600/image3.png" width="100%" /></div></image><br /> <h3>The next big evolution: Gemini Nano with multimodality</h3> <p>Recorder developers also implemented the latest Gemini Nano model, known as <a href="https://store.google.com/intl/en/ideas/articles/gemini-nano-google-pixel/" target="_self">Gemini Nano with multimodality</a>, to further improve its summarization feature on Pixel 9 devices. The new model is significantly larger than the previous one on Pixel 8 devices, and it’s more capable, accurate, and scalable. The new model also has expanded token support that lets Recorder summarize much longer transcripts than before. Gemini Nano with multimodality is currently only available on Pixel 9 devices.</p> <p>Integrating Gemini Nano with multimodality required another round of fine-tuning. However, Recorder developers were able to use the original Gemini Nano model's fine-tuning dataset as a foundation, streamlining the development process.</p> <p>To fully leverage the new model's capabilities, Recorder developers expanded their dataset with support for longer voice recordings, implemented refined evaluation methods, and established launch criteria metrics focused on grammar and nuance. The inclusion of grammar as a new metric for assessing inference quality was made possible solely by the enhanced capabilities of Gemini Nano with Multimodality.</p> <image><div style="text-align: center;"><img alt="UI example" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyU82fy79EsTcPTQK_raQrz3D42th4DmVwPpKAnC0YOHSUiS5zLsJ6S33VGWNSOhBbwUTBrQBLyfWKZBl7NfvQu2UUhVvga_8XSe5vowk30Dd-ivr1aQ-DPknDZ1u6d1bHA_o1jljk7FegcCLQddomnuQBihc32ZvJXpOdP2jyIzU77xD66xXj4oVfUEI/s1600/image2.gif" width="100%" /></div></image><br /> <h3>Doing more with on-device AI</h3> <p>“Given the novelty of GenAI, the whole team had fun learning how to use it,” said Kristi. “Now, we’re empowered to push the boundaries of what we can accomplish while meeting emerging user needs and opportunities. It’s truly brought a new level of creativity to problem-solving and experimentation. We’ve already demoed at least two more GenAI features that help people get time back internally for early feedback, and we’re excited about the possibilities ahead.”</p> <h2><span style="font-size: x-large;">Get started</span></h2> <p>Learn more about how to bring the benefits of on-device AI with <a href="https://developer.android.com/ai/aicore" target="_self">Gemini Nano</a> to your apps.</p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-71940046330787217272024-08-27T09:55:00.000-07:002024-08-27T10:09:18.407-07:00#TheAndroidShow: diving into the latest from Made by Google, including wearables, Foldable, Gemini and more! <meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBcRDoIWFl6UBdFHWCSgjD3ZKdbCLQuf0gGNTintSOoOWXMc68a5Jzvw0CPOp_fFFahhAa8iSCWczXjpvVwiXlOoJTtw-p9DgP-UHWvFHCIgXms7_MkOgWw372cYtsBrsApmOGMFMJTDX9qEQtC2e0Jma46FV5aF2_vvvpRXVvxbLYwC0XawteqZnpNzU/s1600/%23TAS-24Q3-Recap-Social.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBcRDoIWFl6UBdFHWCSgjD3ZKdbCLQuf0gGNTintSOoOWXMc68a5Jzvw0CPOp_fFFahhAa8iSCWczXjpvVwiXlOoJTtw-p9DgP-UHWvFHCIgXms7_MkOgWw372cYtsBrsApmOGMFMJTDX9qEQtC2e0Jma46FV5aF2_vvvpRXVvxbLYwC0XawteqZnpNzU/s1600/%23TAS-24Q3-Recap-Social.png" style="display: none;" /> <em>Posted by Anirudh Dewani, Director – Android Developer Relations</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV3TBET30sM8gA_jtgWYqNTzZZm7-tFl6GaPNO-1RHz4QoqG5c-1V8eqBeXrcjXFIl_cOhl1Phd80HsDFfWMlsDN-wGgO6mFDoNd_H4LxMZ_0WKj4DeoFg4ZWi0B5niCbNAj2EEvWcaJArq6ZfuzA35sRN96XeoLXaCAdEWdhx4tombJZAWcffzgrdYbA/s1600/%23TAS-24Q3-Recap-Banner.png"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV3TBET30sM8gA_jtgWYqNTzZZm7-tFl6GaPNO-1RHz4QoqG5c-1V8eqBeXrcjXFIl_cOhl1Phd80HsDFfWMlsDN-wGgO6mFDoNd_H4LxMZ_0WKj4DeoFg4ZWi0B5niCbNAj2EEvWcaJArq6ZfuzA35sRN96XeoLXaCAdEWdhx4tombJZAWcffzgrdYbA/s1600/%23TAS-24Q3-Recap-Banner.png" /></a> <p>We just dropped our summer episode of #TheAndroidShow, on <a href="https://www.youtube.com/playlist?list=PLWz5rJ2EKKc_RBOr2aSbutEG9tYjMBlay" target="_self">YouTube</a> and on <a href="http://developer.android.com/events/show" target="_self">developer.android.com</a>, where we unpacked all of the goodies coming out of this month’s Made by Google event and what you as Android developers need to know. With two new Wear OS 5 watches, we show you how to get building for the wrist. And with the latest foldable from Google, the Pixel 9 Pro Fold, we show how you can leverage out of the box APIs and multi-window experiences to make your apps adaptive for this new form factor.</p> <iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/4T8lJiAtnFg" width="100%" youtube-src-id="4T8lJiAtnFg"></iframe> <h2><span style="font-size: x-large;">Building for Pixel 9 Pro Fold with Adaptive UIs</span></h2> <p>With foldables like the Pixel 9 Pro Fold, users have options for how to engage and multitask based on the display they are using and the folded state of their device. Building apps that adapt based on screen size and device postures allows you to scale your UI for mobile, foldables, tablets and beyond. You can read more about how to <a href="https://android-developers.googleblog.com/2024/08/create-exceptional-experiences-pixel-new-watches-and-foldables.html" target="_self">get started building for devices like the Pixel 9 Pro Fold</a>, or <a href="https://developer.android.com/large-screens" target="_self">learn more about building for large screens</a>.</p> <iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/wscOVfiVX5k" width="100%" youtube-src-id="wscOVfiVX5k"></iframe> <h2><span style="font-size: x-large;">Preparing for Pixel Watch 3: Wear OS 5 and Larger Displays</span></h2> <p>With Pixel Watch 3 ringing in the stable release of Wear OS 5, there’s never been a better time to prepare your app for the behavior changes from Wear OS 5 and larger screen sizes from Pixel. We covered how to <a href="https://android-developers.googleblog.com/2024/08/create-exceptional-experiences-pixel-new-watches-and-foldables.html" target="_self">get started building for wearables like Pixel Watch 3</a>, and you can <a href="https://developer.android.com/wear" target="_self">learn more about building for Wear OS 3</a>.</p> <iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/wscOVfiVX5k" width="100%" youtube-src-id="wscOVfiVX5k"></iframe> <h2><span style="font-size: x-large;">Gemini Nano, with multi-modality</span></h2> <p>We also took you behind the scenes with <a href="https://android-developers.googleblog.com/2023/12/a-new-foundation-for-ai-on-android.html" target="_self">Gemini Nano</a> with multimodality, Google’s latest model for on-device AI. Gemini Nano, the smallest version of the Gemini model family, can be executed on-device on capable Android devices including the latest Pixel 9. We caught up with the team to hear more about <a href="https://android-developers.googleblog.com/2024/08/recorder-app-on-pixel-sees-boost-in-engagement-with-gemini-nano.html" target="_self">how the Pixel Recorder team used Gemini Nano</a> to summarize users’ transcripts of audio recordings, with data remaining on-device.</p> <iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/-VcYUdNOp3s" width="100%" youtube-src-id="-VcYUdNOp3s"></iframe> <h2><span style="font-size: x-large;">And some voices from Android devs like you!</span></h2> <p>Across the show, we heard from some amazing developers building excellent apps, across devices. Like Rex Jin and Bismark Ito, Android Developers at Meta: they told us <a href="https://android-developers.googleblog.com/2024/08/instagrams-early-adoption-of-ultra-hdr-transforms-user-experience.html" target="_self">how the team at Instagram was able to add Ultra HDR in less than three months</a>, dramatically improving the user experience. Later, SAP told us how within 5 minutes, they integrated <span style="color:#0d904f; font-family:Courier">NavigationSuiteScaffold</span>, swiftly adapting their navigation UI to different window sizes. And AllTrails told us they are seeing 60% higher monthly retention from Wear OS users… pretty impressive!</p> <iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/gGFHVi3NPWM" width="100%" youtube-src-id="gGFHVi3NPWM"></iframe> <div><br/></div> <p>Have an idea for our next episode of #TheAndroidShow? It’s your conversation with the broader community, and #TheAndroidShow is your conversation with the Android developer community, this time hosted by <a href="https://x.com/queencodemonkey" target="_self">Huyen Tue Dao</a> and <a href="https://www.linkedin.com/in/johnzoeller/" target="_self">John Zoeller</a>. You'll hear the latest from the developers and engineers who build Android. You can watch the full show on YouTube Comment start and on <a href="http://developer.android.com/events/show" target="_self">developer.android.com/events/show</a>!</p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-58569358349584136832024-08-23T09:00:00.000-07:002024-08-27T10:03:43.066-07:00Adding 16 KB Page Size to Android<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihepfPFsFLid2VfHdxfSsM1OtZobzMJbdRZBuDF3QnBMq7Ot5wH_M9pifV_G2BGCiqy5nhyphenhyphencj3JTEXMg9rjWSrxMWk34Gluf7wGv9UCaV2DT05T-YIWDJ2x9zRA6t7H1cWE2A01AjuBbHD9UDp4jMHawf5hkruWeooaQs2lGsrF-Cw_Orgitix5xe_Bks/s1600/Making-security-easy--How-we-are-helping-developers-fix-vulnerabilities-social.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihepfPFsFLid2VfHdxfSsM1OtZobzMJbdRZBuDF3QnBMq7Ot5wH_M9pifV_G2BGCiqy5nhyphenhyphencj3JTEXMg9rjWSrxMWk34Gluf7wGv9UCaV2DT05T-YIWDJ2x9zRA6t7H1cWE2A01AjuBbHD9UDp4jMHawf5hkruWeooaQs2lGsrF-Cw_Orgitix5xe_Bks/s1600/Making-security-easy--How-we-are-helping-developers-fix-vulnerabilities-social.png" style="display: none;" /> <em>Posted by Steven Moreland – Staff Software Engineer, Sandeep Patil – Principal Software Engineer</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2PUAPiFw_x3s9fodPRsZLeHyHZNjhdopBeaS5nE6V8R2skSt1eNB-FpbIbazyRtomkV9NMekcLWO4Ah88Cs2OiQPgIjkyRicbSWpstcK9OZeQymlM0IK6xsLyzBhsPIz0ZsJ5lm7BvnaoTiSDCeRbJKv_cv2JyoDxtaCkgkmzrp7b1mJHZkYj5QYScfk/s1600/header-Adding-16-KB-Page-Size-to-Android-.png"><img border="0" data-original-height="800" data-original-width="1058" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2PUAPiFw_x3s9fodPRsZLeHyHZNjhdopBeaS5nE6V8R2skSt1eNB-FpbIbazyRtomkV9NMekcLWO4Ah88Cs2OiQPgIjkyRicbSWpstcK9OZeQymlM0IK6xsLyzBhsPIz0ZsJ5lm7BvnaoTiSDCeRbJKv_cv2JyoDxtaCkgkmzrp7b1mJHZkYj5QYScfk/s1600/header-Adding-16-KB-Page-Size-to-Android-.png" /></a> <p>A page is the granularity at which an operating system manages memory. Most CPUs today support a 4 KB page size and so the Android OS and applications have historically been built and optimized to run with a 4 KB page size. ARM CPUs support the larger 16 KB page size. When Android uses this larger page size, we observe an <a href="https://developer.android.com/guide/practices/page-sizes#benefits" target="_self">overall performance boost of 5-10%</a> while using ~9% additional memory.</p> <p>In order to improve the operating system performance overall and to give device manufacturers an option to make this trade-off, Android 15 can run with 4 KB or 16 KB page sizes.</p> <p>The very first 16 KB enabled Android system will be made available on select devices as a developer option. This is so you can use the developer option to test and fix (if needed) your applications to prepare for Android devices with 16 KB page sizes in the near future.</p> <h2 style="text-align: left;"><span style="font-size: x-large;">Details</span></h2> <p>In most CPUs, dedicated hardware called memory management units (MMUs) translate addresses from what a program is using to a physical location in memory. This translation is done on a page-size basis. Every time a program needs more memory, the operating system needs to get involved and fill out a “page table” entry, assigning that piece of memory to a process. When the page size is 4 times larger, there is 4 times less bookkeeping. So, the system can spend more time making sure your videos look great, games play well, and applications run smoothly, and less time filling out low-level operating system paperwork.</p> <p>Unlike 32-bit/64-bit mode, a page size is not an Application Binary Interface (ABI). In other words, <b>once an application is fixed to be page size agnostic, the same application binary can run on both 4 KB and 16 KB devices.</b></p> <p>In Android 15, we’ve refactored Android from the ground up to support running at different page sizes, thus making it page-size agnostic.</p> <h3 style="text-align: left;"><span style="font-size: large;">Major OS Changes</span></h3> <p>On new Android 15 based devices:</p> <ul><ul> <li>The compile-time <span style="font-family: Courier;"><a href="https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/bits/page_size.h" target="_self">PAGE_SIZE</a></span> macro is replaced at runtime with <span style="font-family: Courier;"><a href="https://man7.org/linux/man-pages/man2/getpagesize.2.html" target="_self">getpagesize(2)</a></span>.</li></ul><ul> <li>All OS binaries are 16 KB aligned (<span style="color: #0d904f; font-family: Courier;">-Wl,-z,max-page-size=16384</span>). 3rd party applications / libraries may not be 16 KB aligned.</li></ul><ul> <li>All OS binaries are built with separate loadable segments (<span style="color: #0d904f; font-family: Courier;">-Wl,-z,separate-loadable-segments</span>) to ensure all memory regions mapped into a process are readable, which some applications depend on.</li> </ul></ul> <p>Many of our other OS components have been rewritten to avoid assuming the page size and to optimize for larger page size when available.</p> <h4><span style="font-size: medium;"><b>Filesystems</b></span></h4> <p>For performant operation, file system block size must match the page size. EROFS and F2FS file systems have been made 16 KB compatible, as has the UFS storage layer.</p> <p>On 4 KB systems, ELF executable file size increases due to additional padding added for 16 KB alignment (<span style="color: #0d904f; font-family: Courier;">-Wl,-z,max-page-size=16384</span> option), but several optimizations help us avoid this cost.</p> <ol> <li>Sparse read-only file systems ensure that zero pages created for additional padding for 16 KB alignment are not written to disk. For example, EROFS knows a certain range of a file is zero filled, and it will not need to do any IO if this part of the file is accessed.</li> <li>Read-writeable file systems handle zero pages on a case-by-case basis. For example, In Android 15, for files installed as part of applications <span style="color: #0d904f; font-family: Courier;"><a href="https://developer.android.com/reference/android/content/pm/PackageManager" target="_self">PackageManager</a></span> reclaims this space.</li> </ol> <h4><span style="font-size: medium;"><b>Memory Management</b></span></h4> <ol> <li>The Linux <a href="https://en.wikipedia.org/wiki/Page_cache" target="_self">page cache</a> has been modified not to read ahead for these extra padding spaces, thereby saving unnecessary memory load.</li> <li>These pages are blank padding, and programs never read this. It’s the space in-between usable parts of the program, purely for alignment reasons.</li> </ol> <h4><span style="font-size: medium;"><b>Linux Kernel</b></span></h4> <p>The Linux kernel is deeply tied to a specific page size, so we must choose which page size to use when building the kernel, while the rest of the operating system remains the same.</p> <h4><span style="font-size: medium;"><b>Android Applications</b></span></h4> <p><b><em>All applications with native code or dependencies need to be recompiled for compatibility with 16 KB page size devices.</em></b></p> <p>Since most native code within Android applications and SDKs have been built with 4 KB page size in mind, they need to be re-aligned to 16 KB so the binaries are compatible with both 4 KB and 16 KB devices. For most applications and SDKs, this is a 2 step process:</p> <ol> <li>Rebuild the native code with 16 KB alignment.</li> <li>Test and fix on a 16 KB device/emulator in case there are hardcode assumptions about page size.</li> </ol> <p>Please see <a href="https://developer.android.com/16kb-page-size" target="_self">our developer documentation</a> for more information.</p> <blockquote><b>NOTE:</b> If you are an SDK or tools developer, you should add 16 KB support as soon as possible so that applications can work on 16 KB using your SDK or tools.</blockquote> <h2 style="text-align: left;"><span style="font-size: x-large;">Developing for 16 KB devices</span></h2> <p>There are no production Android devices available today or expected for the Android 15 release that support a 16 KB page size. In order to fix this problem, we are taking steps to work with our partners to make a developer option available on existing devices. This developer option is meant for application development and testing. We are also making a 16 KB emulator target available for developers in Android Studio.</p> <h3 style="text-align: left;"><span style="font-size: large;">16 KB Developer option on device</span></h3> <p>In Android 15, we implemented a developer option that lets users switch between 16 KB and 4 KB page size on the device in order to test their application with either of the page sizes. This option is available on Pixel 8 and Pixel 8 Pro starting in the Android 15 QPR1 Beta, and we're collaborating closely with SoC and OEM partners to enable the option on additional devices soon.</p> <image><div style="text-align: center;"><img alt="screen grab of 16KB developer option on device" border="0" height="640" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdO3BATJTnfIVhyphenhyphenbDVglPPckZgFwGB9rOzUpsFEntFS-LNllfA2Wu0_dZwwL5EIGYNWAt07o1MY1YAw_o0W_I3Rq1xEcvdrJcV6_nhyIuhu0ZsbrzzcVWJkvPLyJc-QaRUNyZCpZXD2m_xGNKg64TqrHEfBkSjJj-d4hb8tVemzzFvaVDYxSYu4_J1fXc/s1600/5e6vMM89mRtgQVE.png" width="288" /></div></image><br /> <p>When built for 16 KB pages, the same binary will work with 4 KB and 16 KB devices, however the Linux kernel has to be separate. In order to solve this problem, we’ve added a way to include an extra kernel you can switch to as a developer option. Incrementally compressed, with one copy for each page size and takes ~12-16 MB of space on disk.</p> <p>Using the 16 KB developer option will require wiping the device once and an unlocked bootloader. Following flashing, developers will be able to switch between a 4 KB and 16 KB mode by toggling the developer option over a reboot.</p> <p>If you are a device manufacturer or SoC developer, see <a href="https://source.android.com/docs/core/architecture/16kb-page-size/16kb-developer-option" target="_self">our instructions</a> on how to enable and use this.</p> <h3 style="text-align: left;"><span style="font-size: large;">16 KB on x86_64 desktops</span></h3> <p>While 16 KB pages are an ARM-only feature, we recognize that many developers are using emulators on x86_64 hardware. In order to bridge this gap for developers, we’ve added support to emulate 16 KB page size for applications on x86_64 emulators. In this mode, the Kernel runs in 4 KB mode, but all addresses exposed to applications are aligned to 16 KB, and arguments to function calls such as <span style="color: #0d904f; font-family: Courier;">mmap(...MAP_FIXED...)</span> are verified to be 16 KB aligned.</p> <p>To get started, you can <a href="https://developer.android.com/guide/practices/page-sizes#16kb-emulator" target="_self">download and run the 16 KB pages emulator inside the Android Studio SDK manager</a>. This way, even if you don’t have access to ARM hardware, you can still ensure your applications will work with 16 KB page size.</p> <image><div style="text-align: center;"><img alt="16 KB pages emulator inside the Android Studio SDK manager" border="0" height="367" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH_OBnY0m2xdrhuAm-rOS4tISeWQMtLhIOnEZ7AOBOn0H8IDpFo5yjJUrGHxY0tX1AR-TLaH-4ctxhgakc_uaeQpTgVbyV3E4h_7lW_V19yuD4shhc-6FCKagcv3Lc5rwcTPfOPPdIgexOUNPlruiCRySwJwSCmQBRTrM0eK5Vu32V3OleoHa9XHrzsDU/w640-h367/image1.png" width="640" /></div></image> <h2 style="text-align: left;"><span style="font-size: x-large;">Future</span></h2> <p>In this post, we’ve discussed the technical details of how we are restructuring memory in Android to get faster, more performant devices. Android 15 and AOSP work with 16 KB pages, and devices can now implement 16 KB pages as a development option. This required changes from the bottom to the top of the operating system, in our development tooling, and throughout the Android ecosystem.</p> <p>We are looking forward to application and SDK developers now to take advantage of these options and prepare for more performant and efficient Android devices in near future.</p>Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-12315923157384880282024-08-20T10:00:00.000-07:002024-08-22T09:23:12.547-07:00Tune in for our summer episode of #TheAndroidShow on August 27! <meta name="twitter:image" content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7v9gfpFLnj8UwAhTOMl_NitJETsU_oTTfN-t3Ut4VlDL07KkfJOtqTXeJvYXKXptTrMzxz3ryTYdVs427DkzORf0_jK3pzvh1x2OpdC40JILuO78pk4bScY_a60Ec-ILOSOoP7XeUQDbK5QtpLMVe38-GKWr_LvapNAhk1WDb4Udg81d3jGTqHvmkE18/s1600/%23TAS-24Q3-Social.png"><div class="separator" style="clear: both;"> <img style="display:none" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7v9gfpFLnj8UwAhTOMl_NitJETsU_oTTfN-t3Ut4VlDL07KkfJOtqTXeJvYXKXptTrMzxz3ryTYdVs427DkzORf0_jK3pzvh1x2OpdC40JILuO78pk4bScY_a60Ec-ILOSOoP7XeUQDbK5QtpLMVe38-GKWr_LvapNAhk1WDb4Udg81d3jGTqHvmkE18/s1600/%23TAS-24Q3-Social.png"> <em>Posted by Anirudh Dewani – Director, Android Developer Relations</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNG_rjHAPzG3qJWXWN7fmYIO8GK9SC55iexKJA3NXWTEDeNrS01wNuEa1z2lG51MljqBHRwkQKb0mijVnqKVhwzPFL_segFml_MMlknG8Ym8pO5_0Ge9jkY9aQUFWfTAZB5KocQcC2tvL_NsIzMR7gHv0I-axnp0YanSE309CEXyB6jFQkvZr9oNwDNRQ/s1600/%23TAS-24Q3-Banner.png" imageanchor="1" ><img style="100%" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNG_rjHAPzG3qJWXWN7fmYIO8GK9SC55iexKJA3NXWTEDeNrS01wNuEa1z2lG51MljqBHRwkQKb0mijVnqKVhwzPFL_segFml_MMlknG8Ym8pO5_0Ge9jkY9aQUFWfTAZB5KocQcC2tvL_NsIzMR7gHv0I-axnp0YanSE309CEXyB6jFQkvZr9oNwDNRQ/s1600/%23TAS-24Q3-Banner.png" data-original-width="100%" data-original-height="800" /></a> <div><br/></div> <p>In just a few days, on Tuesday, August 27 at 10AM PT, we’ll be dropping our summer episode of #TheAndroidShow, on <a href="https://www.youtube.com/live/4T8lJiAtnFg" target="_self">YouTube</a> and on <a href="http://developer.android.com/events/show" target="_self">developer.android.com</a>. In this quarterly show, we’ll be unpacking all of the goodies coming out of this month’s Made by Google event and what you as Android developers need to know! </p><br/> <iframe class="BLOG_video_class" allowfullscreen="" youtube-src-id="McC2ceqdMr4" width="100%" height="398" src="https://www.youtube.com/embed/McC2ceqdMr4"></iframe> <div><br/></div> <p>With two new Wear OS 5 watches, we’ll <a href="https://android-developers.googleblog.com/2024/08/create-exceptional-experiences-pixel-new-watches-and-foldables.html" target="_self">show you how to get building for the wrist</a>. And with the latest foldable from Google, the Pixel 9 Pro Fold, we’ll show how you can leverage out of the box APIs and multi-window experiences to make your apps adaptive for this new form factor.</p> <p>Plus, Gemini Nano now has Multimodality, and we’ll be going behind-the-scenes to show you how teams at Google are using the latest model for on-device AI.</p> <p>#TheAndroidShow is your conversation with the Android developer community, this time hosted by <a href="https://x.com/queencodemonkey" target="_self">Huyen Tue Dao</a> and <a href="https://www.linkedin.com/in/johnzoeller/" target="_self">John Zoeller</a>. You'll hear the latest from the developers and engineers who build Android.</p> <p>Don’t forget to tune in live on August 27 at 10AM PT, live on <a href="https://www.youtube.com/live/4T8lJiAtnFg" target="_self">YouTube</a> and on <a href="http://developer.android.com/events/show" target="_self">developer.android.com/events/show</a>!</p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-4089164148873163002024-08-20T09:00:00.000-07:002024-08-20T09:00:00.139-07:00#WeArePlay | Meet the founders turning their passions into thriving businesses<meta name="twitter:image" content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNrZUz7AsjqnFhJZ3BiBy2mDVmKO6hCv66KtgSq7vZtgt9ZZiljd7_JNFJEyuOg7tF1HfYqOqSnW6MQLRoYOaPalEg4vC4XVwstTgXz-hzYmzqeAGmEmZ4R56DNL8UtllCGOoCkVcCpkE73wue1m40mPu2tHjPirvMwBMZiQZARYWiMRlhYRkmTfwfaZM/s1600/%23WeArePlay%20Social%20.png"> <img style="display:none" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNrZUz7AsjqnFhJZ3BiBy2mDVmKO6hCv66KtgSq7vZtgt9ZZiljd7_JNFJEyuOg7tF1HfYqOqSnW6MQLRoYOaPalEg4vC4XVwstTgXz-hzYmzqeAGmEmZ4R56DNL8UtllCGOoCkVcCpkE73wue1m40mPu2tHjPirvMwBMZiQZARYWiMRlhYRkmTfwfaZM/s1600/%23WeArePlay%20Social%20.png"> <p><em>Posted by Robbie McLachlan, Developer Marketing</em><p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik4qrvAXEbwjc73FqR0tLgTgjSzdsYGxfiWG8MDOX0ATzF7xhnycsjl_KyDcxZoGZx7uiGPcAi8C-ByRwvTjgkOqVI6uGQZ0jg2VML-56P7fZlIkSMVA7XnEN0t406X67IlMJPXc2iVNUlJC0DclM-ITEJ71bTaDSQJ-wii2mwXdfnMAjZLoAVO2a0vWU/s1600/Android%20Devs%20_%20Google%20Devs%20-Blog_Header_1200x600.jpg" imageanchor="1" ><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik4qrvAXEbwjc73FqR0tLgTgjSzdsYGxfiWG8MDOX0ATzF7xhnycsjl_KyDcxZoGZx7uiGPcAi8C-ByRwvTjgkOqVI6uGQZ0jg2VML-56P7fZlIkSMVA7XnEN0t406X67IlMJPXc2iVNUlJC0DclM-ITEJ71bTaDSQJ-wii2mwXdfnMAjZLoAVO2a0vWU/s1600/Android%20Devs%20_%20Google%20Devs%20-Blog_Header_1200x600.jpg" data-original-width="1058" data-original-height="800" /></a> <p>Our celebration of app and game businesses continues with <b><a href="http://g.co/play/weareplay" target="_self">#WeArePlay</a></b> stories from founders around the world. Today, we’re spotlighting the people who turned their passions into thriving businesses - from a passion for art and design from one game creator, to a passion for saving the environment from an app maker.</p> <a href="https://play.google.com/console/about/weareplay/" target="_self"><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoeyPr6yr7hDF_MNaGRMFdZAzeE-kVmKkfH6xelKJEhUFZibaFhAcWrVAymw-XHF4KUb00wKY9lSVO6unr5JUpdp0zDiINqYqh68tRYgN7ocdU2ERZ5Lva3pe1qtpuPPKZUxMiPXuQhOQwyyQ7LI-XXKKHZapDA1ll-AtjWQGxvB3iYYXZ4waYS320luI/s1600/04_NEW%20SOUTH%20WALES_SWEATY%20CHAIR_FOUNDER_BRIAN%20ZOU.jpg" data-original-width="1058" data-original-height="800" /></a><imgcaption><center><em>Brian, founder of SweatyChair<br/>Sydney, Australia</em></center></imgcaption> <p>During a gaming developer competition, Brian - alongside his wife and three other participants - built a challenging monster and bullet-dodging game called No Humanity within 48 hours, winning first place in the competition. From this, Brian founded his gaming company <a href="https://play.google.com/store/apps/dev?id=7577705676061143756&hl=en&gl=US" target="_self">SweatyChair</a>. No Humanity was improved and launched a week later and grew to over 9 million downloads. His passion for technology and art is how he champions a more active gaming experience, where players can create their own elements and play them in the game.</p><br/> <a href="https://play.google.com/console/about/weareplay/" target="_self"><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm1GYlxy3BYoRO_rGDdCbVfLQXQf057sVv0pSTsA6s5P_cQKDN8SiYG6Sh9dD8y9T5RKnc9-lG4iYbu6zdCZh2dSYlj_WgXnHHE8dr_sqiUsUgqoEGeUhKUZK3NnpundPud-MHbV2ZHDCxTkuB_lMbZ9L9YBWNP3uUncKKMKlEGrR89aAhgDwmRgi3FbQ/s1600/01_INDIA_COOL%20THE%20GLOBE_FOUNDER_PRACHI%20SHEVGAONKAR.png" data-original-width="1058" data-original-height="800" /></a><imgcaption><center><em>Prachi, founder and CEO of Cool The Globe<br/>Pune, India</em></center></imgcaption> <p>When Prachi travelled to Maharashtra, she saw first-hand how the effects of climate change impacted the locals. Her passion for protecting the environment led her to ask herself “What can I do about climate change?”. She vowed to reduce her carbon footprint and went on to create <a href="https://play.google.com/store/apps/details?id=org.cooltheglobe.ctg&hl=en_IN&gl=US" target="_self">Cool The Globe</a>, an app that helps people track daily actions to lower their emissions. Her dedication earned her the Young Changemaker Award in India. Next, she aims to add community dashboards for schools and organizations to follow their collective climate efforts.</p><br/> <a href="https://play.google.com/console/about/weareplay/" target="_self"><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAnuZI4z3fpr9owpI5Ouq0yqGp0F-q0WeRyRNcUV208VnR019ZlVaIN-pGZ8o0cz4in7MVfW1wug4DhdlEyDPayFFHv68zlqjmYQUSSfo3NbwT5mjUr98uBVt4dVYKn6qq1kCFVfRv17OamJRxBFjKzW49_23z4FfTRWrbfY3c7gel-0iOB-LF7py-s5s/s1600/01_FRANCE_YUKA_FOUNDERS_FRANC%CC%A7OIS%20MARTIN_BENOIT%20MARTIN_JULIE%20CHAPON_edited.png" data-original-width="1058" data-original-height="800" /></a><imgcaption><center><em>François, Benoit and Julie Co-founders of Yuka App<br/>Chatou, France</em></center></imgcaption> <p>Benoit is passionate about providing nutritious food for his children, so he went on a mission to buy healthier food for his family. Whilst shopping, he found label-reading tiring and wished for a tool to check ingredients automatically. He shared his idea with his brother François and close friend Julie. Together, the trio saw a real need to combine their passions for nutrition and technology and spent a weekend hammering out their concept before presenting the idea in a food hackathon they went on to win. Their winning project laid the groundwork for their app <a href="https://play.google.com/store/apps/details?id=io.yuka.android&hl=en&gl=fr" target="_self">Yuka</a>, which scans product labels to reveal their ingredients and health impact.</p><br/> <a href="https://play.google.com/console/about/weareplay/" target="_self"><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhppJtfOUA56T7GOvwEB5z0SvxvkvZjE9nX0HQlchKib9-tPH63xvXZkRdeu3B4pUwL_RzKy-RabIrk-NhO89QE3R8pGzDiiu3oF1aNhpSZJyboV5IdoocfQW9UI4VwdCLhRu9IeS-6vfDBPNSPHwN0ptrlAKyjSVBfzL38yolZ40A0Bd6AQK-uquvSh68/s1600/01_UK_PEANUT%20APP_FOUNDER_MICHELLE%20KENNEDY.jpg" data-original-width="1058" data-original-height="800" /></a><imgcaption><center><em>Michelle, founder of Peanut App<br/>London, UK</em></center></imgcaption> <p>When the loneliness of early motherhood hit after her first child, Michelle sought community and answers from online forums. When the forums didn’t provide the safe space she was looking for, her passion for building community along with her 10 years of experience in social networking inspired her to create <a href="https://play.google.com/store/apps/details?id=com.teampeanut.peanut&%24desktop_fallback_url=https%3A%2F%2Fwww.peanut-app.io%2Fdownload&%24fallback_url&referring_url=https%3A%2F%2Fwww.google.com&~campaign=www.google.com&_branch_match_id=1335191430042627205&utm_source=website&utm_campaign=www.google.com&utm_medium=marketing&_branch_referrer=H4sIAAAAAAAAA3WMQQrCMBBFT5PuTKAKglDEhV6jjEmahkxnhmlKrm%2BLKxfCX73Pe3Otst6ckwi0VQsiFjMVBxSUc7ib%2FhLiWirLOAHiG3wZN8VhPjxzfpj%2Bta%2B1Zr%2BF01HIvLPAjZAhdBqnqJop%2FRETc8JoPS%2BduT49LAI50fB7fQAufs2zqAAAAA%3D%3D" target="_self">Peanut</a>. The app helps moms to connect, make friends, and find support. With over 2.3 million downloads and a budding global community, the Peanut team recently revamped the main feed for greater personalization and introduced an ad-free option.</p> <p>Discover more <a href="https://play.google.com/console/about/weareplay/" target="_self">global #WeArePlay stories</a> and share your favorites. </p> <br /><br /> <p></p><center> How useful did you find this blog post? </center><p></p> <p></p><center> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=1%E2%98%85+%E2%80%93+Not+at+all&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=2%E2%98%85+%E2%80%93+Not+very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=3%E2%98%85+%E2%80%93+Somewhat&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=4%E2%98%85+%E2%80%93+Very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=5%E2%98%85+%E2%80%93+Extremely&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> </center><p></p> <div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s260/lockup_ic_Google_Play_H_260x53px_clr.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="53" data-original-width="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s200/lockup_ic_Google_Play_H_260x53px_clr.png" width="200" /></a></div><p></p><p></p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-2182790410175470952024-08-14T08:00:00.000-07:002024-08-14T08:00:00.109-07:00Indie Games Fund: Google Play’s $2m fund in Latin America is back<meta name="twitter:image" content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirv61bOvpJAdO5MME-kYijXHmMJa0y0XHCyv8-JlrRA7AZkafdyoC5mWRwTl4uzkDmuEk7mPJk19wZ3uPmIXWMffR_WRDfaWwORTAYg-6EcXRPjzt4j7Y-LztyuI2MT0Ddax2ouwgBIxrN_g5RQyGydQU1QCgAWF5U2YsvvR33KwA2xKXgLP0qKwGblt8/s1600/Indie-Games-Social%20%281%29.png"> <img style="display:none" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirv61bOvpJAdO5MME-kYijXHmMJa0y0XHCyv8-JlrRA7AZkafdyoC5mWRwTl4uzkDmuEk7mPJk19wZ3uPmIXWMffR_WRDfaWwORTAYg-6EcXRPjzt4j7Y-LztyuI2MT0Ddax2ouwgBIxrN_g5RQyGydQU1QCgAWF5U2YsvvR33KwA2xKXgLP0qKwGblt8/s1600/Indie-Games-Social%20%281%29.png"> <em>Posted by Daniel Trócoli – Google Play Partnerships</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsnwZICv-ai8o82gYHENBb6XYQv4wrFW6bZWcWUIkNTeCF0gBL6mDXY55D2RwayzrnTHRwAsJqqveW7Gq4gUjxGAF0UAfAfaB70nkB4k_mBJlEfNIKAluismMmMY8Z0X9uki3Z5_Nfm5CfeVqC6EEyq37q-LikwoiIL1YE5uojmq7htiKYcWCmtzdrva4/s1600/Indie-Games-Banner.png" imageanchor="1" ><img style="100%" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsnwZICv-ai8o82gYHENBb6XYQv4wrFW6bZWcWUIkNTeCF0gBL6mDXY55D2RwayzrnTHRwAsJqqveW7Gq4gUjxGAF0UAfAfaB70nkB4k_mBJlEfNIKAluismMmMY8Z0X9uki3Z5_Nfm5CfeVqC6EEyq37q-LikwoiIL1YE5uojmq7htiKYcWCmtzdrva4/s1600/Indie-Games-Banner.png" data-original-width="100%" data-original-height="800" /></a> <p>Back again for 2024, we’re opening up applications for <a href="https://rsvp.withgoogle.com/events/indies-fund-2024" target="_self">Google Play’s Indie Games Fund</a> in Latin America - as part of our commitment to helping developers of all sizes grow on Google Play. Check out the <a href="https://rsvp.withgoogle.com/events/indies-fund-2023/selectedstudios" target="_self">10 selected studios</a> who received a share of the fund last year.</p> <p>We will award a share of $2 million in addition to hands-on support to selected small games studios based in Latin America.</p> <p>The program is open to indie game developers who have already launched a game - whether it’s on Google Play or another mobile platform, PC or console. Each selected recipient will get between $150,000 and $200,000 to help them take their game to the next level, and build successful businesses. </p> <p>Check out all eligibility criteria and <a href="https://rsvp.withgoogle.com/events/indies-fund-2024" target="_self">apply now</a>. Applications close at 12:00pm BRT September 13, 2024. Priority will be given to applications received by 12:00pm BRT August 30, 2024.</p> <p>For more updates about all our programs, resources and tools for indie game developers visit our <a href="https://play.google.com/console/about/programs/indiegames/" target="_self">website</a>. </p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-16494129486732266262024-08-13T11:00:00.000-07:002024-08-14T13:54:03.665-07:00Create exceptional experiences on Pixel’s new watches and foldables<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuaPH1xM8wptuzeZqadTmrOkdl5nFfbr-1_wqa138KXGJ9lMW7lIDt5ct-36N__zy9Nis0nPkh7xpJxoDoZ3Kq8NNUEZhZ3ifIOAouYDvKNKGwokMdyPvBxXShUb-ay0rE0CHpSp6z4TkjvTkI3h5I2AyaH2QKe7wpMubdFXsm8CKbB5d6-1q8adGTHmY/s1600/MBG-Social.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuaPH1xM8wptuzeZqadTmrOkdl5nFfbr-1_wqa138KXGJ9lMW7lIDt5ct-36N__zy9Nis0nPkh7xpJxoDoZ3Kq8NNUEZhZ3ifIOAouYDvKNKGwokMdyPvBxXShUb-ay0rE0CHpSp6z4TkjvTkI3h5I2AyaH2QKe7wpMubdFXsm8CKbB5d6-1q8adGTHmY/s1600/MBG-Social.png" style="display: none;" /> <em>Posted by Maru Ahues Bouza – Product Management Director</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh9F39361p4vuxQtItGxocdAdiYZwj3l1JSTgHdeLT9EiDPK3jdXeMMwyIt7tm-1p8Plfe2zPHcgZ-6ItylwR706al0vHovMgAO5YCHyja4PHHdiZ2k5CSgIrUS2ncpMKklz39DFnRLpyv50gfGtbBpE2RCK0ifZiMDyy_qFtoeKx58B8CzsBMOopR4dU/s1600/4%20%283%29.png"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh9F39361p4vuxQtItGxocdAdiYZwj3l1JSTgHdeLT9EiDPK3jdXeMMwyIt7tm-1p8Plfe2zPHcgZ-6ItylwR706al0vHovMgAO5YCHyja4PHHdiZ2k5CSgIrUS2ncpMKklz39DFnRLpyv50gfGtbBpE2RCK0ifZiMDyy_qFtoeKx58B8CzsBMOopR4dU/s1600/4%20%283%29.png" /></a> <p>Pixel just announced the latest devices coming to the Android ecosystem, including <a href="https://blog.google/products/pixel/google-pixel-9-pro-fold/" target="_self">Pixel 9 Pro Fold</a> and <a href="https://blog.google/products/pixel/google-pixel-watch-3/" target="_self">Pixel Watch 3</a>. These devices bring innovation to the foldable and wearable spaces, with larger screen sizes and exceptional performance.</p> <p>Not only are these devices exciting for consumers, but they are also important for developers to consider when building their apps. To prepare you for the new Pixel devices and all the innovations in <a href="https://developer.android.com/large-screens" target="_self">large screens</a> and <a href="https://developer.android.com/wear" target="_self">wearables</a>, we’re diving into everything you need to know about building adaptive UIs, creating great Wear OS 5 experiences, and enhancing your app for larger watch displays.</p> <h2><span style="font-size: x-large;">Building for Pixel 9 Pro Fold with Adaptive UIs</span></h2> <p>Pixel unveiled their new foldable, Pixel 9 Pro Fold with Gemini, at Made By Google. This device has the largest inner display on a phone<sup>1</sup> and is 80% brighter than last year’s Pixel Fold. When it’s folded, it’s just like a regular phone, with a 6.3-inch front display. Users have options for how to engage and multitask based on the screen they are using and the folded state of their device - meaning there are multiple different experiences that developers should be considering when building their apps.</p> <image><div style="text-align: center;"><img alt="the Pixel 9 Pro Fold" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjRCVDL0O8jc0Yz-WxBdJhqyxi1_PBsrwVyiLDZ_ay819NjnTpo2MiVPT0Ijz0Aa5OBqz1W3VbkG6LvM-dYSMKEhSjWcnuu93RNI7hQ7qf9AZIqsrwux53TvJbzMAwVZQoppC2-fQe26hcAOxyimRTiEqfoIjFf5Y6NblOQWBqGiqjS8W9UadpT086sGU/s16000/image1.png" /></div></image><br /> <p>Developers can help their app look great across the four different postures – inner, front, tabletop, and tent – available on Pixel 9 Pro Fold by making their app adaptive. By dynamically adjusting their layouts—swapping components and showing or hiding content based on the available window size rather than simply stretching UI elements—adaptive apps take full advantage of the available window size to provide a great user experience.</p> <p>When building an adaptive app, our core guidance remains the same – use <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive/window-size-classes" target="_self">WindowSizeClasses</a> to define specific breakpoints for your UI. Window size classes enable you to change your app layout as the display space available to your app changes, for example, when a device folds or unfolds, the device orientation changes, or the app window is resized in multi‑window mode.</p> <p><a href="https://android-developers.googleblog.com/2024/05/scaling-across-screens-with-compose-google-io-24.html" target="_self">Announced</a> at Google I/O 2024, we’ve introduced APIs that, under the hood, take advantage of these WindowSizeClasses for you. These APIs provide a new way to implement common <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive" target="_self">adaptive layouts in Compose</a>. The three components in the library – NavigationSuiteScaffold, ListDetailPaneScaffold, and SupportingPaneScaffold – are designed to help you build an adaptive app with UI that looks great across window sizes.</p> <p>Finally, developers who want to build a truly exceptional experience for foldables should consider supporting tabletop mode, where the phone sits on a surface, the hinge is in a horizontal position, and the foldable screen is half opened. You can use the Jetpack WindowManager library, leveraging <a href="https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State" target="_self">FoldingFeature.State</a> and <a href="https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation" target="_self">FoldingFeature.Orientation</a> to determine whether the device is in tabletop mode. Once you know the posture the device is in, update your app layout accordingly. For example, media apps that adapt to tabletop mode typically show audio information or a video above the fold and include controls and supplementary content just below the fold for a hands-free viewing or listening experience.</p> <image><div style="text-align: center;"><img alt="Screenshot of gameplay from Asphalt Legends Unite (Gameloft)" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaL3psoq5siYUfWOkD5AOdarE00Fvo0W0XhyphenhyphenBMZ4JS7_tUEG3GUaJeJ30Kpt3_Ag0u89mzJhA708QqK_3Q7BBLt59wTQMZz6cTR7QPIHpmP80dHnt1ML6BQkr1W6IE4Oom5PvTTSDq1l7vC5P7v6tPbKgVsgTvxuG7wJF9DNuryOiiAm-Z-YUnOR7_c5s/s1600/image2.png" width="100%" /></div><imgcaption><center><em>Asphalt Legends Unite (Gameloft)</em></center></imgcaption></image><br /> <p>Even games are making use of foldable features: from racing games like Asphalt Legends Unite and Disney Speedstorm to action games like Modern Combat 5 and Dungeon Hunter 5, Gameloft optimized their games so that you can play not just in full-screen but also in split-view tabletop mode which provides a handheld game console experience. With helpful features like detailed game maps and enhanced controls for more immersive gameplay, you’ll be drifting around corners, leveling up your character, and beating the bad guys in record time!</p> <h2><span style="font-size: x-large;">Preparing for Pixel Watch 3: Wear OS 5 and Larger Displays</span></h2> <p>Pixel Watch 3 is the latest smartwatch engineered by Google, designed for performance inside and out. With this new device, there are also new considerations for developers. Pixel Watch 3 rings in the stable release of <a href="https://developer.android.com/training/wearables/versions/5" target="_self">Wear OS 5</a>, the latest platform version, and has the largest display ever from the Pixel Watch series - meaning developers should think about the updates introduced in Wear OS 5 and how their UI will look on varied display sizes.</p> <image><div style="text-align: center;"><img alt="the Pixel Watch 3" border="0" height="400" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5yD4rwhhtsbiRqZQ5Svzz40lgK6UmXhN7G-KEz52FWsaHNrFpbA6D8Dwqq6E1fiA7y2PPX5rpDGSurVr0pApVp-IlLTSPEsHVtOQ8bteqOS69NPRRWr8H2hXRpQr28owNgVrphpqIRuQPScBnyScRaQorDMwtdQMOk7TrqyRqGjVn4gVVzqWhMsO2u9s/w400-h400/image3.png" width="400" /></div></image><br /> <p>Wear OS 5 is based on Android 14, so developers should take note of the system behavior changes specific to Android 14. The system includes support for the <a href="https://support.google.com/android/answer/13530434" target="_self">privacy dashboard</a>, giving users a centralized view of the data usage for all apps running on Wear OS 5. For apps that have updated their target SDK version to Android 14, there are a few additional changes. For example, the system moves always-on apps to the background after they're visible in ambient mode for a certain period of time. Additionally, watches that launch with Wear OS 5 or higher will only support watch faces that use the <a href="https://developer.android.com/training/wearables/wff" target="_self">Watch Face Format</a>, so we recommend that developers migrate to using the format. You can see <a href="https://developer.android.com/training/wearables/versions/5/changes" target="_self">all the behavior changes</a> you should prepare your app for.</p> <p>Another important consideration for developers is that the Pixel Watch 3 is available in two sizes, 41 mm and 45 mm. Both sizes offer more display space than ever<sup>2</sup>, having 16% smaller bezels, which gives the 41 mm watch 10% more screen area and the 45 mm watch 40% more screen area than on the Pixel Watch 2! As a developer, review and apply the principles on <a href="https://developer.android.com/design/ui/wear/guides/foundations/adaptive-layouts" target="_self">building adaptive layouts</a> to give users an optimal experience. We created tools and guidance on how to develop <a href="https://developer.android.com/training/wearables/compose/screen-size" target="_self">apps</a> and <a href="https://developer.android.com/training/wearables/tiles/screen-size" target="_self">tiles</a> for different screen sizes. This guidance will help to build responsive layouts on the wrist using the latest Jetpack libraries, and make use of Android Studio’s preview support and screenshot testing to confirm that your app works well across all screens.</p> <p>Learn more about all these exciting updates in the <a href="https://www.youtube.com/watch?v=6K5cITvVcoM" target="_self">Building for the future of Wear OS</a> technical session, shared during this year’s Google I/O event.</p> <h2><span style="font-size: x-large;">Learn more about how to get started preparing your app</span></h2> <p>With these new announcements from Pixel, it’s a great time to make sure your app looks great on all the screens your users love most. Get your app <a href="https://developer.android.com/large-screens" target="_self">ready for large screens</a> by <a href="https://developer.android.com/develop/ui/compose/layouts/adaptive" target="_self">building adaptive layouts</a> and learn more about all things Wear OS on our <a href="https://developer.android.com/wear" target="_self">Wear OS developer site</a>. For game developers, be sure to read <a href="https://developer.android.com/games/develop/multiplatform/support-large-screen-resizability" target="_self">our large screen game optimization guide</a> and check the <a href="https://developer.android.com/games/engines/unity/unity-large-screen" target="_self">sample project</a> to learn the best practices for leveling up your game for large screen and foldable devices.</p> <p>For even more of the latest from Android, tune into the Android Show on August 27th. We’ll talk about Wear OS, adaptive apps, Jetpack Compose, and more!</p><br /> <div><small>1 Among foldable phones in <b>the United States</b>. Based on inner display.</small>&nbsp;</div> <div><small>2 Compared with Pixel Watch 2.</small></div>Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-76427821223713052342024-08-08T09:00:00.000-07:002024-08-08T09:01:30.730-07:00#WeArePlay | How Jakub is infusing Czech mythology into his games<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNrZUz7AsjqnFhJZ3BiBy2mDVmKO6hCv66KtgSq7vZtgt9ZZiljd7_JNFJEyuOg7tF1HfYqOqSnW6MQLRoYOaPalEg4vC4XVwstTgXz-hzYmzqeAGmEmZ4R56DNL8UtllCGOoCkVcCpkE73wue1m40mPu2tHjPirvMwBMZiQZARYWiMRlhYRkmTfwfaZM/s1600/%23WeArePlay%20Social%20.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNrZUz7AsjqnFhJZ3BiBy2mDVmKO6hCv66KtgSq7vZtgt9ZZiljd7_JNFJEyuOg7tF1HfYqOqSnW6MQLRoYOaPalEg4vC4XVwstTgXz-hzYmzqeAGmEmZ4R56DNL8UtllCGOoCkVcCpkE73wue1m40mPu2tHjPirvMwBMZiQZARYWiMRlhYRkmTfwfaZM/s1600/%23WeArePlay%20Social%20.png" style="display: none;" /> <em>Posted by Robbie McLachlan, Developer Marketing</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik4qrvAXEbwjc73FqR0tLgTgjSzdsYGxfiWG8MDOX0ATzF7xhnycsjl_KyDcxZoGZx7uiGPcAi8C-ByRwvTjgkOqVI6uGQZ0jg2VML-56P7fZlIkSMVA7XnEN0t406X67IlMJPXc2iVNUlJC0DclM-ITEJ71bTaDSQJ-wii2mwXdfnMAjZLoAVO2a0vWU/s1600/Android%20Devs%20_%20Google%20Devs%20-Blog_Header_1200x600.jpg"><img border="0" data-original-height="800" data-original-width="1058" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik4qrvAXEbwjc73FqR0tLgTgjSzdsYGxfiWG8MDOX0ATzF7xhnycsjl_KyDcxZoGZx7uiGPcAi8C-ByRwvTjgkOqVI6uGQZ0jg2VML-56P7fZlIkSMVA7XnEN0t406X67IlMJPXc2iVNUlJC0DclM-ITEJ71bTaDSQJ-wii2mwXdfnMAjZLoAVO2a0vWU/s1600/Android%20Devs%20_%20Google%20Devs%20-Blog_Header_1200x600.jpg" /></a> <p>In our latest film for <a href="https://play.google.com/console/about/weareplay/" target="_self">#WeArePlay</a>, which celebrates the people behind groundbreaking apps and games, Jakub takes us on a journey through the world of <a href="https://play.google.com/store/apps/dev?id=7745268094426388671&amp;gl=cz" target="_self">Amanita Design</a>. Born in Prague, Czech Republic, his journey into the world of games began with a passion for animation and an eye for artistic detail. Driven by a vision to create games that blend captivating art with immersive storytelling, he founded his company Amanita Design in 2003.</p> <p>Today, the thriving business is renowned for its unique approach to games, drawing inspiration from Czech landscapes, fairy tales, and the rich cultural heritage of its homeland. With a dedicated team of around 30, they are crafting games as visually stunning as they are narratively rich. Discover how he is merging the charm of Czech culture with the magic of gaming.</p><br /> <iframe allowfullscreen="" class="BLOG_video_class" height="398" src="https://www.youtube.com/embed/uhQxUVZccLQ" width="100%" youtube-src-id="uhQxUVZccLQ"></iframe><br /> <h4><span style="font-size: large;">What’s the inspiration behind Amanita Design and your game Machinarium?</span></h4> <p>I have a love for nature, fairy tales, and Czech culture. Growing up in Prague, I was surrounded by beautiful landscapes and old buildings that sparked my imagination. I studied classical animation and always wanted to create something that felt both magical and deeply connected to my roots. Our games often use Czech folklore and the natural world. In 2009, when we developed <a href="https://play.google.com/store/apps/details?id=air.net.machinarium.Machinarium.GP&amp;gl=cz" target="_self">Machinarium</a>, I was fascinated with industrial decay and old machinery. The abandoned factories around Prague provided a gritty backdrop for the game. We paired this with a compelling story and handcrafted visuals. We even used natural sounds from our environment to add an authentic touch.</p><br /> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi678R_TB3Djg-HE0kkWtA5lEytIGUWn7MBMxyozLhzjh5nTT2jN8bajmRbcnF-dca3oTKu1OCEZM8bj_VN3Jv109srKcT3fGV7dbc_allR7w_SQavpLnfok_hgGrIGL0WCokV9qIzTKFZeLxKno3MzFwRE5oG7WYYTFUDZyG5neuH7WHRXQN7Qglbxakc/s1600/12_CZECH%20REPUBLIC_AMANITA%20DESIGN_GAME.png"><img border="0" data-original-height="800" data-original-width="1058" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi678R_TB3Djg-HE0kkWtA5lEytIGUWn7MBMxyozLhzjh5nTT2jN8bajmRbcnF-dca3oTKu1OCEZM8bj_VN3Jv109srKcT3fGV7dbc_allR7w_SQavpLnfok_hgGrIGL0WCokV9qIzTKFZeLxKno3MzFwRE5oG7WYYTFUDZyG5neuH7WHRXQN7Qglbxakc/s1600/12_CZECH%20REPUBLIC_AMANITA%20DESIGN_GAME.png" /></a><br /> <h4><span style="font-size: large;">Did you always imagine you’d be an entrepreneur?</span></h4> <p>I didn’t initially see myself as an entrepreneur. My journey began with a passion for games and animation, and I started Amanita Design as a natural extension of my interests. I began the studio right after finishing school, driven by a desire to create and share my artistic vision. Over time, as the studio grew organically, I embraced the role of an entrepreneur but it was the love for game development that initially set me on this path.</p> <h4><span style="font-size: large;">What sets your games apart?</span></h4> <p>What makes our games stand out is the mix of old-world craftsmanship with today’s tech. We really enjoy incorporating hand-painted cardboard characters and using natural materials for sound effects, which adds a unique, tactile feel to our work. We draw deeply from Czech culture, nature, and fairy tales, giving each game a distinctive and enchanting touch. It’s all about creating something authentic and immersive, and we hope that passion resonates with our players.</p><br /> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfQHX7yONg2pPqoZfA9k2KAgp4ITBY3LToCDKEWUjcr74ocAjK4upHsuK6Scx5EzFyMa0DAGdG_cluqFCMZb8IyyiNGzriSCch0oMN0zg8D07JhqHhdli1TNWgFej_s1BFaARc3qE9kjZQXRRzG_2o8FW3GzTkOOUOyW6zbBtYyuNx_OWo8w1aNzjkYuc/s1600/11_CZECH%20REPUBLIC_AMANITA%20DESIGN_FOUNDER_FAMILY.png"><img border="0" data-original-height="800" data-original-width="1058" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfQHX7yONg2pPqoZfA9k2KAgp4ITBY3LToCDKEWUjcr74ocAjK4upHsuK6Scx5EzFyMa0DAGdG_cluqFCMZb8IyyiNGzriSCch0oMN0zg8D07JhqHhdli1TNWgFej_s1BFaARc3qE9kjZQXRRzG_2o8FW3GzTkOOUOyW6zbBtYyuNx_OWo8w1aNzjkYuc/s1600/11_CZECH%20REPUBLIC_AMANITA%20DESIGN_FOUNDER_FAMILY.png" /></a><br /> <h4><span style="font-size: large;">What does the future look like for Amanita Design?</span></h4> <p>We’re working on several new games and exploring different distribution models, such as the free-to-try approach on mobile platforms. Our goal is to continue creating unique and artistically rich games that resonate with a global audience. As technology evolves, we plan to adapt and innovate, maintaining our focus on storytelling and artistic craftsmanship while embracing new opportunities in the gaming industry.</p> <p>Discover more <a href="" target="_self">global #WeArePlay stories</a> and share your favorites.</p> <br /><br /> <p></p><center> How useful did you find this blog post? </center><p></p> <p></p><center> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=1%E2%98%85+%E2%80%93+Not+at+all&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=2%E2%98%85+%E2%80%93+Not+very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=3%E2%98%85+%E2%80%93+Somewhat&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=4%E2%98%85+%E2%80%93+Very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=5%E2%98%85+%E2%80%93+Extremely&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> </center><p></p> <div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s260/lockup_ic_Google_Play_H_260x53px_clr.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="53" data-original-width="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s200/lockup_ic_Google_Play_H_260x53px_clr.png" width="200" /></a></div><p></p><p></p>Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-81380530860818196832024-08-06T09:00:00.000-07:002024-08-06T09:01:51.472-07:00Android Device Streaming: Announcing Early Access to Samsung, Xiaomi, and Oppo Device Labs<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrZUrcdVXeHfTLAR0aoOJ0pMIAROCKRaTSh3L0Y8yErEAUxZLYO9aLYt0mDaP5JKn1ltxYaAEoYyWvQffr-bz4tAFx85VnHKl2hZLtIzkmWHaQBFfewdAoKUTJ-0dhpLlt1_TgBbrmLSVMoVghe2gCl7whqiio6LVNM0aZLPuggQpf-vsxRG1VbbdZyfU/s1600/Android-Studio-white-Social.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrZUrcdVXeHfTLAR0aoOJ0pMIAROCKRaTSh3L0Y8yErEAUxZLYO9aLYt0mDaP5JKn1ltxYaAEoYyWvQffr-bz4tAFx85VnHKl2hZLtIzkmWHaQBFfewdAoKUTJ-0dhpLlt1_TgBbrmLSVMoVghe2gCl7whqiio6LVNM0aZLPuggQpf-vsxRG1VbbdZyfU/s1600/Android-Studio-white-Social.png" style="display: none;" /> <em>Posted by Grant Yang (Product Manager for OmniLab) &amp; Adarsh Fernando (Product Manager for Android Studio)</em> <a href="https://developer.android.com/studio/run/android-device-streaming"><img border="0" data-original-height="800" data-original-width="1058" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzZ29Po8DAXlalAbJcUl5ihv-sHRggxvQvHcX5BeK5y0J5829QNC4ayvLjwfJcORLFRgJibUKMxHw9UejycQYLQPZ0Ol3D51juDg5sHKmDGsvIHtFxcAQWeqwK4tLy3ReHu7gxZq8NaZX0d7p3XwwGPcETKcSv0f4QrRACsUdn2lH_BLDHVYTXqgjVLyg/s1600/Android-Studio-header.png" /></a> <p>At Google I/O 2024, we announced <a href="https://developer.android.com/studio/run/android-device-streaming" target="_self">Android Device Streaming</a> in open beta, which allows you as a developer to more easily access and interactively test your app on real physical devices located in Google data centers and streamed directly to Android Studio. This enables teams in any location to access a variety of devices across top Android device manufacturers, including the latest family of Google Pixel and Samsung Galaxy series devices.</p> <p>We’re significantly expanding on the diversity of devices available in this service by working closely with Android device manufacturers (also known as original equipment manufacturers, or OEMs)—such as Samsung, Xiaomi, and Oppo—to connect their device labs to Android Device Streaming, so you can access even more physical devices directly in your workflow in Android Studio. This integration is offered with the same performance, stability, and security benefits you get with devices provided by Google. Keep reading for more details below, as well as how you can sign up for the early access and take advantage of these new devices.</p> <image><div style="text-align: center;"><img id="imgFull" alt="screen grab of Device Streaming in Android Studio" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQxOgPDdws9LkCvz4uTTIdxyeMQ2fYF6Errjb4oqzy2kYS61wSPy-vr47vr2xqvIxgPKYfTPRDpMH4ndaVlHSjK4QN1RKGKml9tEcYfOFb52l8jE5VXOTszXiOBPa2tX00bqYH8Liy5CHTXcrE7OY-1Je1taSjuE2EHOTwskk8gKA0VrPlhWpotQ7ulNM/s1600/image2.png" width="100%"/></div><imgcaption><center><em>Access devices hosted by Google and other OEMs, such as Samsung, with Android Device Streaming, powered by Firebase</em></center></imgcaption></image><br/> <h3>Signup for Early Access to OEM Lab Devices</h3> <p>If you haven’t already done so, follow the steps to get up and running with the beta release of <a href="https://developer.android.com/studio/run/android-device-streaming" target="_self">Android Device Streaming</a>, which will give you access to all the Google-hosted devices to test with directly from Android Studio. Later this year, we will start an Early Access Program that allows participants to use Android Device Streaming to connect to devices hosted by our OEM partners. This expands the catalog of test devices available to you with Android Device Streaming.</p> <p>To kick off this program, we’re first partnering with Samsung, Xiaomi, and Oppo. These labs will be situated in various locations around the world, and you will be able to use the Firebase project you’re already using with Android Device Streaming in Android Studio to access them. Your Firebase project’s administrator will have control to enable or disable individual OEM labs.</p> <p>If you’d like to participate in the EAP for accessing OEM device labs, fill out <a href="http://d.android.com/android-device-streaming/registration" target="_self">this form</a>, and we will let you know if you and your team have been accepted. During the EAP, OEM-provided devices will not be billed or counted against your promotional monthly quota.</p> <p>We look forward to sharing more details during Google’s <a href="https://ioconnectchina.googlecnapps.cn/" target="_self">I/O Connect Beijing</a> in early August 2024.</p> <p>In the meantime, we encourage you to try out the devices currently available in Android Device Streaming. Currently, the Android Device Streaming program is in a <a href="https://firebase.google.com/docs/test-lab/usage-quotas-pricing#device-streaming" target="_self">promotional period</a>, with a higher amount of monthly minutes offered at no cost, which will last until approximately February 2025. </p> <h3>OEM Labs powered by OmniLab</h3> <image><div style="text-align: center;"><img id="imgFull" alt="Omnilab Logo" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3kAfGLsi9JZ53a3B7qRkYNQRAGfEkHlA3MixOP0ICJqUJ7lymX_O2W8i0ZrHUliF7_wRWN_HBl0Frg_c6J56ETvLJmHEvptSs3L-lgK0VW2o7z3Do5Zf-FoahIySlyXGCiK6SY6ExWwjM2M6v18XcRfrCD9fof3yTG5SoZpJG8UgQeo9U019jBouFkIw/s1600/image2.png" width="75%"/></div></image><br/> <p>Some of you may wonder how these devices are being connected through to Android Studio. Under the hood, Android Device Streaming is built on top of the device platform for Google, OmniLab. OmniLab, the same device platform that powers all internal device labs, is also powering the OEM labs. Omnilab did this by open sourcing their <a href="https://source.android.com/docs/core/tests/development/android-test-station/ats-user-guide" target="_self">Android Test Station</a> (ATS) framework available to its open source.</p> <p>OmniLab provides a framework to ensure that your Android Device Streaming session is secure and performant. You’re able to deploy, debug, and interact with your app on these remote devices through a direct ADB over SSL connection, all without having to leave the IDE. And when the session ends, the device data is fully wiped and factory reset before it’s made available to another developer.</p><br/> <p>In summary, if you’d like to participate in the EAP for accessing OEM device labs, fill out <a href="http://d.android.com/android-device-streaming/registration" target="_self">this form</a>, and we will let you know if you and your team have been accepted. During the EAP, OEM-provided devices will not be billed or counted against your promotional monthly quota.</p> <p>Be part of our vibrant community on <a href="https://www.linkedin.com/showcase/androiddev/posts/?feedView=all" target="_self">LinkedIn</a>, <a href="https://medium.com/androiddevelopers" target="_self">Medium</a>, <a href="https://www.youtube.com/c/AndroidDevelopers/videos" target="_self">YouTube</a>, or <a href="https://twitter.com/androidstudio" target="_self">X</a> and share your experiences on using Android Device streaming in Android Studio.</p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-91414901204172865212024-07-25T09:00:00.000-07:002024-07-25T09:00:33.340-07:00Making security easy: How we are helping you fix vulnerabilities in your Android apps<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3EQV5j-ddJhvUjwyJgHmpQkLE-qfgaRaQyBr5f29cOgm8Q6pQ5_yDEVLGTsX-WQaYlBvflq5J4ywoNLLEGtlerHYhyphenhyphenRGjsDH4hq-HTsmWf5Q74iH2qHJ3mkNKqep83s3gg6Tt-koewlbA3bAZY_PvWds1nbEWMjPjyarZlncLH4DlC1PjlMQ0FpdL1UA/s1600/Making-security-easy--How-we-are-helping-developers-fix-vulnerabilities-social.png" name="twitter:image"></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3EQV5j-ddJhvUjwyJgHmpQkLE-qfgaRaQyBr5f29cOgm8Q6pQ5_yDEVLGTsX-WQaYlBvflq5J4ywoNLLEGtlerHYhyphenhyphenRGjsDH4hq-HTsmWf5Q74iH2qHJ3mkNKqep83s3gg6Tt-koewlbA3bAZY_PvWds1nbEWMjPjyarZlncLH4DlC1PjlMQ0FpdL1UA/s1600/Making-security-easy--How-we-are-helping-developers-fix-vulnerabilities-social.png" style="display: none;" /> <p><em>Posted by Bessie Jiang – Software Engineer and Chris Schneider – Security Engineer</em></p> <em>Contributors: Maciej Szawłowski – Security Engineer, Hannah Barnes – Technical Program Manager, Dirk Göhmann – Technical Writer, Patrick Mutchler – Software Engineer</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPf66eBB0y6lfopevRS37fYQbDd5SL7TbEA-V4SY2jd9NMC8VIkZaRZ25-GIJ73Bk8EqwiP6oZ7NewPEaoip5Jw-6WcRm3qeOWEsKpdipRJ-uLIJk42DcE60Vo1n6_3ln7Hs8oELO2wxbmVDfQwCvl8UbTyCcPKZQkeDpUQWj6gyhs8aM9grx4jr1jqEg/s1600/Making-security-easy--How-we-are-helping-developers-fix-vulnerabilities-header.png"><img border="0" data-original-height="800" data-original-width="100%" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPf66eBB0y6lfopevRS37fYQbDd5SL7TbEA-V4SY2jd9NMC8VIkZaRZ25-GIJ73Bk8EqwiP6oZ7NewPEaoip5Jw-6WcRm3qeOWEsKpdipRJ-uLIJk42DcE60Vo1n6_3ln7Hs8oELO2wxbmVDfQwCvl8UbTyCcPKZQkeDpUQWj6gyhs8aM9grx4jr1jqEg/s1600/Making-security-easy--How-we-are-helping-developers-fix-vulnerabilities-header.png" /></a> <div><br/></div> <p>Security is tricky, but vital to protecting your users and their data. We’re here to help you build secure Android apps with fewer vulnerabilities for an even safer Android ecosystem for everybody.</p> <h3>Vulnerability Detection – How it Works</h3> <p>Google currently scans every app on Google Play for dozens of common security vulnerability classes. If we spot something, we let you know so you can fix the problem. Imagine a pentesting team hunting for bugs in each of the millions of apps published on Play, rooting out issues like bad TLS configurations that expose network traffic or directory traversal vulnerabilities that let adversaries read from or write to an app’s private files.</p> <p>We are committed to keeping our joint users protected. In serious cases, if a security vulnerability doesn't get fixed, Google may remove the app from Google Play to keep users safe.</p> <h3>Android Application Security Knowledge Base</h3> <p>We know that it isn’t always enough to just tell you about a vulnerability in your app; you need to know how to fix the issue and how to prevent similar issues from cropping up in the future. To this end, we are introducing our security guidance and recommendations under a new program: the Android Application Security Knowledge Base (AAKB).</p> <p>AAKB aims to establish guidelines for writing secure Android software. It is a repository of common code issues, with remediation examples and explanations for implementing specific code patterns. Organic in nature, new issues are identified automatically for review with experts across the industry – ensuring broad but well-tested approaches and guidance.</p> <p>Data collected from your engagement with AAKB is used to improve guidance, and to identify how to make the Android ecosystem more secure by default.</p> <h3>How Does it Work?</h3> <p>AAKB establishes clear, vetted guidance with code examples. Guidance is aligned to <a href="https://mas.owasp.org/MASVS/" target="_self">OWASP MASVS</a> standards, and content is vetted in partnership with technical peers, such as <a href="https://www.microsoft.com/en-us/security/blog/2024/05/01/dirty-stream-attack-discovering-and-mitigating-a-common-vulnerability-pattern-in-android-apps/" target="_self">Microsoft</a>. This helps ensure the content is not biased to one party and represents state-of-the-art standards. This also provides an educational place for you to proactively remediate security risks in your applications using industry-wide standards, with direct access to knowledge from subject-matter experts. </p> <p>The guidance is available through two mechanisms:</p> <ul><ul> <li>The AAKB homepage, <a href="http://goo.gle/AndroidSecurityBestPractices" target="_self">goo.gle/AndroidSecurityBestPractices</a></li> <li>Android Studio</li> </ul></ul> <p>The AAKB homepage lists each article independently, aligned to the relevant OWASP MASVS category (e.g. <a href="https://mas.owasp.org/MASVS/05-MASVS-STORAGE/" target="_self">MASVS-STORAGE</a>). Anyone can view or provide direct feedback to this content. Security is an ever-changing field, and being able to update guidance on the fly means software development lifecycles can be updated dynamically with as little friction as possible.</p> <p>Android Studio triggers remediation guidance from lint checks by pointing directly to AAKB articles. You can fix problems as you're building the app and before they ever reach users.</p> <p>There are two methods to view remediation guidance with Android Studio:</p> <ul><ul> <li>Built-in lint checks in the Android Studio IDE</li> <li>The open-source Android Security lint library, <a href="http://goo.gle/AndroidSecurityLints" target="_self">goo.gle/AndroidSecurityLints</a></li> </ul></ul> <p>Existing security lint checks within Android Studio Giraffe+ have had their descriptions updated to include a link to the relevant AAKB article, allowing you get more context as to why a particular code snippet might be potentially “at-risk”.</p> <image><div style="text-align: center;"><img alt="Example of a finding with a link to a relevant AAKB article in the Android Studio IDE" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj-jDwBHOaM4s0jO4rbhfbe0Txe4oOlShd1ICNOJBpZdamIdL3lcr7zQ_kwfxY3U4qOWivoV63n48Pz4cRfe1VbTnJgqQJZCbPKMRMaQqKW3CmiprQlOxrGbYbqQnPQObVjY3odSOBak7Pp_YEyLt_nPrSH4pc7rF9q3HL90c4-7to6r8YHCGi3QT_AHU/s1600/image2.png" width="100%" /></div><imgcaption><center><em>Figure 1. Example of a finding with a link to a relevant AAKB article in the Android Studio IDE</em></center></imgcaption></image><br /> <p>Meanwhile, the open-source Android Security lint checks give you access to our most recent guidance and experiments to further protect your mobile applications and get ahead of future security concerns. </p> <p>Add the open source checks to your project by following the <a href="https://github.com/google/android-security-lints/blob/main/README.md" target="_self">README</a>. These lint checks all contain click-to-fix functionality that make it easy for you to write safer code with minimal effort, as well as links to the relevant AAKB articles like the built-in IDE checks.</p> <image><div style="text-align: center;"><img alt="Example of an open-source security lint finding, highlighting a vulnerable code snippet and click-to-fix solution" border="0" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcoZgLQw1uTBVr9EeJ0INmTiBTlRfSGbLUQfGxa8we0B_Fq84mZMwTzxrysU8L0AjgJzNQRa6MY2HhM-mVeUdihBwT-KfPp42OVgW8iRaM35RD7WoouGxZm4A-gqa44MDHszSucoIYqGX3-z9dKzZe0zNvXXLdFk7E8xy_RpKE9aP5yBDSITmcSpivgB4/s1600/image1.png" width="100%" /></div><imgcaption><center><em>Figure 2. Example of an open-source security lint finding, highlighting a vulnerable code snippet and click-to-fix solution</em></center></imgcaption></image><br /> <p>All built-in IDE lint checks can be found in <a href="https://googlesamples.github.io/android-custom-lint-rules/checks/categories.md.html" target="_self">this list</a>, with many under the Security category containing links to relevant AAKB articles. We would love to hear your <a href="https://github.com/google/android-security-lints/issues" target="_self">feedback and suggestions</a> for new lint checks and other improvements to the open-source lint library.</p>Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-67147968494976547582024-07-24T09:00:00.000-07:002024-08-13T18:34:08.921-07:00Introducing Collections, a new on-device surface for your content<meta content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUZEgFYi7Ywgipf5UquqK_SnHp3HCfUq9ilvgFRSAPVkRAd_QklH3gcn4BE9QB9RX2DcPB20TBB2kXjoZTh3MdJohTcPcl9A7K0cf7yZVFsiBkB6VqQgpzpZiAZI7gVWr7idRoUuMNIeTpPFmch5kPKH7k_7G1D4mgAeAWAcNofgb_wDQtje9riwxKWg0/s1600/Collections-Social.png" name="" twitter:image=""></meta> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUZEgFYi7Ywgipf5UquqK_SnHp3HCfUq9ilvgFRSAPVkRAd_QklH3gcn4BE9QB9RX2DcPB20TBB2kXjoZTh3MdJohTcPcl9A7K0cf7yZVFsiBkB6VqQgpzpZiAZI7gVWr7idRoUuMNIeTpPFmch5kPKH7k_7G1D4mgAeAWAcNofgb_wDQtje9riwxKWg0/s1600/Collections-Social.png" style="display: none;" /> <em>Posted by Cullen Rotroff, Product Manager, Google Play</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh50ptNeAs-dkCOWaMw2CcAq7o4t-oANgMFrtxo-yPvW2WbILChzAKuVUGbQxbuepme_f822TR_ZSLvdpqJZ18QmdouHhZ2Q448GDXCVcrhXoPtphmdBa0OLz__ltRYIg0C1fXqu8N6bR0b6AhCJkfLqIxkCwqZn6PwWKp5n8msTx2y3DGZIW0JeonjL7c/s1600/google-play-collections-v3-01.png"><img border="0" data-original-height="800" data-original-width="1058" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh50ptNeAs-dkCOWaMw2CcAq7o4t-oANgMFrtxo-yPvW2WbILChzAKuVUGbQxbuepme_f822TR_ZSLvdpqJZ18QmdouHhZ2Q448GDXCVcrhXoPtphmdBa0OLz__ltRYIg0C1fXqu8N6bR0b6AhCJkfLqIxkCwqZn6PwWKp5n8msTx2y3DGZIW0JeonjL7c/s1600/google-play-collections-v3-01.png" /></a> <p>Over the past year, the Play Store has evolved into a dynamic discovery engine for your apps and their amazing content. We continue to invest in features that connect the best app experiences to the people who love them. At this year’s Google I/O, we teased an exciting <a href="https://youtu.be/xry2mQbWrio?t=176" target="_self">new on-device surface</a> that expands the discovery of your content beyond the Play Store, <a href="https://developer.android.com/guide/playcore/engage/preview" target="_self">powered by Engage SDK</a>.</p> <p>Today, we’re <a href="https://blog.google/products/google-play/google-play-july-2024-new-updates" target="_self">excited to announce</a> that this brand-new surface is ready for the spotlight. Introducing <b>Collections</b>: a seamless way to showcase personalized content and guide users on continuous journeys that lead directly into your app.</p> <h3>Expand your app's reach beyond the Play Store</h3> <p>Collections is a full-screen immersive space that automatically organizes the best and most relevant content from installed apps into intent-oriented spaces, such as Watch, Listen, Shop, or Social. From there, users deep-link directly into your app to complete their journey, whether that’s to enjoy your content or complete a purchase.</p> <p>You can use this surface to highlight your most important content, including personalized recommendations and promotions. If a user has your app installed but isn’t logged in, Collections can encourage the user to sign in to see your most personalized content. Plus, if your app is integrated but not installed, Collections can recommend to users to install it.</p> <p>Users enter Collections through a Play Store widget. Without needing to install a new app, users can simply preview the experience in the Play Store and then add the widget to their home screen.</p> <image><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHex6iZBzj3l-_P0q30kacEYyInJ6Z3xfmlAHTMdKas81f1VI3eMgSSxSJ4y-4OjCYMEPmer0t9KaCggQM3FiJ9Vm7viuo3uQo8EYwndIHI3PVw7Tjt3urLq-HsXhO-21PsxsPzaI1ZJqZTz8wEbe0dHNc2qnAUVFN7fJ1-qRZ03h6Pn5_INjfTjWkdy8/w400-h400/Collections-GIF%20(1).gif" target="_self"><div style="text-align: center;"><img alt="Collections keep users engaged with your content" border="0" height="640" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHex6iZBzj3l-_P0q30kacEYyInJ6Z3xfmlAHTMdKas81f1VI3eMgSSxSJ4y-4OjCYMEPmer0t9KaCggQM3FiJ9Vm7viuo3uQo8EYwndIHI3PVw7Tjt3urLq-HsXhO-21PsxsPzaI1ZJqZTz8wEbe0dHNc2qnAUVFN7fJ1-qRZ03h6Pn5_INjfTjWkdy8/w640-h640/Collections-GIF%20(1).gif" width="640" /></div></a><imgcaption><center><em>Collections is a full-screen immersive space that automatically organizes&nbsp;</em></center><center><em>the best and most relevant content from installed apps</em></center></imgcaption></image><br /> <h3>Engage users with personalized and customizable messaging</h3> <p>There are multiple ways to use Collections to engage users.</p> <p><b>Continuation journeys</b> are the anchor of this experience and appear at the top of most spaces to help users resume their journeys with a tap. For example:</p> <ul><ul> <li>In Shop, users can pick up an abandoned shopping cart.</li> <li>In Listen, users can jump back into a recently played album, playlist, podcast, audiobook, or live radio station.</li> <li>And in Food, users can pick up an open cart or reorder a recent meal.</li> </ul></ul> <p>We also understand that developers know their users best, so to give you more control over the Collections experience, you can create up-to-five <b>recommendation clusters</b>. These clusters can be personalized based on your user’s behavior in your app and organized by theme, like new releases, price drops, or the user’s favorite topics. For users who aren’t logged in to your app, you can provide content with broad appeal to spur a new session.</p> <image><div style="text-align: center;"><img alt="Engage users through continuation journeys (like Continue listening) or with recommendation clusters (like Today's top hits)" border="0" height="640" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXsPO1-eVnXcOVEKygWBNj90kfhjou5z4rWHQM9As3HZEZRqYoulgOG8M9n3xICiKBifRHR9FtYNu1M0PIQWPuZlEbIHP_FCweXk0KFla752bLIhfmzwqXfFGFiDq3IPtdDrlYWsHKtZb1yegB07nkk3bYmzYD9aBBCOE_fzwQ1Ep3prvEGZfhU5TG3wQ/w365-h640/image1.png" width="365" /></div><imgcaption><center><em>Engage users through continuation journeys (like "Continue listening") or&nbsp;</em></center><center><em>with recommendation clusters (like "Today's top hits")</em></center></imgcaption></image><br /> <p>Finally, Collections spotlights hero content in its <b>featured cluster</b>, a larger, more premium UI template. You can display one personalized featured card per user and update it dynamically throughout the day. The featured cluster is best reserved for top personalized promotions and deals, for example:</p> <ul><ul> <li>Promote memberships and special business models, like a loyalty program.</li> <li>Highlight your best personalized deals.</li> <li>Announce new products and app features.</li> </ul></ul><br /> <image><div style="text-align: center;"><img alt="Collections’ featured cluster spotlights your hero content" border="0" height="278" id="imgCaption" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd8iibWl64w78FGJpzWzGYhuwfzw1P5M4aS7T1yLlPBR5rKVB2t433yh7Z9ygdPJZ7xrC1tgiuC680m8UbQPI1eJLocO-ipEc7xjoW9tM96JEqx7i1TmwYzl0XPY_9Y7UduaPJR1FHBqiiO_RWNXOw6tlSm8UiY3PA73fsj1juw696sr-ZkkbMjsK6Nms/w400-h278/image3.png" width="400" /></div><imgcaption><center><em>Collections’ featured cluster spotlights your hero content</em></center></imgcaption></image><br /> <h3>Get started with Engage SDK</h3> <p>To start using Collections, you'll need to integrate with <b><a href="https://developer.android.com/guide/playcore/engage" target="_self">Engage SDK</a></b>, a client-side integration that leverages on-device APIs and takes most developers about a week to complete. Designed to be simple and lightweight, the integration adds less than 50 KB to the average app APK.</p> <p>Engage SDK enables your apps to push personalized app content to Collections. There is no need to start and maintain a new content strategy as the integration is designed for the personalized content from your app’s front page. Since you already have the content strategy, metadata, and personalization required, all you’ll need to do is publish it with Engage SDK.</p> <p>Today, we’re inviting all apps with users in the United States and content in our supported categories – <em>Watch, Listen, Read, Shop, Food, Social, Travel &amp; Events, and Health &amp; Fitness</em> – to join. Over 35 top apps have already integrated with Engage SDK, including <a href="https://play.google.com/store/apps/details?id=com.adidas.app&amp;hl=en_US" target="_self">Adidas</a>, <a href="https://play.google.com/store/search?q=amazon%20prime%20video&amp;c=apps&amp;hl=en_US" target="_self">Amazon Prime Video</a>, <a href="https://play.google.com/store/search?q=audible&amp;c=apps&amp;hl=en_US" target="_self">Audible</a>, <a href="https://play.google.com/store/search?q=best%20buy&amp;c=apps&amp;hl=en_US" target="_self">Best Buy</a>, <a href="https://play.google.com/store/search?q=iheartradio&amp;c=apps&amp;hl=en_US" target="_self">iHeartRadio</a>, <a href="https://play.google.com/store/search?q=nextdoor+neighborhood+app&amp;c=apps&amp;hl=en_US" target="_self">Nextdoor</a>, <a href="https://play.google.com/store/search?q=spotify&amp;c=apps&amp;hl=en_US" target="_self">Spotify</a>, <a href="https://play.google.com/store/search?q=shopify&amp;c=apps&amp;hl=en_US" target="_self">Shopify</a>, and <a href="https://play.google.com/store/search?q=walmart&amp;c=apps&amp;hl=en_US" target="_self">Walmart</a>.</p> <p>Visit our <a href="https://developer.android.com/guide/playcore/engage/preview" target="_self">Engage SDK integration guide</a> to see if your app meets the eligibility and on requirements, and express your interest.</p> <br /><br /> <p></p><center> How useful did you find this blog post? </center><p></p> <p></p><center> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=1%E2%98%85+%E2%80%93+Not+at+all&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=2%E2%98%85+%E2%80%93+Not+very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=3%E2%98%85+%E2%80%93+Somewhat&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=4%E2%98%85+%E2%80%93+Very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=5%E2%98%85+%E2%80%93+Extremely&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> </center><p></p> <div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s260/lockup_ic_Google_Play_H_260x53px_clr.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="53" data-original-width="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s200/lockup_ic_Google_Play_H_260x53px_clr.png" width="200" /></a></div><p></p><p></p>Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0tag:blogger.com,1999:blog-6755709643044947179.post-68137399129741200662024-07-23T09:00:00.000-07:002024-07-23T09:00:00.222-07:00#WeArePlay | 153 new stories from people creating apps and games in the U.S.<meta name="twitter:image" content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju1CCQW-tDhzvcq9_yWPv6MCT9LgnhWVX-kLWqLH0nf0AKuXHnNDZGUAcR7UTo8CtcU7Ffg8eFN0bCCRlfpPHQ7pxSHNdlAT9WmFIq5yq8d2YW8uWTxS1VAxitANwTJU4gxMbxsQiWAgY1ZnI8GH_UKFbTJb735U-9gVFQzjGfrwuOcJlHM6BKXgQwEJU/s1600/WeArePlay-USA-Social.png"> <img style="display:none" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju1CCQW-tDhzvcq9_yWPv6MCT9LgnhWVX-kLWqLH0nf0AKuXHnNDZGUAcR7UTo8CtcU7Ffg8eFN0bCCRlfpPHQ7pxSHNdlAT9WmFIq5yq8d2YW8uWTxS1VAxitANwTJU4gxMbxsQiWAgY1ZnI8GH_UKFbTJb735U-9gVFQzjGfrwuOcJlHM6BKXgQwEJU/s1600/WeArePlay-USA-Social.png"> <em>Posted by Robbie McLachlan, Developer Marketing</em> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5yKBvGa0SBiOqlRUDDD4X-SODElpjcJPi8vKnnEMS2hboIzF0uc0cK8zRFljuyccVdHGdOFp2CLviCcLZSpqNWqx6q4DhuHBjrEcl25TyB4vCdnur3L2vJgHCAv8Uv095rhc1xTcH7RPjxjEXxt3ZreVI-DhVnEvkrhRx6O5Iqd39L79p4Ug-MW3BxZY/s1600/US_Blog_HeaderImage_1200x600px.jpg" imageanchor="1" ><img style="100%" border="0" src=" https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5yKBvGa0SBiOqlRUDDD4X-SODElpjcJPi8vKnnEMS2hboIzF0uc0cK8zRFljuyccVdHGdOFp2CLviCcLZSpqNWqx6q4DhuHBjrEcl25TyB4vCdnur3L2vJgHCAv8Uv095rhc1xTcH7RPjxjEXxt3ZreVI-DhVnEvkrhRx6O5Iqd39L79p4Ug-MW3BxZY/s1600/US_Blog_HeaderImage_1200x600px.jpg" data-original-width="100%" data-original-height="800" /></a> <p>In 2022, #WeArePlay launched 153 stories about the people behind app and game companies across the United States. Since then, we've been on a virtual tour around the world with more stories from <a href="https://play.google.com/console/about/weareplay-india/" target="_self">India</a>, <a href="https://play.google.com/console/about/weareplay-europe/" target="_self">Europe</a>, <a href="https://play.google.com/console/about/weareplay-japan/" target="_self">Japan</a> and <a href="http://g.co/play/weareplay-australia" target="_self">Australia</a>. Today, we're heading back to the U.S. as we celebrate <a href="https://play.google.com/console/about/weareplay-us/" target="_self">153 brand new stories</a>, 3 more per state, and spotlight more growing businesses on Google Play.</p> <p>Here are just a few of my favorites:</p> <h3>Bernard’s app uses virtual reality to recreate ancient cities</h3> <a href="http://g.co/play/weareplay-us" target="_self"><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcG0pvSoJJnkdUevfmveFhhCrlz_8ku3YwUkG6RfzoFhCl6o_FlinZlfSavUzxmERyRxfH9RRLD-gLQvznHt6IfVvuJ4IWhmCqfomGH6XE1T7p73NtkWtM5r1uZ4Gnj6O1scdOI_fqicCCBEAXy6Mx7pLYReN1b7fVRVdeZPzbsjTniP_g1b9MqOyYsrs/s1600/01_INDIANA_FLYOVER%20ZONE_FOUNDER_BERNARD%20FRISCHER_edited.png" data-original-width="1058" data-original-height="800" /></a><imgcaption><center><em>Bernard, founder of Yorescape<br/>Bloomington, Indiana</em></center></imgcaption><br/> <p>Bernard went to visit Plastico di Roma Imperiale in the 70s - a model of imperial Rome in the time of Constantine the Great - and was spellbound. This visit was the seed of what was to become his app <a href="https://play.google.com/store/apps/dev?id=8428820005976455951" target="_self">Yorescape</a>, an app that uses virtual reality to let users explore ancient ruins. With 3D reconstructions and expert audio guides, Yorescape simulates world heritage sites with a little help from virtual reality. People can explore ancient ruins and take a unique journey through time, presenting historical sites as they exist today alongside their ancient counterparts. <a href="https://play.google.com/store/apps/dev?id=8428820005976455951&gl=us" target="_self">Yorescape</a> showcases heritage sites from Egypt, Lebanon, Greece, Italy, and Mexico. One day, he hopes to cover sites in all four corners of the earth.</p><br/> <h3>Pinkey’s app uses AI to revolutionize maternal healthcare for all moms</h3> <a href="http://g.co/play/weareplay-us" target="_self"><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimje9imXt3a9YG3qmd0db9nZb6BIBz-RJYMpN5acUffAmhz8bpBmSfJ3ezv5cAOhuKE1yR9sSIwQgvsxV4diZmnM-3e3Y-9s4vhfyQheFdeXdq2bDs0odaLlnSDQXFpWeFDvf7CmIQ38EoRULmRC-mkSfFDfOc-QAB3F9gcoa7HJIpwCyeEql-pC3-oj0/s1600/01_OKLAHOMA_MYRIHEALTH_FOUNDER_PINKEY%20PATEL.jpeg" data-original-width="1058" data-original-height="800" /></a><imgcaption><center><em>Pinkey, founder of Myri Health<br/>Norman, Oklahoma</em></center></imgcaption><br/> <p>Pinkey was disappointed with the aftercare she received post-delivery when she gave birth to her first child. As a pharmacist, personal trainer, and pre-and postnatal corrective exercise specialist, she knew she had plenty of knowledge to share. This experience led Pinkey to create <a href="https://play.google.com/store/apps/details?id=com.thesnapback.assistant&gl=us" target="_self">Myri Health</a>, an AI-driven platform that transforms pregnancy and postpartum support. She plans to launch in countries with higher maternal mortality rates improving the healthcare of mothers everywhere and will integrate the app with Google Health Connect for fully cohesive care.</p><br/> <h3>Bria’s game lets players serve Japanese-themed characters in a bubble tea shop</h3> <a href="http://g.co/play/weareplay-us" target="_self"><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-Tx9NV0z1TBYGoJMvyT7JtCQ_zaBJYu5ekMZ_Xizssk0hGtnfUzsoHDrSItJASGN_VsHoLynxPgpiFSxDX7-cQo3EGmpHQvAEZGBIV0taT3tbf2TAyJa_A4Eul_frDAJTIvQd7uGPd_L2zrrrko_vDuSDkLcb__QN024UbPi23WSgcvhE21Wxtxh-RfI/s1600/01_CALIFORNIA_HONEYBGAMES_FOUNDER_BRIA_MAIN.png" data-original-width="1058" data-original-height="800" /></a><imgcaption><center><em>Bria, founder of Boba Story<br/>Los Angeles, California</em></center></imgcaption><br/> <p>Bria worked for some big names in the tech world but wanted to start her own company based on what brings her joy. Bubble tea was something she always associated with good times with friends, and wanted to encapsulate that same feeling in <a href="https://play.google.com/store/apps/details?id=com.btech.cafe.boba&hl=en_GB" target="_self">Boba Story</a>. In her game, players restore an old boba shop by designing the decor and a drinks menu, they then serve the Japanese anime-inspired characters bubble tea. A garden with beekeeping where players can harvest honey has recently been added as well as a host of new boba flavors.</p><br/> <h3>Alina and Samara’s game uses micro workouts to help you stay active</h3> <a href="http://g.co/play/weareplay-us" target="_self"><img style=”100%” border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-EW_G5SAj10gUgvtgYM1IheXB866TrTJ4U2otCFWoG5PSPjJi4Xdd4qcmPQ8KvOKWE0SUTA7tspkqMloejc88v0mFQ6DUWMf5Umh7M-SQ7mOAQaI7Rd5Un7j4SPdoI6qhZQIaTRQkl0fO25BkMmEKD5KDrmZ7kgMzo138VhnJp393wvxeZc3xG-dNy4A/s1600/01_MINESSOTA_GLOSSBIRD_FOUNDERS_ALINA%20MATSON_SAMARA%20FANTIE.jpg" data-original-width="1058" data-original-height="800" /></a><imgcaption><center><em>Alina and Samara, co-founders of Fitment: Cozy Fitness Game<br/>Hopkins, Minnesota</em></center></imgcaption><br/> <p>Whilst working 80 hours a week during the pandemic, Alina found that she had no time to exercise but still managed to play video games and scroll through social media. This inspired her to create a fun and easy game for people to stay active. After posting a job online, she teamed up with Samara, a gaming programming teacher, and they built their game, <a href="https://play.google.com/store/apps/details?id=com.Glossbird.Fitment&hl=en_US" target="_self">Fitment</a>. The game makes exercise more accessible through gamified micro workouts that are engaging and fun. The team is now working on rolling out social features to make the platform more interactive, enabling friends to get fit together.</p><br/> <p>Discover more <a href="https://play.google.com/console/about/weareplay-us/?_gl=1*1p6xvq7*_up*MQ..*_ga*MTk2MzI2OTI5MC4xNzIwNDU1MDA4*_ga_4872ESP9WN*MTcyMDQ1NTAwOC4xLjAuMTcyMDQ1NTAwOC4wLjAuMA.." target="_self">#WeArePlay stories from the US</a> and stories from <a href="https://play.google.com/console/about/weareplay/" target="_self">across the globe</a>.</p> <br /><br /> <p></p><center> How useful did you find this blog post? </center><p></p> <p></p><center> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=1%E2%98%85+%E2%80%93+Not+at+all&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=2%E2%98%85+%E2%80%93+Not+very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=3%E2%98%85+%E2%80%93+Somewhat&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=4%E2%98%85+%E2%80%93+Very&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&amp;entry.753333049=5%E2%98%85+%E2%80%93+Extremely&amp;entry.2056663615&amp;entry.646747778=changeme-mm/yy" target="_self">★</a> </center><p></p> <div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s260/lockup_ic_Google_Play_H_260x53px_clr.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="53" data-original-width="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnvf5XzyebGljqgi8J7by9XsvaL5WWLNamSyTg4w_c0kPHjY1B1no1FQsdSfUHUwNw0UuYfXuo6i7K6VpdyV2-K8ms4VFmZA438ujm6qwtZMt5rJfMGymhQ_iCX2Z8h0MuJo7gXUQ4Hb-hjKYK1isibMZZxCyX_vo3kGoP5tieK2PI2ZhYdGh4gsqhwA/s200/lockup_ic_Google_Play_H_260x53px_clr.png" width="200" /></a></div> <p></p> Android Developershttp://www.blogger.com/profile/08588467489110681140noreply@blogger.com0