ForegroundServiceStartNotAllowedExceptionの解決方法

# 実装
* ForegroundServiceの実装
* ForegroundService内で、位置情報取得としてFusedLocationProviderClient を使用

# 解決方法
* AndroidManifest.xmlのサービスに"android:foregroundServiceType="location" の追加
```XML:AndroidManifest.xml
        <service
            android:name=".LocationService"
            android:enabled="true"
            android:exported="false"
            android:foregroundServiceType="location" 
            >
        </service>
```

# Exception全体
```
2022-10-22 13:50:45.156 31699-31699/ … E/AndroidRuntime: FATAL EXCEPTION: main
    Process:  …, PID: 31699
    java.lang.RuntimeException: Unable to create application  …: android.app.ForegroundServiceStartNotAllowedException: startForegroundService() not allowed due to mAllowStartForeground false: service …
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6769)
        at android.app.ActivityThread.access$1600(ActivityThread.java:253)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2090)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:209)
        at android.os.Looper.loop(Looper.java:296)
        at android.app.ActivityThread.main(ActivityThread.java:7880)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:568)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
     Caused by: android.app.ForegroundServiceStartNotAllowedException: startForegroundService() not allowed due to mAllowStartForeground false: service  …
        at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
        at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
        at android.os.Parcel.readParcelable(Parcel.java:3364)
        at android.os.Parcel.createExceptionOrNull(Parcel.java:2451)
        at android.os.Parcel.createException(Parcel.java:2440)
        at android.os.Parcel.readException(Parcel.java:2423)
        at android.os.Parcel.readException(Parcel.java:2365)
        at android.app.IActivityManager$Stub$Proxy.startService(IActivityManager.java:6007)
        at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1848)
        at android.app.ContextImpl.startForegroundService(ContextImpl.java:1824)
        at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:781)
         …
         …
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6764)
        at android.app.ActivityThread.access$1600(ActivityThread.java:253) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2090) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loopOnce(Looper.java:209) 
        at android.os.Looper.loop(Looper.java:296) 
        at android.app.ActivityThread.main(ActivityThread.java:7880) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:568) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045) 
     Caused by: android.os.RemoteException: Remote stack trace:
        at com.android.server.am.ActiveServices.startServiceLocked(ActiveServices.java:691)
        at com.android.server.am.ActiveServices.startServiceLocked(ActiveServices.java:616)
        at com.android.server.am.ActivityManagerService.startService(ActivityManagerService.java:12004)
        at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2536)
        at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2554)

```