I was getting some "Your app has stopped working" after force closing my app. Checking logcat, I noticed that right after killing my game's process, a restart of the "com.playfab.unityplugin.PlayFabUnityAndroidPlugin" process was scheduled by the ActivityManager, which was causing a crash right after. Logcat (edited):
11-17 12:10:45.249 801 5220 I ActivityManager: Process com.mycompany.myapp (pid 26860) has died
11-17 12:10:45.249 801 5220 W ActivityManager: Scheduling restart of crashed service com.mycompany.myapp/com.playfab.unityplugin.PlayFabUnityAndroidPlugin in 5812ms
11-17 12:10:51.129 801 814 I ActivityManager: Start proc 26958:com.mycompany.myapp/u0a432 for service com.mycompany.myapp/com.playfab.unityplugin.PlayFabUnityAndroidPlugin
Then the actual crash:
Caused by: java.lang.RuntimeException: Unable to create service com.playfab.unityplugin.PlayFabUnityAndroidPlugin: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.PackageManager android.content.Context.getPackageManager()' on a null object reference
The crash is expected since we don't have the Google Services anymore (the app was killed), but should the PlayFabAndroidPlugin be restarted when I close my app?