Ringkasan Fitur dan API

Android 15 memperkenalkan fitur dan API baru yang hebat untuk para developer. Bagian berikut merangkum fitur ini untuk membantu Anda mulai menggunakan API terkait.

Untuk melihat daftar mendetail tentang API yang ditambahkan, diubah, dan dihapus, baca laporan perbedaan API. Untuk mengetahui detail tentang API yang ditambahkan, buka referensi API Android — untuk Android 15, cari API yang ditambahkan di level API 35. Untuk mempelajari area tempat perubahan platform dapat memengaruhi aplikasi Anda, pastikan untuk memeriksa perubahan perilaku Android 15 untuk aplikasi yang menargetkan Android 15 dan untuk semua aplikasi.

Kamera dan media

Android 15 menyertakan berbagai fitur yang meningkatkan pengalaman kamera dan media serta memberi Anda akses ke alat dan hardware untuk mendukung kreator dalam mewujudkan visi mereka di Android.

Untuk mengetahui informasi selengkapnya tentang fitur dan solusi developer terbaru untuk media dan kamera Android, lihat materi Membangun pengalaman media dan kamera Android modern dari Google I/O.

Peningkatan Cahaya Rendah

Android 15 introduces Low Light Boost, an auto-exposure mode available to both Camera 2 and the night mode camera extension. Low Light Boost adjusts the exposure of the Preview stream in low-light conditions. This is different from how the night mode camera extension creates still images, because night mode combines a burst of photos to create a single, enhanced image. While night mode works very well for creating a still image, it can't create a continuous stream of frames, but Low Light Boost can. Thus, Low Light Boost enables camera capabilities, such as:

  • Providing an enhanced image preview, so users are better able to frame their low-light pictures
  • Scanning QR codes in low light

If you enable Low Light Boost, it automatically turns on when there's a low light level, and turns off when there's more light.

Apps can record off the Preview stream in low-light conditions to save a brightened video.

For more information, see Low Light Boost.

Kontrol kamera dalam aplikasi

Android 15 adds an extension for more control over the camera hardware and its algorithms on supported devices:

  • Advanced flash strength adjustments enabling precise control of flash intensity in both SINGLE and TORCH modes while capturing images.

Kontrol ruang kosong HDR

Android 15 memilih headroom HDR yang sesuai dengan kemampuan perangkat yang mendasari dan kedalaman bit panel. Untuk halaman yang memiliki banyak konten SDR, seperti aplikasi pesan yang menampilkan satu thumbnail HDR, perilaku ini dapat memengaruhi kecerahan konten SDR yang dirasakan. Android 15 memungkinkan Anda mengontrol headroom HDR dengan setDesiredHdrHeadroom untuk mencapai keseimbangan antara konten SDR dan HDR.

Kecerahan elemen UI SDR di layar kiri tampaknya lebih seragam daripada kecerahan di layar kanan, yang menyimulasikan kemungkinan masalah headroom saat konten HDR dan SDR dicampur. Dengan menyesuaikan headroom HDR, Anda dapat mencapai keseimbangan yang lebih baik antara konten SDR dan HDR.

Kontrol keras suara

Android 15 introduces support for the CTA-2075 loudness standard to help you avoid audio loudness inconsistencies and ensure users don't have to constantly adjust volume when switching between content. The system leverages known characteristics of the output devices (headphones and speaker) along with loudness metadata available in AAC audio content to intelligently adjust the audio loudness and dynamic range compression levels.

To enable this feature, you need to ensure loudness metadata is available in your AAC content and enable the platform feature in your app. For this, you instantiate a LoudnessCodecController object by calling its create factory method with the audio session ID from the associated AudioTrack; this automatically starts applying audio updates. You can pass an OnLoudnessCodecUpdateListener to modify or filter loudness parameters before they are applied on the MediaCodec.

// Media contains metadata of type MPEG_4 OR MPEG_D
val mediaCodec = 
val audioTrack = AudioTrack.Builder()
                                .setSessionId(sessionId)
                                .build()
...
// Create new loudness controller that applies the parameters to the MediaCodec
try {
   val lcController = LoudnessCodecController.create(mSessionId)
   // Starts applying audio updates for each added MediaCodec
}

AndroidX media3 ExoPlayer will also be updated to use the LoudnessCodecController APIs for a seamless app integration.

Perangkat MIDI 2.0 virtual

Android 13 added support for connecting to MIDI 2.0 devices using USB, which communicate using Universal MIDI Packets (UMP). Android 15 extends UMP support to virtual MIDI apps, enabling composition apps to control synthesizer apps as a virtual MIDI 2.0 device just like they would with an USB MIDI 2.0 device.

Decoding software AV1 yang lebih efisien

logo dav1d

dav1d, decoder software AV1 populer dari VideoLAN tersedia untuk perangkat Android yang tidak mendukung dekode AV1 dalam hardware. dav1d memiliki performa hingga 3x lebih baik daripada decoder software AV1 lama, sehingga memungkinkan pemutaran AV1 HD untuk lebih banyak pengguna, termasuk beberapa perangkat tingkat rendah dan menengah.

Aplikasi Anda harus memilih untuk menggunakan dav1d dengan memanggilnya berdasarkan nama "c2.android.av1-dav1d.decoder". dav1d akan dijadikan decoder software AV1 default dalam update berikutnya. Dukungan ini distandarisasi dan di-backport ke perangkat Android 11 yang menerima update sistem Google Play.

Alat dan produktivitas developer

Meskipun sebagian besar upaya kami untuk meningkatkan produktivitas Anda berpusat pada alat seperti Android Studio, Jetpack Compose, dan library Android Jetpack, kami selalu mencari cara di platform untuk membantu Anda mewujudkan visi dengan lebih mudah.

