# MbmsHelper

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/telephony/mbms/MbmsHelper.java+class:androidx.core.telephony.mbms.MbmsHelper) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public final class MbmsHelper
```

<br />

*** ** * ** ***

Helper methods for working with the `https://developer.android.com/reference/android/telephony/mbms/package-summary.html` cell-broadcast APIs.

## Summary

| ### Public methods |
|---|---|
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/core/telephony/mbms/MbmsHelper#getBestNameForService(android.content.Context,android.telephony.mbms.ServiceInfo)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/telephony/mbms/ServiceInfo.html serviceInfo )` Finds the best name for an eMBMS streaming or file-download service, given a `https://developer.android.com/reference/android/content/Context.html` that specifies the user's preferred languages. |

## Public methods

### getBestNameForService

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static @Nullable CharSequence getBestNameForService(
    @NonNull Context context,
    @NonNull ServiceInfo serviceInfo
)
```

Finds the best name for an eMBMS streaming or file-download service, given a `https://developer.android.com/reference/android/content/Context.html` that specifies the user's preferred languages. If no language supported by the `https://developer.android.com/reference/android/telephony/mbms/ServiceInfo.html` is preferred by the user, this method will return `null`. If called while running on an SDK version prior to `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#P`, this method will return `null`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context` | An instance of `https://developer.android.com/reference/android/content/Context.html` from your user-facing app |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/telephony/mbms/ServiceInfo.html serviceInfo` | An instance of `https://developer.android.com/reference/android/telephony/mbms/StreamingServiceInfo.html` or `https://developer.android.com/reference/android/telephony/mbms/FileServiceInfo.html` provided by the middleware. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | The best name to display to the user for the service, or `null` if nothing matches. |