Connect with us

Code

Platform Samples – A collection of samples of different Android OS platform APIs

A collection of samples of different Android OS platform APIs.

Note: the goal of these samples are to showcase certain functionality in isolation and they might use simplified code. The project uses the casa-android (intended only for demo projects). For best practices follow our documentation and check Now In Android

Browse the samples inside each topic samples folder:

You can find a list of all the available samples here.

🚧 Work-in-Progress: we are working on brining more existing and new samples into this format.

How to run

  1. Clone the repository
  2. Open the whole project in Android Studio.
  3. Sync & Run app configuration

The app will open with the samples list screen that allows you to navigate throughout the different categories and available samples.

Note: the app module is required to bring together all the samples but it’s not relevant for their functionality, you can simply ignore it. The wiring is done under the hood and an implementation detail not needed to understand any sample functionality.

Deeplink to sample

To open a specific sample directly you can use one of the auto-generated configurations.

  1. Build the project at least once
  2. Open Run Configuration dropdown
  3. Select sample name
  4. Run

Tip: use ⌃⌥R or Alt+Shift+F10 shortcut to open the full list and launch the selected one.

Reporting Issues

You can report an issue with a sample using this repository. When doing so, make sure to specify which sample you are referring to.

Contributions

Please contribute! We will gladly review any pull requests. Make sure to read the Contributing page first though.

Note: make sure to run ./gradlew --init-script gradle/init.gradle.kts spotlessApply before summitting PRs.

Platform Samples on GitHub: https://github.com/android/platform-samples
Platform: Android
⭐️: 234
Advertisement

Trending