Update OpenJDK 17

Android 15 continues the work of refreshing Android's core libraries to align with the features in the latest OpenJDK LTS releases.

The following key features and improvements are included:

These APIs are updated on over a billion devices running Android 12 (API level 31) and higher through Google Play System updates, so you can target the latest programming features.

Peningkatan PDF

Android 15 includes substantial improvements to the PdfRenderer APIs. Apps can incorporate advanced features such as rendering password-protected files, annotations, form editing, searching, and selection with copy. Linearized PDF optimizations are supported to speed local PDF viewing and reduce resource use. The Jetpack PDF library uses these APIs to simplify adding PDF viewing capabilities to your app.

The latest updates to PDF rendering include features such as searching an embedded PDF file.

The PdfRenderer has been moved to a module that can be updated using Google Play system updates independent of the platform release, and we're supporting these changes back to Android 11 (API level 30) by creating a compatible pre-Android 15 version of the API surface, called PdfRendererPreV.

Penyempurnaan pengalihan bahasa otomatis

Android 14 added on-device, multi-language recognition in audio with automatic switching between languages, but this can cause words to get dropped, especially when languages switch with less of a pause between the two utterances. Android 15 adds additional controls to help apps tune this switching to their use case. EXTRA_LANGUAGE_SWITCH_INITIAL_ACTIVE_DURATION_TIME_MILLIS confines the automatic switching to the beginning of the audio session, while EXTRA_LANGUAGE_SWITCH_MATCH_SWITCHES deactivates the language switching after a defined number of switches. These options are particularly useful if you expect that there will be a single language spoken during the session that should be autodetected.

Peningkatan OpenType Variable Font API

Android 15 improves the usability of the OpenType variable font. You can create a FontFamily instance from a variable font without specifying weight axes with the buildVariableFamily API. The text renderer overrides the value of wght axis to match the displaying text.

Using the API simplifies the code for creating a Typeface considerably:

Kotlin

val newTypeface = Typeface.CustomFallbackBuilder(
            FontFamily.Builder(
                Font.Builder(assets, "RobotoFlex.ttf").build())
                    .buildVariableFamily())
    .build()

Java

Typeface newTypeface = Typeface.CustomFallbackBuilder(
            new FontFamily.Builder(
                new Font.Builder(assets, "RobotoFlex.ttf").build())
                    .buildVariableFamily())
    .build();

Previously, to create the same Typeface, you would need much more code:

Kotlin

val oldTypeface = Typeface.CustomFallbackBuilder(
            FontFamily.Builder(
                Font.Builder(assets, "RobotoFlex.ttf")
                    .setFontVariationSettings("'wght' 400")
                    .setWeight(400)
                    .build())
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 100")
                        .setWeight(100)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 200")
                        .setWeight(200)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 300")
                        .setWeight(300)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 500")
                        .setWeight(500)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 600")
                        .setWeight(600)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 700")
                        .setWeight(700)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 800")
                        .setWeight(800)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 900")
                        .setWeight(900)
                        .build()
                ).build()
        ).build()

Java

Typeface oldTypeface = new Typeface.CustomFallbackBuilder(
    new FontFamily.Builder(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 400")
            .setWeight(400)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 100")
            .setWeight(100)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 200")
            .setWeight(200)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 300")
            .setWeight(300)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 500")
            .setWeight(500)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 600")
            .setWeight(600)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 700")
            .setWeight(700)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 800")
            .setWeight(800)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 900")
            .setWeight(900)
            .build()
    )
    .build()
).build();

Here's an example of how a Typeface created with both the old and new APIs renders:

An example of how Typeface rendering differs using new and old
APIs

In this example, the Typeface created with the old API doesn't have the capability to create accurate font weights for the 350, 450, 550 and 650 Font instances, so the renderer falls back to the closest weight. So in this case, 300 is rendered instead of 350, 400 is rendered instead of 450, and so on. By contrast, the Typeface created with the new APIs dynamically creates a Font instance for a given weight, so accurate weights are rendered for 350, 450, 550, and 650 as well.

Kontrol pemisah baris terperinci

Starting in Android 15, a TextView and the underlying line breaker can preserve the given portion of text in the same line to improve readability. You can take advantage of this line break customization by using the <nobreak> tag in string resources or createNoBreakSpan. Similarly, you can preserve words from hyphenation by using the <nohyphen> tag or createNoHyphenationSpan.

For example, the following string resource doesn't include a line break, and renders with the text "Pixel 8 Pro." breaking in an undesirable place:

<resources>
    <string name="pixel8pro">The power and brains behind Pixel 8 Pro.</string>
</resources>

In contrast, this string resource includes the <nobreak> tag, which wraps the phrase "Pixel 8 Pro." and prevents line breaks:

<resources>
    <string name="pixel8pro">The power and brains behind <nobreak>Pixel 8 Pro.</nobreak></string>
</resources>

The difference in how these strings are rendered is shown in the following images:

Layout for a line of text where the phrase "Pixel 8 Pro." isn't wrapped using a <nobreak> tag.
Layout for the same line of text where the phrase "Pixel 8 Pro." is wrapped using a <nobreak> tag.

Pengarsipan aplikasi

Android dan Google Play mengumumkan dukungan untuk pengarsipan aplikasi tahun lalu, yang memungkinkan pengguna mengosongkan ruang dengan menghapus sebagian aplikasi yang jarang digunakan dari perangkat yang dipublikasikan menggunakan Android App Bundle di Google Play. Android 15 menyertakan dukungan tingkat OS untuk pengarsipan dan pembatalan pengarsipan aplikasi, sehingga mempermudah semua app store untuk menerapkannya.

