Showing posts with label Kotlin. Show all posts
Showing posts with label Kotlin. Show all posts

Tuesday, October 23, 2018

Introducing Android Ktx: Fifty-Fifty Sweeter Kotlin Evolution For Android

Posted yesteryear Jake Wharton (@JakeWharton), Florina Muntenescu (@FMuntenescu) & James Lau (@jmslau)

Today, nosotros are announcing the preview of Android KTX - a laid of extensions designed to brand writing Kotlin code for Android to a greater extent than concise, idiomatic, as well as pleasant. Android KTX provides a overnice API layer on top of both Android framework as well as Support Library to brand writing your Kotlin code to a greater extent than natural.

The portion of Android KTX that covers the Android framework is directly available inward our GitHub repo. We invite y'all to endeavor it out to give us your feedback as well as contributions. The other parts of Android KTX that encompass the Android Support Library volition last available inward upcoming Support Library releases.

Let's accept a aspect at roughly examples of how Android KTX tin deal y'all write to a greater extent than natural as well as concise Kotlin code.

Code Samples Using Android KTX

String to Uri

Let's start amongst this uncomplicated example. Normally, you'd telephone phone Uri.parse(uriString). Android KTX adds an extension portion to the String degree that allows y'all to convert strings to URIs to a greater extent than naturally.

Kotlin
Kotlin amongst Android KTX
val uri = Uri.parse(myUriString)
val uri = myUriString.toUri()

Edit SharedPreferences

Editing SharedPreferences is a really mutual purpose case. The code using Android KTX is slightly shorter as well as to a greater extent than natural to read as well as write.

Kotlin
Kotlin amongst Android KTX
sharedPreferences.edit()            .putBoolean(key, value)            .apply() 
sharedPreferences.edit {      putBoolean(key, value)  }    

Translating path difference

In the code below, nosotros interpret the departure betwixt ii paths yesteryear 100px.

Kotlin
Kotlin amongst Android KTX
val pathDifference = Path(myPath1).apply {    op(myPath2, Path.Op.DIFFERENCE) }  val myPaint = Paint()  canvas.apply {    val checkpoint = save()    translate(0F, 100F)    drawPath(pathDifference, myPaint)    restoreToCount(checkpoint) }   
val pathDifference = myPath1 - myPath2  canvas.withTranslation(y = 100F) {    drawPath(pathDifference, myPaint) }  

Action on View onPreDraw

This instance triggers an activeness amongst a View's onPreDraw callback. Without Android KTX, in that location is quite a flake of code y'all need to write.

Kotlin
view.viewTreeObserver.addOnPreDrawListener(        object : ViewTreeObserver.OnPreDrawListener {            override fun onPreDraw(): Boolean {                viewTreeObserver.removeOnPreDrawListener(this)                actionToBeTriggered()                return true            }        })
Kotlin amongst Android KTX
view.doOnPreDraw { actionToBeTriggered() }

There are many to a greater extent than places where Android KTX tin simplify your code. You tin read the full API reference documentation on GitHub.

Getting Started

To start using Android KTX inward your Android Kotlin projects, add together the next to your app module's build.gradle file:

