# MbmsHelper

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/telephony/mbms/MbmsHelper "View this page in Java")

<br />

```
class MbmsHelper
```

<br />

*** ** * ** ***

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

## Summary

|                                              ### Public functions                                               |
|-----------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?` | [getBestNameForService](https://developer.android.com/reference/kotlin/androidx/core/telephony/mbms/MbmsHelper#getBestNameForService(android.content.Context,android.telephony.mbms.ServiceInfo))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`, serviceInfo: `[ServiceInfo](https://developer.android.com/reference/android/telephony/mbms/ServiceInfo.html)`)` Finds the best name for an eMBMS streaming or file-download service, given a[Context](https://developer.android.com/reference/android/content/Context.html)that specifies the user's preferred languages. |

## Public functions

### getBestNameForService

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

```
java-static fun getBestNameForService(context: Context, serviceInfo: ServiceInfo): CharSequence?
```

Finds the best name for an eMBMS streaming or file-download service, given a[Context](https://developer.android.com/reference/android/content/Context.html)that specifies the user's preferred languages. If no language supported by the[ServiceInfo](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[P](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#P()), this method will return`null`.  

|                                                  Parameters                                                   |
|---------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)                    | An instance of[Context](https://developer.android.com/reference/android/content/Context.html)from your user-facing app                                                                                                                                                                                          |
| `serviceInfo: `[ServiceInfo](https://developer.android.com/reference/android/telephony/mbms/ServiceInfo.html) | An instance of[android.telephony.mbms.StreamingServiceInfo](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceInfo.html)or[android.telephony.mbms.FileServiceInfo](https://developer.android.com/reference/android/telephony/mbms/FileServiceInfo.html)provided by the middleware. |

|                                              Returns                                              |
|---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
| [CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?` | The best name to display to the user for the service, or`null`if nothing matches. |