Aplikasi dengan izin REQUEST_DELETE_PACKAGES dapat memanggil metode PackageInstaller requestArchive untuk meminta pengarsipan paket aplikasi yang diinstal, yang akan menghapus APK dan file dalam cache, tetapi mempertahankan data pengguna. Aplikasi yang diarsipkan akan ditampilkan sebagai aplikasi yang dapat ditampilkan melalui LauncherApps API; pengguna akan melihat tampilan UI untuk menyoroti bahwa mereka aplikasi akan diarsipkan. Jika pengguna mengetuk aplikasi yang diarsipkan, penginstal yang bertanggung jawab akan mendapatkan permintaan untuk membatalkan pengarsipan file, dan proses pemulihan dapat dipantau oleh siaran ACTION_PACKAGE_ADDED.

Enable 16 KB mode on a device using developer options

Toggle the Boot with 16KB page size developer option to boot a device in 16 KB mode.

Starting with Android 15 QPR1, you can use the developer option that's available on certain devices to boot the device in 16 KB mode and perform on-device testing. Before using the developer option, go to Settings > System > Software updates and apply any updates that are available.

This developer option is available on the following devices:

  • Pixel 8 and 8 Pro (with Android 15 QPR1 or higher)

  • Pixel 8a (with Android 15 QPR1 or higher)

  • Pixel 9, 9 Pro, and 9 Pro XL (with Android 15 QPR2 Beta 2 or higher)

Grafik

Android 15 menghadirkan peningkatan grafis terbaru, termasuk ANGLE dan penambahan pada sistem grafis Canvas.

Memodernisasi akses GPU Android

Logo Vulkan

Hardware Android telah berkembang cukup banyak sejak awal ketika OS inti akan berjalan di satu CPU dan GPU diakses menggunakan API berdasarkan pipeline fungsi tetap. API grafis Vulkan® telah tersedia di NDK sejak Android 7.0 (API level 24) dengan abstraksi tingkat rendah yang lebih mencerminkan hardware GPU modern, diskalakan dengan lebih baik untuk mendukung beberapa core CPU, dan menawarkan overhead driver CPU yang lebih rendah — sehingga meningkatkan performa aplikasi. Vulkan didukung oleh semua game engine modern.

Vulkan adalah antarmuka pilihan Android untuk GPU. Oleh karena itu, Android 15 menyertakan ANGLE sebagai lapisan opsional untuk menjalankan OpenGL® ES di atas Vulkan. Beralih ke ANGLE akan menstandarkan implementasi OpenGL Android untuk meningkatkan kompatibilitas, dan, dalam beberapa kasus, meningkatkan performa. Anda dapat menguji stabilitas dan performa aplikasi OpenGL ES dengan ANGLE dengan mengaktifkan opsi developer di Setelan -> Sistem -> Opsi Developer -> Eksperimental: Aktifkan ANGLE di Android 15.

Roadmap Android ANGLE di Vulkan

Roadmap perubahan mendatang pada Android GPU API.

Sebagai bagian dari penyederhanaan stack GPU, ke depannya kami akan mengirimkan ANGLE sebagai driver sistem GL di lebih banyak perangkat baru, dengan ekspektasi di masa mendatang bahwa OpenGL/ES hanya akan tersedia melalui ANGLE. Meskipun demikian, kami berencana untuk melanjutkan dukungan untuk OpenGL ES di semua perangkat.

Rekomendasi langkah selanjutnya

Gunakan opsi developer untuk memilih driver ANGLE untuk OpenGL ES dan menguji aplikasi Anda. Untuk project baru, sebaiknya gunakan Vulkan untuk C/C++.

Peningkatan untuk Canvas

Android 15 continues our modernization of Android's Canvas graphics system with additional capabilities:

  • Matrix44 provides a 4x4 matrix for transforming coordinates that should be used when you want to manipulate the canvas in 3D.
  • clipShader intersects the current clip with the specified shader, while clipOutShader sets the clip to the difference of the current clip and the shader, each treating the shader as an alpha mask. This supports the drawing of complex shapes efficiently.

Performa dan baterai

Android terus berfokus untuk membantu Anda meningkatkan performa dan kualitas aplikasi Anda. Android 15 memperkenalkan API yang membantu membuat tugas di aplikasi Anda dieksekusi secara lebih efisien, mengoptimalkan performa aplikasi, dan mengumpulkan insight tentang aplikasi Anda.

Untuk mengetahui praktik terbaik yang hemat baterai, cara men-debug penggunaan jaringan dan daya, serta detail tentang cara kami meningkatkan efisiensi baterai tugas latar belakang di Android 15 dan Android versi terbaru, lihat materi Meningkatkan efisiensi baterai tugas latar belakang di Android dari Google I/O.

ApplicationStartInfo API

In previous versions of Android, app startup has been a bit of a mystery. It was challenging to determine within your app whether it started from a cold, warm, or hot state. It was also difficult to know how long your app spent during the various launch phases: forking the process, calling onCreate, drawing the first frame, and more. When your Application class was instantiated, you had no way of knowing whether the app started from a broadcast, a content provider, a job, a backup, boot complete, an alarm, or an Activity.

The ApplicationStartInfo API on Android 15 provides all of this and more. You can even choose to add your own timestamps into the flow to help collect timing data in one place. In addition to collecting metrics, you can use ApplicationStartInfo to help directly optimize app startup; for example, you can eliminate the costly instantiation of UI-related libraries within your Application class when your app is starting up due to a broadcast.

