Added in API level 34

ForegroundServiceTypeException


public abstract class ForegroundServiceTypeException
extends ServiceStartNotAllowedException

java.lang.Object
   โ†ณ java.lang.Throwable
     โ†ณ java.lang.Exception
       โ†ณ java.lang.RuntimeException
         โ†ณ java.lang.IllegalStateException
           โ†ณ android.app.ServiceStartNotAllowedException
             โ†ณ android.app.ForegroundServiceTypeException


Base exception thrown when an app tries to start a foreground Service without a valid type.

Summary

Public constructors

ForegroundServiceTypeException(String message)

Constructor.

Inherited methods

Public constructors

ForegroundServiceTypeException

Added in API level 34
public ForegroundServiceTypeException (String message)

Constructor.

Parameters
message String: This value cannot be null.