---
title: DataSources
description: Reference guide for DataSources class and methods provided by Tealium for Android.
url: https://docs.tealium.com/platforms/android-java/api/data-sources/
---
## Class: `DataSources`

The following summarizes the commonly used methods of the `DataSources` class.

| Method | Description |
| ----- | ------ |
| `getPersistentDataSources()` | Get the persistent data sources |  
|` getVolatileDataSources()` | Get the volatile data sources |
| `getVisitorId()` | Get the visitor ID generated by the Tealium library |

### `getPersistentDataSources()`

Get the persistent data sources. Persistent data values are stored on the device as [SharedPreferences](https://developer.android.com/reference/android/content/SharedPreferences) and are merged into each event and preserved between launches of the app.

```java
getPersistentDataSources();
```

| Returns | Return Type |
| --- | --- |
| Persistent data sources | `SharedPreferences` |

### `getVolatileDataSources()`

Get the volatile data sources. Volatile data values are merged into to each event, but discarded upon closing the app and restarting.

```java
getVolatileDataSources();
```

| Returns | Return Type |
| --- | --- |
| Volatile data sources | `Map` |

### `getVisitorId() `

Get the visitor ID generated by the Tealium library.

```java
getVisitorId();
```

| Returns | Return Type |
| --- | --- |
| Visitor ID | `String` |