Informasi mendetail tentang ukuran aplikasi

Since Android 8.0 (API level 26), Android has included the StorageStats.getAppBytes API that summarizes the installed size of an app as a single number of bytes, which is a sum of the APK size, the size of files extracted from the APK, and files that were generated on the device such as ahead-of-time (AOT) compiled code. This number is not very insightful in terms of how your app is using storage.

Android 15 adds the StorageStats.getAppBytesByDataType([type]) API, which lets you get insight into how your app is using up all that space, including APK file splits, AOT and speedup related code, dex metadata, libraries, and guided profiles.

Pembuatan profil yang dikelola aplikasi

Android 15 includes the ProfilingManager class, which lets you collect profiling information from within your app such as heap dumps, heap profiles, stack sampling, and more. It provides a callback to your app with a supplied tag to identify the output file, which is delivered to your app's files directory. The API does rate limiting to minimize the performance impact.

To simplify constructing profiling requests in your app, we recommend using the corresponding Profiling AndroidX API, available in Core 1.15.0-rc01 or higher.

Peningkatan database SQLite

Android 15 introduces SQLite APIs that expose advanced features from the underlying SQLite engine that target specific performance issues that can manifest in apps. These APIs are included with the update of SQLite to version 3.44.3.

Developers should consult best practices for SQLite performance to get the most out of their SQLite database, especially when working with large databases or when running latency-sensitive queries.

  • Read-only deferred transactions: when issuing transactions that are read-only (don't include write statements), use beginTransactionReadOnly() and beginTransactionWithListenerReadOnly(SQLiteTransactionListener) to issue read-only DEFERRED transactions. Such transactions can run concurrently with each other, and if the database is in WAL mode, they can run concurrently with IMMEDIATE or EXCLUSIVE transactions.
  • Row counts and IDs: APIs were added to retrieve the count of changed rows or the last inserted row ID without issuing an additional query. getLastChangedRowCount() returns the number of rows that were inserted, updated, or deleted by the most recent SQL statement within the current transaction, while getTotalChangedRowCount() returns the count on the current connection. getLastInsertRowId() returns the rowid of the last row to be inserted on the current connection.
  • Raw statements: issue a raw SQlite statement, bypassing convenience wrappers and any additional processing overhead that they may incur.

Update Android Dynamic Performance Framework

Android 15 continues our investment in the Android Dynamic Performance Framework (ADPF), a set of APIs that allow games and performance intensive apps to interact more directly with power and thermal systems of Android devices. On supported devices, Android 15 adds ADPF capabilities:

  • A power-efficiency mode for hint sessions to indicate that their associated threads should prefer power saving over performance, great for long-running background workloads.
  • GPU and CPU work durations can both be reported in hint sessions, allowing the system to adjust CPU and GPU frequencies together to best meet workload demands.
  • Thermal headroom thresholds to interpret possible thermal throttling status based on headroom prediction.

To learn more about how to use ADPF in your apps and games, head over to the documentation.

Privasi

Android 15 menyertakan berbagai fitur yang membantu developer aplikasi melindungi privasi pengguna.

Deteksi perekaman layar

Android 15 adds support for apps to detect that they are being recorded. A callback is invoked whenever the app transitions between being visible or invisible within a screen recording. An app is considered visible if activities owned by the registering process's UID are being recorded. This way, if your app is performing a sensitive operation, you can inform the user that they're being recorded.

val mCallback = Consumer<Int> { state ->
  if (state == SCREEN_RECORDING_STATE_VISIBLE) {
    // We're being recorded
  } else {
    // We're not being recorded
  }
}

override fun onStart() {
   super.onStart()
   val initialState =
      windowManager.addScreenRecordingCallback(mainExecutor, mCallback)
   mCallback.accept(initialState)
}

override fun onStop() {
    super.onStop()
    windowManager.removeScreenRecordingCallback(mCallback)
}

Kemampuan IntentFilter yang diperluas

Android 15 di-build dengan dukungan untuk resolusi Intent yang lebih presisi melalui UriRelativeFilterGroup, yang berisi kumpulan objek UriRelativeFilter yang membentuk kumpulan aturan pencocokan Intent yang harus dipenuhi, termasuk parameter kueri URL, fragmen URL, dan aturan pemblokiran atau pengecualian.

Aturan ini dapat ditentukan dalam file XML AndroidManifest dengan tag <uri-relative-filter-group>, yang secara opsional dapat menyertakan tag android:allow. Tag tersebut dapat berisi tag <data> yang menggunakan atribut tag data yang ada serta atribut android:query dan android:fragment.

Berikut adalah contoh sintaksis AndroidManifest:

<intent-filter android:autoVerify="true">
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.BROWSABLE" />
  <category android:name="android.intent.category.DEFAULT" />
  <data android:scheme="http" />
  <data android:scheme="https" />
  <data android:host="astore.com" />
  <uri-relative-filter-group>
    <data android:pathPrefix="/auth" />
    <data android:query="region=na" />
  </uri-relative-filter-group>
  <uri-relative-filter-group android:allow="false">
    <data android:pathPrefix="/auth" />
    <data android:query="mobileoptout=true" />
  </uri-relative-filter-group>
  <uri-relative-filter-group android:allow="false">
    <data android:pathPrefix="/auth" />
    <data android:fragmentPrefix="faq" />
  </uri-relative-filter-group>
</intent-filter>

Ruang privasi

Ruang pribadi dapat dibuka kuncinya dan dikunci untuk menampilkan atau menyembunyikan aplikasi sensitif di perangkat.

Ruang privasi memungkinkan pengguna membuat ruang terpisah di perangkat mereka tempat mereka dapat menyembunyikan aplikasi sensitif dari orang lain, dengan lapisan autentikasi tambahan. Ruang privasi menggunakan profil pengguna terpisah. Pengguna dapat memilih untuk menggunakan kunci perangkat atau faktor kunci terpisah untuk ruang pribadi.

Aplikasi di ruang pribadi muncul di penampung terpisah di peluncur, dan disembunyikan dari tampilan terbaru, notifikasi, setelan, dan dari aplikasi lain saat ruang pribadi dikunci. Konten yang dibuat dan didownload pengguna (seperti media atau file) dan akun dipisahkan antara ruang pribadi dan ruang utama. Sharesheet sistem dan pemilih foto dapat digunakan untuk memberi aplikasi akses ke konten di seluruh ruang saat ruang pribadi tidak dikunci.

Pengguna tidak dapat memindahkan aplikasi yang sudah ada dan datanya ke ruang pribadi. Sebagai gantinya, pengguna memilih opsi penginstalan di ruang pribadi untuk menginstal aplikasi menggunakan app store mana pun yang mereka inginkan. Aplikasi di ruang pribadi diinstal sebagai salinan terpisah dari aplikasi apa pun di ruang utama (salinan baru dari aplikasi yang sama).

Saat pengguna mengunci ruang pribadi, profil akan dihentikan. Saat profil dihentikan, aplikasi di ruang pribadi tidak lagi aktif dan tidak dapat melakukan aktivitas latar depan atau latar belakang, termasuk menampilkan notifikasi.

Sebaiknya uji aplikasi Anda dengan ruang pribadi untuk memastikan aplikasi berfungsi seperti yang diharapkan, terutama jika aplikasi Anda termasuk dalam salah satu kategori berikut:

Membuat kueri pilihan pengguna terbaru untuk Akses Foto yang Dipilih

Apps can now highlight only the most-recently-selected photos and videos when partial access to media permissions is granted. This feature can improve the user experience for apps that frequently request access to photos and videos. To use this feature in your app, enable the QUERY_ARG_LATEST_SELECTION_ONLY argument when querying MediaStore through ContentResolver.

Kotlin

val externalContentUri = MediaStore.Files.getContentUri("external")

val mediaColumns = arrayOf(
   FileColumns._ID,
   FileColumns.DISPLAY_NAME,
   FileColumns.MIME_TYPE,
)

val queryArgs = bundleOf(
   // Return only items from the last selection (selected photos access)
   QUERY_ARG_LATEST_SELECTION_ONLY to true,
   // Sort returned items chronologically based on when they were added to the device's storage
   QUERY_ARG_SQL_SORT_ORDER to "${FileColumns.DATE_ADDED} DESC",
   QUERY_ARG_SQL_SELECTION to "${FileColumns.MEDIA_TYPE} = ? OR ${FileColumns.MEDIA_TYPE} = ?",
   QUERY_ARG_SQL_SELECTION_ARGS to arrayOf(
       FileColumns.MEDIA_TYPE_IMAGE.toString(),
       FileColumns.MEDIA_TYPE_VIDEO.toString()
   )
)

Java

Uri externalContentUri = MediaStore.Files.getContentUri("external");

String[] mediaColumns = {
    FileColumns._ID,
    FileColumns.DISPLAY_NAME,
    FileColumns.MIME_TYPE
};

Bundle queryArgs = new Bundle();
queryArgs.putBoolean(MediaStore.QUERY_ARG_LATEST_SELECTION_ONLY, true);
queryArgs.putString(MediaStore.QUERY_ARG_SQL_SORT_ORDER, FileColumns.DATE_ADDED + " DESC");
queryArgs.putString(MediaStore.QUERY_ARG_SQL_SELECTION, FileColumns.MEDIA_TYPE + " = ? OR " + FileColumns.MEDIA_TYPE + " = ?");
queryArgs.putStringArray(MediaStore.QUERY_ARG_SQL_SELECTION_ARGS, new String[] {
    String.valueOf(FileColumns.MEDIA_TYPE_IMAGE),
    String.valueOf(FileColumns.MEDIA_TYPE_VIDEO)
});

Privacy Sandbox di Android

Android 15 includes the latest Android Ad Services extensions, incorporating the latest version of the Privacy Sandbox on Android. This addition is part of our work to develop technologies that improve user privacy and enable effective, personalized advertising experiences for mobile apps. Our privacy sandbox page has more information about the Privacy Sandbox on Android developer preview and beta programs to help you get started.

Health Connect

Android 15 mengintegrasikan ekstensi terbaru di seputar Health Connect dari Android, platform terpusat dan aman untuk mengelola serta membagikan data kesehatan dan kebugaran yang dikumpulkan aplikasi. Update ini menambahkan dukungan untuk jenis data tambahan di seluruh kebugaran, gizi, suhu kulit, rencana latihan, dan lainnya.

Pelacakan suhu kulit memungkinkan pengguna menyimpan dan membagikan data suhu yang lebih akurat dari perangkat wearable atau perangkat pelacakan lainnya.

Rencana latihan adalah rencana olahraga terstruktur untuk membantu pengguna mencapai kebugaran mereka tujuan tersebut. Dukungan paket pelatihan mencakup berbagai penyelesaian dan performa tujuan:

Pelajari lebih lanjut update terbaru untuk Health Connect di Android dalam presentasi Membuat pengalaman yang dapat disesuaikan dengan Android Health dari Google I/O.

Berbagi layar aplikasi

Android 15 mendukung berbagi layar aplikasi sehingga pengguna dapat berbagi atau merekam jendela aplikasi, bukan seluruh layar perangkat. Fitur ini, yang pertama kali diaktifkan di Android 14 QPR2, mencakup callback MediaProjection yang memungkinkan aplikasi Anda menyesuaikan pengalaman berbagi layar aplikasi. Perhatikan bahwa untuk aplikasi yang menargetkan Android 14 (level API 34) atau yang lebih tinggi, izin pengguna diperlukan untuk setiap sesi pengambilan MediaProjection.

Pengalaman pengguna dan UI sistem

Android 15 memberi developer dan pengguna aplikasi kontrol dan fleksibilitas yang lebih besar untuk mengonfigurasi perangkat agar sesuai dengan kebutuhan mereka.

Untuk mempelajari lebih lanjut cara menggunakan peningkatan terbaru di Android 15 untuk meningkatkan pengalaman pengguna aplikasi Anda, tonton sesi Meningkatkan pengalaman pengguna aplikasi Android Anda dari Google I/O.

Pratinjau widget yang lebih kaya dengan Generated Previews API

Sebelum Android 15, satu-satunya cara untuk menyediakan pratinjau pemilih widget adalah dengan menentukan resource gambar atau tata letak statis. Pratinjau ini sering kali berbeda secara signifikan dengan tampilan widget sebenarnya saat ditempatkan di layar utama. Selain itu, resource statis tidak dapat dibuat dengan Jetpack Glance, sehingga developer Glance harus mengambil screenshot widget atau membuat tata letak XML untuk memiliki pratinjau widget.

Android 15 menambahkan dukungan untuk pratinjau yang dihasilkan. Artinya, widget aplikasi penyedia dapat membuat RemoteViews untuk digunakan sebagai pratinjau pemilih, resource statis.

Aplikasi dapat menyediakan Tampilan Jarak Jauh ke Pemilih Widget, sehingga dapat memperbarui konten di pemilih agar lebih mewakili apa yang akan dilihat pengguna.

Push API

Aplikasi dapat menyediakan pratinjau yang dihasilkan melalui API push. Aplikasi dapat memberikan melihat pratinjau di titik mana pun dalam siklus prosesnya, dan tidak menerima permintaan eksplisit dari {i>host<i} untuk menyediakan pratinjau. Pratinjau disimpan di AppWidgetService, dan host dapat memintanya secara on-demand. Contoh berikut memuat widget XML dan menyetelnya sebagai pratinjau:

AppWidgetManager.getInstance(appContext).setWidgetPreview(
   ComponentName(
       appContext,
       SociaLiteAppWidgetReceiver::class.java
   ),
   AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN,
   RemoteViews("com.example", R.layout.widget_preview)
)

Alur yang diharapkan adalah:

  1. Penyedia widget akan memanggil setWidgetPreview kapan saja. Pratinjau yang disediakan dipertahankan di AppWidgetService dengan info penyedia lainnya.
  2. setWidgetPreview memberi tahu host tentang pratinjau yang diperbarui melalui callback AppWidgetHost.onProvidersChanged. Sebagai respons, widget {i>host<i} memuat ulang semua informasi penyedianya.
  3. Saat menampilkan pratinjau widget, host akan memeriksa AppWidgetProviderInfo.generatedPreviewCategories, dan jika kategori yang dipilih tersedia, panggil AppWidgetManager.getWidgetPreview untuk menampilkan pratinjau tersimpan untuk penyedia ini.

Waktu untuk menelepon setWidgetPreview

Karena tidak ada callback untuk menyediakan pratinjau, aplikasi dapat memilih untuk mengirim melihat pratinjau kapan saja saat dijalankan. Frekuensi update pratinjau bergantung pada kasus penggunaan widget.

Daftar berikut menjelaskan dua kategori utama kasus penggunaan pratinjau:

  • Penyedia yang menampilkan data sebenarnya dalam pratinjau widget mereka, misalnya data yang dipersonalisasi atau informasi terbaru. Penyedia ini dapat menetapkan pratinjau setelah pengguna login atau telah melakukan konfigurasi awal di aplikasi mereka. Setelah itu, mereka dapat menyiapkan tugas berkala untuk memperbarui pratinjau pada ritme yang dipilih. Contoh widget jenis ini dapat berupa foto, kalender, cuaca, atau berita .
  • Penyedia yang menampilkan informasi statis di pratinjau atau widget tindakan cepat yang tidak menampilkan data apa pun. Penyedia ini dapat menetapkan pratinjau satu kali, saat aplikasi pertama kali diluncurkan. Contoh jenis widget ini mencakup perjalanan cepat tindakan atau widget pintasan Chrome.

Beberapa penyedia mungkin menampilkan pratinjau statis pada pemilih mode hub, tetapi informasi di pemilih layar utama. Penyedia ini harus mengikuti panduan untuk kedua kasus penggunaan ini guna menetapkan pratinjau.

Picture-in-Picture

Android 15 introduces changes in Picture-in-Picture (PiP) ensuring an even smoother transition when entering into PiP mode. This will be beneficial for apps having UI elements overlaid on top of their main UI, which goes into PiP.

Developers use the onPictureInPictureModeChanged callback to define logic that toggles the visibility of the overlaid UI elements. This callback is triggered when the PiP enter or exit animation is completed. Beginning in Android 15, the PictureInPictureUiState class includes another state.

With this UI state, apps targeting Android 15 (API level 35) will observe the Activity#onPictureInPictureUiStateChanged callback being invoked with isTransitioningToPip() as soon as the PiP animation starts. There are many UI elements that are not relevant for the app when it is in PiP mode, for example views or layout that include information such as suggestions, upcoming video, ratings, and titles. When the app goes to PiP mode, use the onPictureInPictureUiStateChanged callback to hide these UI elements. When the app goes to full screen mode from the PiP window, use onPictureInPictureModeChanged callback to unhide these elements, as shown in the following examples:

override fun onPictureInPictureUiStateChanged(pipState: PictureInPictureUiState) {
        if (pipState.isTransitioningToPip()) {
          // Hide UI elements
        }
    }
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) {
        if (isInPictureInPictureMode) {
          // Unhide UI elements
        }
    }

