# Titanium.Media.Android

> Android-specific media-related functionality.

- Source: https://titaniumsdk.com/docs/sdk/12.8.0/Titanium.Media.Android
- Titanium SDK version: 12.8.0
- Kind: module
- Platforms: Android
- Since: Titanium SDK 1.7.0
- Extends: Titanium.Module
- Inheritance: Titanium.Module > Titanium.Proxy

## Methods

### scanMediaFiles

- Platforms: Android

Scans newly created or downloaded media files to make them available to other
Android media providers, such as the Gallery.

Android scans media files for inclusion in the Gallery and other media providers.
Use this method to force an immediate scan of particular files, such as
newly-created or downloaded resources.
    
See [MediaScannerConnection in the Android API Reference](https://developer.android.com/reference/android/media/MediaScannerConnection.html).

Parameters:

- `paths` (Array<String>): Array of paths to the files you want to scan.
- `mimeTypes` (Array<String>): Array of MIME types for the files in the paths parameter. If `null`, MIME type will be inferred from the file names.
- `callback` (Callback<MediaScannerResponse>): Function to call when each file is done being scanned.

### setSystemWallpaper

- Platforms: Android

Set the system homescreen wallpaper.

The image to use as the wallpaper must be passed as a [Titanium.Blob](https://titaniumsdk.com/docs/sdk/Titanium.Blob.md). You can
create a `Blob` from an image file by calling [File.read](https://titaniumsdk.com/docs/sdk/Titanium.Filesystem.File.md#read). 
You can also use the [Titanium.Media.openPhotoGallery](https://titaniumsdk.com/docs/sdk/Titanium.Media.md#openPhotoGallery) 
or [Titanium.Media.showCamera](https://titaniumsdk.com/docs/sdk/Titanium.Media.md#showCamera) methods to allow users to select an existing photo
or take a new one.

Parameters:

- `image` (Titanium.Blob): Image to use as the wallpaper, as a `Blob` object.
- `scale` (Boolean): If `true`, the image is scaled to fit the width of the system wallpaper. If `false`, the image is not scaled.

## Inherited members

7 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/12.8.0/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `lifecycleContainer`, `removeEventListener`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