repositories {     google() }  dependencies {     // Android KTX for framework API     implementation 'androidx.core:core-ktx:0.1'     ... } 

Then, later on y'all sync your project, the extensions seem automatically inward the IDE's auto-complete list. Selecting an extension automatically adds the necessary import contention to your file.

Beware that the APIs are probable to alter during the preview period. If y'all determine to purpose it inward your projects, y'all should aspect breaking changes earlier nosotros accomplish the stable version.

androidx: Hello World!

You may discovery that Android KTX uses bundle names that laid out amongst androidx. This is a novel bundle refer prefix that nosotros volition last using inward time to come versions of Android Support Library. We promise the partition betwixt android.* as well as androidx.* makes it to a greater extent than obvious which APIs are bundled amongst the platform, as well as which are static libraries for app developers that run into dissimilar versions of Android.

What's Next?

Today's preview launch is exclusively the beginning. Over the side yesteryear side few months, nosotros volition iterate on the API every bit nosotros contain your feedback as well as contributions. When the API has stabilized as well as nosotros tin commit to API compatibility, nosotros programme to unloose Android KTX every bit portion of the Android Support Library.

We aspect frontward to edifice Android KTX together amongst you. Happy Kotlin-ing!

Monday, October 15, 2018

Google I/O 2018: What’S Novel Inwards Android


Posted By Stephanie Cuthbertson, Product Management Director, Android

As Android has grown exponentially over the past times x years, we've also seen our developer community grow dramatically. In countries similar China, India, too Brazil, the issue of developers using our IDE almost tripled - inwards simply 2 years. With such growth, nosotros experience an fifty-fifty greater responsibleness to invest inwards our developer experience. Guided past times your feedback, we've focused our efforts on making mobile evolution fast too easy, helping yous teach to a greater extent than users past times making apps radically smaller, too increasing engagement to maintain users coming back. We're also pretty excited to run into Android Things become to 1.0, creating novel opportunities for yous to develop - everything from major consumer devices, to cool remote command vehicles! As Day 1 of Google I/O kicks off, let's cause got a closer await at these major themes from the Developer Keynote:

Development: making mobile evolution fast too easy

  • Android Jetpack — Today, nosotros announced Android Jetpack, designed to accelerate your app development. Android Jetpack is the side past times side generation of Android components, bringing together the benefits of the Support Library -- backwards compatibility too immediate updates -- to a larger laid of components, making it quick too slow to create robust, high character apps. Android Jetpack manages activities similar background tasks, navigation, too lifecycle management, then yous tin eliminate boilerplate code too focus on what makes your app great. Android Jetpack is designed to run good amongst Kotlin, saving yous fifty-fifty to a greater extent than code amongst Android KTX. The novel Android Jetpack components released today include WorkManager, Paging, Navigation, too Slices.

  • Kotlin — Since announcing back upwards for Kotlin concluding year, the developer community has embraced the language. Most importantly, 95% of developers say us they are really happy amongst using Kotlin for their Android development. And, the to a greater extent than developers exercise it, the to a greater extent than that issue rises. The issue of Play Store apps using Kotlin grew 6x inwards the concluding year. 35% of pro developers exercise it, too that issue is growing each month. We are continuing to better the Kotlin developer experience across our libraries, tooling, runtime, documentation too training. Android KTX is launching today equally role of Android Jetpack to optimize the Kotlin developer experience. Tooling continues to better amongst Android Studio, Lint support, too R8 optimizations. We cause got fifty-fifty tuned the Android Runtime (ART) inwards Android P, then that apps built amongst Kotlin tin run faster. We cause got rolled out Kotlin code snippets inwards our official documentation, too are publishing a Kotlin version of the API reference documentation today. Earlier this week, nosotros launched a novel Kotlin Bootcamp on Udacity, which is a neat resources for developers who are novel to Kotlin. Lastly, nosotros similar a shot cause got a Kotlin specialization inwards the Google Developers Experts Program. If yous nevertheless haven't used Kotlin, I promise yous you give it a try.
  • Android Studio 3.2 CanaryAndroid Studio 3.2 features tools for Android Jetpack including a visual Navigation Editor too novel code refactoring tools. The canary unloose also includes create tools to create the novel Android App Bundle format, Snapshots inwards the Android Emulator for fast showtime time, novel R8 optimizer for smaller download too install app code size, a novel Energy Profiler to stair out app acquit on on battery life, too more. You tin download the latest version of Android Studio 3.2 from the canary channel download page.

Distribution: making apps radically smaller

 As Android has grown exponentially over the past times x years Google I/O 2018: What’s novel inwards Android
  • Android App Bundle & Google Play Dynamic Delivery — Introducing the novel app model for Android. Dramatically bring down app size amongst a novel publishing format—the Android App Bundle. In Android Studio, you'll similar a shot create an app bundle that contains everything your app needs for whatsoever device—all the languages, every device covert size, every hardware architecture. Then, when a user downloads your app, Google Play's novel Dynamic Delivery volition only deliver the code too resources matching the user's device. People run into a smaller install size on the Play Store, tin download your app to a greater extent than quickly, too relieve infinite on their devices.  As Android has grown exponentially over the past times x years Google I/O 2018: What’s novel inwards Android
    (Left) An example of all resources beingness delivered to a device via a legacy APK.
    (Right) An example of Dynamic Delivery serving simply what’s needed to a device.
  • Dynamic features via the Android App Bundle — The Android App Bundle also enables modularization then that yous tin deliver features on-demand, instead of during install. You tin create dynamic characteristic modules inwards the latest Android Studio canary release. Join our beta program to release them on Google Play.
  • Google Play Console — New features too reports inwards the Read most the improvements to the dashboard, statistics, Android vitals, pre-launch report, acquisition report, too subscriptions dashboard. You tin also upload, test, too release apps using our novel publishing format, the Android App Bundle.
  • Google Play Instant — After launching inwards beta at GDC, today nosotros announced that all game developers tin create instant apps too we're thrilled to welcome Universal App campaigns.

Engagement: bringing users dorsum to a greater extent than too more.


  • Slices Slices are UI templates that display a rich array of dynamic, too interactive content from your app, across Android too inside Google surfaces. Slices tin include live-data, scrolling content, inline actions, too deep-linking into your app then users tin practice everything from playing music to checking reservation updates. Slices tin also comprise interactive controls similar toggles too sliders. You tin get started edifice Slices today, too they volition start out appearing for users soon.
 As Android has grown exponentially over the past times x years Google I/O 2018: What’s novel inwards Android As Android has grown exponentially over the past times x years Google I/O 2018: What’s novel inwards Android As Android has grown exponentially over the past times x years Google I/O 2018: What’s novel inwards Android
  • Actions — Actions are a novel way to brand your app's capabilities too content to a greater extent than accessible, then that people tin easily teach to it at the correct moment. App Actions volition seem to users based on usage too relevance, across multiple Google too Android surfaces, such equally the Google Search App, the Play Store, the Google Assistant, too the Launcher. App Actions volition move available for all developers to assay soon, delight sign upwards here if you'd similar to move notified. You tin also select to create a Conversational Action equally a companion experience to your app. This plant on a multifariousness of Assistant-enabled devices, such equally speakers too smart displays. Both types of Actions exercise a novel mutual catalog of intents.
 As Android has grown exponentially over the past times x years Google I/O 2018: What’s novel inwards Android

Smarter devices: a powerful platform for IoT devices


  • Android Things 1.0 Assistant-enabled products powered past times Android Things.  As Android has grown exponentially over the past times x years Google I/O 2018: What’s novel inwards AndroidAndroid Things 1.0 this week. Four novel System-on-Modules (SoMs) are similar a shot supported on the platform amongst guaranteed long-term back upwards for 3 years too additional options for extended support, making it easier to become from prototypes to production. To brand production evolution to a greater extent than seamless than ever, the accompanying Android Things Console is also ready for production. It helps developers easily deal too update their devices amongst the latest stability fixes too safety updates provided past times Google.

To teach started amongst Android Things, see our developer site too the novel Community Hub to explore kits, sample code, community projects, too bring together Google's IoT Developers Community to remain updated. We introduced a express programme to partner amongst the Android Things squad for technical guidance too back upwards edifice your product. If your companionship is interested, sign upwards for our OEM Partner Program.
In add-on to all these novel developments, we're on the basis inwards over 140 countries, growing too expanding the developer community through programs such equally Women Techmakers too Google Developer Groups (GDGs). We're investing inwards preparation programs similar Google Developers Certification, edifice to a greater extent than courses through Udacity too other partners, to assist developers deepen their technical capability. Today, 225 Google Developers Agency Program members from 50 agencies inwards xv countries, are Android Certified. As role of our Google Developers Experts Program, nosotros also similar a shot cause got to a greater extent than than 90 Android Developer Experts some the basis actively supporting developers, start-ups too companies to create too launch innovative apps.
We also choke on to recognize the neat run from give app too game developers. This year, nosotros held our 3rd annual Google Play Awards. The nominees correspond some of the best experiences available on Android, amongst an emphasis on overall quality, potent design, technical performance, too innovation. Check out the winners too nominees.
During Google I/O, attendees too viewers cause got an chance to dive deep amongst 48 Android & Play breakout sessions. Thank yous for all your wonderful feedback, too delight maintain giving us your advice on where nosotros should become next.

Sunday, October 14, 2018

Larn Kotlin Fast Amongst Novel Kotlin Bootcamp Course

Posted past times Aleks Haecky, Training Developer & Word Artist, Google+, LinkedIn, Medium

The Kotlin Bootcamp Udacity course is a free, self-paced online course of written report that teaches y'all the basics of the Kotlin programming language. This introduction to Kotlin was created past times Google experts inwards collaboration amongst Udacity together with is for people who already know how to program.

The Kotlin linguistic communication lets y'all create apps inwards less time, writing less code, together with amongst fewer errors.

This modern object-oriented linguistic communication offers a rigid type system, type inference, null safety, properties, lambdas, extensions, coroutines, higher-order functions, together with many other features. Kotlin is together with thence concise that y'all tin create consummate information classes amongst a unmarried work of code.

Kotlin is officially supported for edifice Android apps, fully interoperates amongst the Java programming linguistic communication together with libraries, together with is included amongst IntelliJ together with Android Studio.

In this course of written report y'all volition larn everything y'all take away to computer programme inwards Kotlin, including:

  1. Basics: Write Kotlin statements together with expressions inwards the IntelliJ REPL Kotlin interpreter using nullable together with non-nullable variables, information types, operators, together with command structures.
  2. Functions: Create a main() function, create together with telephone phone functions amongst default together with variable arguments, transcend functions every bit arguments to filters, computer programme unproblematic lambdas, business office types, together with compact single-expression functions.
  3. Classes: Create a shape amongst methods together with properties. Implement constructors together with init(). Learn nigh inheritance, interfaces, together with abstract classes. Use the especial purpose classes data, object, enum, together with sealed.
  4. Beyond the Basics: Dive deeper into Pairs, collections, together with constants. Learn how to write extensions, implement generics, utilise annotations, together with usage labeled breaks.
  5. Functional Manipulation: Explore to a greater extent than nigh lambdas, higher-order functions, together with inline.

You'll larn how to usage extension functions to add together helpful functionality to existing classes.

Extend built-in types:

fun Int.print() = println(this) 5.print() // prints 5

Extend Android classes:

fun Context.toast(text: CharSequence, duration: Int = Toast.LENGTH_SHORT): Toast {    furnish Toast.makeText(this, text, duration).apply { show() } } toast("Hello Toast")

Extend your ain classes:

class AquariumPlant(        val color: String)  fun AquariumPlant.print() =        println("Pretty Aquarium Plant")  val establish = AquariumPlant("green") plant.print() // prints -> Pretty Aquarium Plant

When you've completed the course, y'all volition endure able to create programs inwards Kotlin, taking wages of the features together with capabilities that brand Kotlin unique.

The course of written report is available free, online at Udacity; accept it inwards your ain fourth dimension at your ain pace.

Go larn how to build apps amongst less code at https://www.udacity.com/course/ud9011.

Wednesday, October 10, 2018

A Novel Universal Music Player

Posted yesteryear Nicole Borrelli, Android Developer, Programs Engineer

 Screenshot of UAMP v2's UI showing a duo of albums

The Universal Android Music Player (or "UAMP") is a favorite on GitHub for music app developers alongside over 9,500 stars in addition to 3,000 forks. Since UAMP was start released, Android evolution has changed significantly. ExoPlayer has improved, Architecture Components were introduced, in addition to Kotlin became a fantabulous linguistic communication for Android developers.

We decided that the best means to integrate the modern features for our dearest music app would last to re-write UAMP.

UAMP v2 was built from the dry reason upwardly inwards Kotlin. The UI is built only about ViewModels in addition to LiveData. Playback, in addition to especially integration alongside MediaSessionCompat, was vastly simplified yesteryear utilizing the MediaSession extension of ExoPlayer.

We too added a bunch of novel songs yesteryear The Kyoto Connection in addition to Kai Engel.

There are some features from UAMP v1 that haven't been integrated into the novel code yet. The missing features include Android TV alongside the Leanback library in addition to remote playback via Google Cast. Even though these features aren't nonetheless included inwards v2, nosotros wanted to demo y'all the novel updates equally shortly equally possible. The former code volition choke on to last available inwards the v1 branch on GitHub, in addition to then delight cause got a await in that place to encounter how to role those features inwards a music app.

We would love your feedback on which features to add together next. We are considering offline playback, improving the integration alongside Android Auto, in addition to using the upcoming Navigation components of Jetpack for the UI. We'll last creating GitHub issues for features in addition to improvements to aid y'all permit us know what is nearly of import to you. Go vote on these features to permit us know where nosotros should focus our efforts.

We'd too similar to invite y'all to opened upwardly line requests for põrnikas fixes in addition to features that are missing. See the contributions process for to a greater extent than information.

Grab the code from GitHub!

Sunday, October 7, 2018

Android Pie Sdk Is Straightaway To A Greater Extent Than Kotlin-Friendly

Posted past times James Lau, Product Manager (@jmslau)

When using the Java programming language, i of the most mutual pitfalls is trying to access a fellow member of a null reference, causing a NullPointerException to live on thrown. Kotlin offers protection against this past times baking nullable in addition to non-nullable types into the type system. This helps eliminate NullPointerExceptions from your code in addition to amend your app's overall quality. When Kotlin code is calling into APIs written inward the Java programming language, it relies on nullability annotations inward those APIs to create upward one's hear the nullability of each parameter in addition to the render type. Unannotated parameters in addition to render types are treated equally platform types, which weakens the null-safety guarantee of Kotlin.

As purpose of yesterday's Android ix announcement, nosotros bring too released a novel Android SDK that contains nullability annotations for to a greater extent than or less of the most often used APIs. This volition save the null-safety guarantee when your Kotlin code is calling into whatsoever annotated APIs inward the SDK. Even if you lot are using the Java programming language, you lot tin yet attain goodness from these annotations past times using Android Studio to select grip of nullability contract violations.

Not a breaking change

Normally, nullability contract violations inward Kotlin trial inward compilation errors. But to ensure the newly annotated APIs are compatible amongst your existing code, nosotros are using an internal machinery provided past times the Kotlin compiler squad to grade the APIs equally lately annotated. Recently annotated APIs volition trial solely inward warnings instead of errors from the Kotlin compiler. You volition involve to usage Kotlin 1.2.60 or later.

Our invention is to bring newly added nullability annotations attain warnings only, in addition to growth the severity grade to errors starting inward the next year's Android SDK. The destination is to render you lot amongst sufficient fourth dimension to update your code.

How to usage the "Kotlin-friendly" SDK

To teach started, become to Tools > SDK Manager inward Android Studio. Select Android SDK on the left menu, in addition to brand certain the SDK Platforms tab is open.

Use SDK Manager inward Android Studio to install SDK for API Level 28 Revision 6

Check Android 8.+ (P) in addition to click OK. This volition install the Android SDK Platform 28 revision vi if it is non already installed. After that, laid your project's compile SDK version to API 28 to outset using the novel Android Pie SDK amongst nullability annotations.

Use the Project Structure Dialog to alter your project's Compile Sdk Version to API 28

You may too involve to update your Kotlin plugin inward Android Studio if it's non already up-to-date. Make certain your Kotlin plugin version is 1.2.60 or afterwards past times going to Tools > Kotlin > Configure Kotlin Plugin Updates.

Once it's laid up, your builds volition outset showing warnings if you lot bring whatsoever code that violates nullability contracts inward the Android SDK. An trial of such a alarm is shown below.

Sample alarm from the Kotlin compiler when code violates a lately added nullability contract inward the Android SDK.

You volition too outset seeing warnings inward Android Studio's code editor if you lot telephone telephone an Android API amongst the wrong nullability. An trial is shown below.

Android Studio alarm near passing a null reference to a parameter annotated equally a lately non-null type inward the android.graphics.Path API.

Leveraging nullability annotations from the Java programming language

You tin attain goodness from the novel nullability annotations fifty-fifty if your code is inward the Java programming language. By default, Android Studio volition highlight whatsoever nullability contract violations amongst a warning, similar the i below:

Android Studio showing a alarm near nullability contract violation inward code written inward the Java programming linguistic communication

To ensure that you lot bring this inspection enabled, you lot tin become to the IDE's settings page in addition to search for "Constant weather & exceptions" inspection in addition to brand certain that especial is checked.

Use the Inspections page nether Settings to ensure the Constant weather & exceptions code inspection is enabled.

If you lot are using the Java programming language, nullability contract violations volition non attain whatsoever compiler alarm or error. Only the in-IDE code inspections are available to flag these issues.

You tin too run code inspections across your entire projection in addition to run into the aggregated results. Click on Analyze > Inspect Code… to start.

What's Next

The Android SDK API surface is really large, in addition to nosotros bring solely annotated a minor percent of the APIs in addition to thus far - in that place is yet lots of move remaining. Over the side past times side several Android SDK releases, nosotros volition maintain to add together nullability annotations to the existing Android APIs, equally good equally making certain novel APIs are annotated.

With the "Kotlin-friendly" Android SDK, the nullability annotations inward AndroidX (part of the Jetpack family), in addition to Android KTX, nosotros are continuing to amend the Android APIs for developers using Kotlin. If you lot bring non yet tried Kotlin, nosotros encourage you lot to endeavour it. Not solely tin Kotlin brand your code to a greater extent than concise, it tin too amend the stability of your apps.

Happy Kotlin-ing!

Thursday, October 4, 2018

Verifying Your Google Assistant Media Activity Integrations On Android

Posted yesteryear Nevin Mital, Partner Developer Relations

The Media Controller Test (MCT) app is a powerful tool that allows y'all to evidence the intricacies of media playback on Android, together with it's only gotten fifty-fifty to a greater extent than useful. Media experiences including vocalization interactions via the Google Assistant on Android phones, cars, TVs, together with headphones, are powered yesteryear Android MediaSession APIs. This tool volition assistance y'all verify your integrations. We've similar a shot added a novel verification testing framework that tin travel used to assistance automate your QA testing.

The MCT is meant to travel used inward conjunction amongst an app that implements media APIs, such every bit the Universal Android Music Player. The MCT surfaces information almost the media app's MediaController, such every bit the PlaybackState together with Metadata, together with tin travel used to evidence inter-app media controls.

The Media Action Lifecycle tin travel complex to follow; fifty-fifty inward a uncomplicated Play From Search request, in that place are many intermediate steps (simplified timeline depicted below) where something could larn wrong. The MCT tin travel used to assistance highlight whatever inconsistencies inward how your music app handles MediaController TransportControl requests.

 app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android

Previously, using the MCT required a lot of manual interaction together with monitoring. The novel verification testing framework offers one-click tests that y'all tin run to ensure that your media app responds correctly to a playback request.

Running a verification test

To access the novel verification tests inward the MCT, click the Test clit adjacent to your desired media app.

 app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android

The adjacent concealment shows y'all detailed information almost the MediaController, for instance the PlaybackState, Metadata, together with Queue. There are 2 buttons on the toolbar inward the transcend right: the clit on the left toggles betwixt parsable together with formatted logs, together with the clit on the right refreshes this sentiment to display the most electrical current information.

 app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android

By swiping to the left, y'all larn inward at the verification tests view, where y'all tin encounter a scrollable listing of defined tests, a text plain to travel inward a question for tests that demand one, together with a department to display the results of the test.

 app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android

As an example, to run the Play From Search Test, y'all tin travel inward a search question into the text plain together with thus hitting the Run Test button. Looks similar the evidence succeeded!

 app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android

Below are examples of the Pause Test (left) together with Seek To evidence (right).

 app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android  app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android

Android TV

The MCT similar a shot also plant on Android TV! For your media app to travel amongst the Android TV version of the MCT, your media app must cause got a MediaBrowserService implementation. Please encounter here for to a greater extent than details on how to create this.

On launching the MCT on Android TV, y'all volition encounter a listing of installed media apps. Note that an app volition entirely look inward this listing if it implements the MediaBrowserService.

 app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android

Selecting an app volition cause got y'all to the testing screen, which volition display a listing of verification tests on the right.

 app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android

Running a evidence volition populate the left side of the concealment amongst selected MediaController information. For to a greater extent than details, delight banking enterprise represent the MCT logs inward Logcat.

 app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android

Tests that demand a question are marked amongst a keyboard icon. Clicking on 1 of these tests volition opened upwards an input plain for the query. Upon hitting Enter, the evidence volition run.

 app is a powerful tool that allows y'all to evidence the intricacies of media playback on Andro  Verifying your Google Assistant media activity integrations on Android

To brand text input easier, y'all tin also purpose the ADB command:

adb rhythm out input text [query]

Note that '%s' volition add together a infinite betwixt words. For example, the command adb rhythm out input text hello%sworld volition add together the text "hello world" to the input field.

What's next

The MCT currently includes uncomplicated single-media-action tests for the next requests:

  • Play
  • Play From Search
  • Play From Media ID
  • Play From URI
  • Pause
  • Stop
  • Skip To Next
  • Skip To Previous
  • Skip To Queue Item
  • Seek To

For a technical deep dive on how the tests are structured together with how to add together to a greater extent than tests, see the MCT GitHub Wiki. We'd dear for y'all to submit push clit requests amongst to a greater extent than tests that y'all remember are useful to cause got together with for whatever põrnikas fixes. Please brand certain to review the contributions process for to a greater extent than information.

Check out the latest updates on GitHub!