This quick visibility toggle of irrelevant UI elements (for a PiP window) helps ensure a smoother and flicker-free PiP enter animation.

Aturan Jangan Ganggu yang ditingkatkan

AutomaticZenRule lets apps customize Attention Management (Do Not Disturb) rules and decide when to activate or deactivate them. Android 15 greatly enhances these rules with the goal of improving the user experience. The following enhancements are included:

  • Adding types to AutomaticZenRule, allowing the system to apply special treatment to some rules.
  • Adding an icon to AutomaticZenRule, helping to make the modes be more recognizable.
  • Adding a triggerDescription string to AutomaticZenRule that describes the conditions on which the rule should become active for the user.
  • Added ZenDeviceEffects to AutomaticZenRule, allowing rules to trigger things like grayscale display, night mode, or dimming the wallpaper.

Menetapkan VibrationEffect untuk saluran notifikasi

Android 15 mendukung setelan getaran yang kaya untuk notifikasi masuk dengan saluran menggunakan NotificationChannel.setVibrationEffect, sehingga pengguna dapat membedakan berbagai jenis notifikasi tanpa hanya dengan melihat perangkat mereka.

Chip status bar proyeksi media dan penghentian otomatis

Media projection can expose private user information. A new, prominent status bar chip makes users aware of any ongoing screen projection. Users can tap the chip to stop screen casting, sharing, or recording. Also, for a more intuitive user experience, any in‑progress screen projection now automatically stops when the device screen is locked.

