본문 바로가기
Project/<team Not Same> 꿈의 왕국 : 영원한 보금자리

[GPGS 문제해결] Unity 프로젝트 android firebase cmd 오류 : V/FA Inactivity, disconnecting from the service, 만든 event 안들어옴

by 왹져박사 2023. 5. 9.
728x90

05-09 13:19:23.262 V/FA      (21428): Inactivity, disconnecting from the service

라고 나오며 save_cloud, load_cloud 버튼을 눌러도 더 이상 진행되지 않음

 

 

구글링을 한 결과 모두 android studio에서 file에서 chches...를 refresh하면 간단히 해결된다는 글밖에 보지 못하였다. 

팀원과 상의하다가 chatGPT에게 물어보았다. 

 

이를 통해 AndroidManifest.xml파일에 문제가 있다는 것을 알게되었고,

위의 해결방법 이전에 해당 피일이 DISABLED 되어있어 우선 이를 해결해야했다.

 

처음에는 chatGPT에게 물어보았지만 , 

 

 

[문제해결1]

Other Settings탭에 Manifest가 존재하지 않았고,

전에 다른 문제 해결을 위해 Publishing Settings의 Manifest를 사용한 기억이 있어 

Publishing Settings-Build=Custom Main Manifest 항목을 활성화시켰다. 

 

누르면  왼쪽에서 오른쪽과 같이 원래 확장자가 적용된것을 볼 수 있다. 

 

 

인텐트 필터를 포함하되 'android:exported' 속성을 설정하지 않고 활동, 활동 별칭, 서비스 또는 broadcast receiver가 있는 APK 또는 Android App Bundle을 업로드했습니다. Android 12 이상에는 이 파일을 설치할 수 없습니다. 참조: developer.android.com/about/versions/12/behavior-changes-12#exported

 

처음에 알려준 방법과 동일하다. 


```xml
<service android:name="com.unity.androidnotifications.UnityNotificationManager"
         android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
        <action android:name="android.intent.action.USER_PRESENT" />
    </intent-filter>
</service>
```

[문제해결2]

위 항목을 추가하였다. 

 

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    xmlns:tools="http://schemas.android.com/tools">

    <application>

        <activity android:name="com.unity3d.player.UnityPlayerActivity"
            android:theme="@style/UnityThemeSelector">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
        </activity>

    <service android:name="com.unity.androidnotifications.UnityNotificationManager"
             android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
            <action android:name="android.intent.action.USER_PRESENT" />
        </intent-filter>
    </service>


    </application>

</manifest>

이벤트가 잘 들어오는 모습!!!

728x90