Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

MbmsHelper

class MbmsHelper
kotlin.Any
   ↳ androidx.core.telephony.mbms.MbmsHelper

Helper methods for working with the android.telephony.mbms cell-broadcast APIs.

Summary

Public methods
static CharSequence?
getBestNameForService(@NonNull context: Context, @NonNull serviceInfo: ServiceInfo)

Finds the best name for an eMBMS streaming or file-download service, given a Context that specifies the user's preferred languages.

Public methods

getBestNameForService

@Nullable static fun getBestNameForService(@NonNull context: Context, @NonNull serviceInfo: ServiceInfo): CharSequence?

Finds the best name for an eMBMS streaming or file-download service, given a Context that specifies the user's preferred languages. If no language supported by the ServiceInfo is preferred by the user, this method will return null. If called while running on an SDK version prior to Build.VERSION_CODES#P, this method will return null.

Parameters
context Context: An instance of Context from your user-facing app
serviceInfo Context: An instance of android.telephony.mbms.StreamingServiceInfo or android.telephony.mbms.FileServiceInfo provided by the middleware.
Return
CharSequence?: The best name to display to the user for the service, or null if nothing matches.