Chip status bar untuk berbagi layar, transmisi, dan perekaman.

Perangkat layar besar dan faktor bentuk

Android 15 memberi aplikasi Anda dukungan untuk mendapatkan hasil maksimal dari faktor bentuk Android, termasuk layar besar, perangkat flippable, dan perangkat foldable.

Multitasking layar besar yang ditingkatkan

Android 15 gives users better ways to multitask on large screen devices. For example, users can save their favorite split-screen app combinations for quick access and pin the taskbar on screen to quickly switch between apps. This means that making sure your app is adaptive is more important than ever.

Google I/O has sessions on Building adaptive Android apps and Building UI with the Material 3 adaptive library that can help, and our documentation has more to help you Design for large screens.

Dukungan layar luar

Your app can declare a property that Android 15 uses to allow your Application or Activity to be presented on the small cover screens of supported flippable devices. These screens are too small to be considered as compatible targets for Android apps to run on, but your app can opt in to supporting them, making your app available in more places.

Konektivitas

Android 15 mengupdate platform untuk memberi aplikasi Anda akses ke kemajuan terbaru dalam teknologi nirkabel dan komunikasi.

Dukungan satelit

Android 15 continues to extend platform support for satellite connectivity and includes some UI elements to ensure a consistent user experience across the satellite connectivity landscape.

Apps can use ServiceState.isUsingNonTerrestrialNetwork() to detect when a device is connected to a satellite, giving them more awareness of why full network services might be unavailable. Additionally, Android 15 provides support for SMS and MMS apps as well as preloaded RCS apps to use satellite connectivity for sending and receiving messages.

A notification appears when the device connects to a satellite.

Pengalaman NFC yang lebih lancar

Android 15 berupaya membuat pengalaman pembayaran nirsentuh menjadi lebih lancar dan andal sekaligus terus mendukung ekosistem aplikasi NFC Android yang andal. Di perangkat yang didukung, aplikasi dapat meminta NfcAdapter untuk memasuki mode pengamatan, tempat perangkat memproses tetapi tidak merespons pembaca NFC, yang mengirim PollingFrame objek layanan NFC aplikasi untuk diproses. Objek PollingFrame dapat digunakan untuk melakukan autentikasi sebelum komunikasi pertama ke pembaca NFC, sehingga memungkinkan transaksi sekali ketuk dalam banyak kasus.

Selain itu, aplikasi dapat mendaftarkan filter di perangkat yang didukung sehingga aplikasi dapat diberi tahu tentang aktivitas loop polling, yang memungkinkan operasi yang lancar dengan beberapa aplikasi yang mendukung NFC.

Peran Wallet

Android 15 introduces a Wallet role that allows tighter integration with the user's preferred wallet app. This role replaces the NFC default contactless payment setting. Users can manage the Wallet role holder by navigating to Settings > Apps > Default Apps.

The Wallet role is used when routing NFC taps for AIDs registered in the payment category. Taps always go to the Wallet role holder unless another app that is registered for the same AID is running in the foreground.

This role is also used to determine where the Wallet Quick Access tile should go when activated. When the role is set to "None", the Quick Access tile isn't available and payment category NFC taps are only delivered to the foreground app.

Keamanan

Android 15 membantu Anda meningkatkan keamanan aplikasi, melindungi data aplikasi, dan memberi pengguna lebih banyak transparansi dan kontrol atas data mereka. Tonton video Menjaga keamanan pengguna di Android dari Google I/O untuk mengetahui lebih lanjut tindakan yang kami lakukan untuk meningkatkan pengamanan pengguna dan melindungi aplikasi Anda dari ancaman baru.

Mengintegrasikan Credential Manager dengan isi otomatis

Starting with Android 15, developers can link specific views like username or password fields with Credential Manager requests, making it easier to provide a tailored user experience during the sign-in process. When the user focuses on one of these views, a corresponding request is sent to Credential Manager. The resulting credentials are aggregated across providers and displayed in autofill fallback UIs, such as inline suggestions or drop-down suggestions. The Jetpack androidx.credentials library is the preferred endpoint for developers to use and will soon be available to further enhance this feature in Android 15 and higher.

Mengintegrasikan pendaftaran dan login sekali ketuk dengan perintah biometrik

Credential Manager integrates biometric prompts into the credential creation and sign-in processes, eliminating the need for providers to manage biometric prompts. As a result, credential providers only need to focus on the results of the create and get flows, augmented with the biometric flow result. This simplified process creates a more efficient and streamlined credential creation and retrieval process.

Pengelolaan kunci untuk enkripsi end-to-end

Kami memperkenalkan E2eeContactKeysManager di Android 15, yang memfasilitasi enkripsi end-to-end (E2EE) di aplikasi Android Anda dengan menyediakan API tingkat OS untuk penyimpanan kunci publik kriptografis.

E2eeContactKeysManager dirancang untuk berintegrasi dengan aplikasi kontak platform guna memberi pengguna cara terpusat untuk mengelola dan memverifikasi kunci publik kontak mereka.

Pemeriksaan izin pada URI konten

Android 15 memperkenalkan serangkaian API yang melakukan pemeriksaan izin pada URI konten:

Aksesibilitas

Android 15 menambahkan fitur yang meningkatkan aksesibilitas bagi pengguna.

Braille yang Lebih Baik

In Android 15, we've made it possible for TalkBack to support Braille displays that are using the HID standard over both USB and secure Bluetooth.

This standard, much like the one used by mice and keyboards, will help Android support a wider range of Braille displays over time.

Internasionalisasi

Android 15 menambahkan fitur dan kemampuan yang melengkapi pengalaman pengguna saat perangkat digunakan dalam bahasa yang berbeda.

Font variabel CJK

Mulai Android 15, file font untuk bahasa China, Jepang, dan Korea (CJK), NotoSansCJK, kini menjadi font variabel. Font variabel membuka kemungkinan untuk tipografi kreatif dalam bahasa CJK. Desainer dapat menjelajahi berbagai gaya yang lebih luas dan membuat tata letak yang menarik secara visual yang sebelumnya sulit atau tidak mungkin dicapai.

Tampilan font variabel untuk bahasa China, Jepang, dan Korea (CJK) dengan lebar font yang berbeda.

Penjustifikasi antar-karakter

Mulai Android 15, teks dapat dibenarkan menggunakan spasi huruf dengan menggunakan JUSTIFICATION_MODE_INTER_CHARACTER. Justifikasi antarkata pertama kali diperkenalkan di Android 8.0 (API level 26), dan justifikasi antarkarakter memberikan kemampuan serupa untuk bahasa yang menggunakan karakter spasi kosong untuk segmentasi, seperti China, Jepang, dan lainnya.

Tata letak untuk teks bahasa Jepang menggunakan JUSTIFICATION_MODE_NONE.
Tata letak untuk teks bahasa Inggris menggunakan JUSTIFICATION_MODE_NONE.


Tata letak untuk teks bahasa Jepang menggunakan JUSTIFICATION_MODE_INTER_WORD.
Tata letak untuk teks bahasa Inggris menggunakan JUSTIFICATION_MODE_INTER_WORD.


Tata letak untuk teks bahasa Jepang menggunakan JUSTIFICATION_MODE_INTER_CHARACTER.
Tata letak untuk teks bahasa Inggris menggunakan JUSTIFICATION_MODE_INTER_CHARACTER.

Konfigurasi jeda baris otomatis

Android started supporting phrase-based line breaks for Japanese and Korean in Android 13 (API level 33). However, while phrase-based line breaks improve the readability of short lines of text, they don't work well for long lines of text. In Android 15, apps can apply phrase-based line breaks only for short lines of text, using the LINE_BREAK_WORD_STYLE_AUTO option. This option selects the best word style option for the text.

For short lines of text, phrase-based line breaks are used, functioning the same as LINE_BREAK_WORD_STYLE_PHRASE, as shown in the following image:

For short lines of text, LINE_BREAK_WORD_STYLE_AUTO applies phrase-based line breaks to improve the readability of the text. This is the same as applying LINE_BREAK_WORD_STYLE_PHRASE.

For longer lines of text, LINE_BREAK_WORD_STYLE_AUTO uses a no line-break word style, functioning the same as LINE_BREAK_WORD_STYLE_NONE, as shown in the following image:

For long lines of text, LINE_BREAK_WORD_STYLE_AUTO applies no line-break word style to improve the readability of the text. This is the same as applying LINE_BREAK_WORD_STYLE_NONE.

Font Hentaigana Jepang Tambahan

In Android 15, a font file for old Japanese Hiragana (known as Hentaigana) is bundled by default. The unique shapes of Hentaigana characters can add a distinctive flair to artwork or design while also helping to preserve accurate transmission and understanding of ancient Japanese documents.

Character and text style for the Japanese Hentaigana font.

VideoLAN cone Copyright (c) 1996-2010 VideoLAN. This logo or a modified version may be used or modified by anyone to refer to the VideoLAN project or any product developed by the VideoLAN team, but does not indicate endorsement by the project.

Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc.

OpenGL is a registered trademark and the OpenGL ES logo is a trademark of Hewlett Packard Enterprise used by permission by Khronos.