My app crashes on android 6.0. i know it's caused by dangerous permission these is needed by ads network. I have already requested and agreed these permission, Write_external_storage, read_phone_state, needed in my app, but it still crashes. what wrong?. i use unity 5.3.5f1.
Logcat of genymotion:
11-25 04:22:47.034 I/art (21550): Rejecting re-init on previously-failed class java.lang.Class
11-25 04:22:47.034 I/art (21550): Rejecting re-init on previously-failed class java.lang.Class
11-25 04:22:47.036 W/Ads (21550): There was a problem getting an ad response. ErrorCode: 2
11-25 04:22:47.142 W/ActivityManager(20685): Activity pause timeout for ActivityRecord{bed9d6c u0 com.candyjuice/com.unity3d.player.UnityPlayerActivity t4 f}
11-25 04:22:47.210 W/EGL_emulation(21094): eglSurfaceAttrib not implemented
11-25 04:22:47.210 W/OpenGLRenderer(21094): Failed to set EGL_SWAP_BEHAVIOR on surface 0xdecd1d80, error=EGL_SUCCESS
11-25 04:22:47.228 W/Ads (21550): There was a problem getting an ad response. ErrorCode: 2
11-25 04:22:47.290 I/GlobalDismissManager(21481): no sender configured
11-25 04:22:47.291 D/AlertService(21481): Beginning updateAlertNotification
11-25 04:22:47.294 D/AlertService(21481): No fired or scheduled alerts
11-25 04:22:47.296 D/AlertService(21481): Scheduling next alarm with AlarmScheduler. sEventReminderReceived: null
11-25 04:22:47.299 D/AlarmScheduler(21481): No events found starting within 1 week.
11-25 04:22:48.756 W/GooglePlayServicesUtil(21550): Google Play Store is missing.
11-25 04:22:48.756 W/VungleNetwork(21550): java.net.UnknownHostException: Unable to resolve host "api.vungle.com": No address associated with hostname
11-25 04:22:48.763 W/VungleNetwork(21550): java.net.UnknownHostException: Unable to resolve host "api.vungle.com": No address associated with hostname
11-25 04:22:48.820 I/OneSignal(21550): GetUnsentActiveTime: 0
11-25 04:22:48.820 I/OneSignal(21550): SaveUnsentActiveTime: 2
11-25 04:22:48.851 W/AudioTrack(20685): AUDIO_OUTPUT_FLAG_FAST denied by client; transfer 4, track 48000 Hz, output 44100 Hz
11-25 04:22:48.867 I/Process (21550): Sending signal. PID: 21550 SIG: 9
11-25 04:22:48.890 E/Surface (20685): getSlotFromBufferLocked: unknown buffer: 0xf2cb6600
11-25 04:22:48.893 D/OpenGLRenderer(20685): endAllStagingAnimators on 0xd9931b00 (RippleDrawable) with handle 0xdcc0be00
11-25 04:22:48.896 E/JavaBinder(20685): !!! FAILED BINDER TRANSACTION !!! (parcel size = 104)
11-25 04:22:48.896 W/InputMethodManagerService(20685): Got RemoteException sending setActive(false) notification to pid 21550 uid 10060
11-25 04:22:48.896 E/JavaBinder(20685): !!! FAILED BINDER TRANSACTION !!! (parcel size = 104)
11-25 04:22:48.899 D/GraphicsStats(20685): Buffer count: 3
11-25 04:22:48.899 I/WindowState(20685): WIN DEATH: Window{d9b3a6e u0 com.candyjuice/com.unity3d.player.UnityPlayerActivity}
11-25 04:22:48.899 W/WindowManager(20685): Force-removing child win Window{3bca2c7 u0 SurfaceView} from container Window{d9b3a6e u0 com.candyjuice/com.unity3d.player.UnityPlayerActivity}
11-25 04:22:48.899 W/MediaFocusControl(20685): AudioFocus audio focus client died
11-25 04:22:48.899 I/MediaFocusControl(20685): AudioFocus removeFocusStackEntry(): removing entry for android.os.BinderProxy@dd420f4
11-25 04:22:48.902 W/WindowManager(20685): Failed looking up window
11-25 04:22:48.902 W/WindowManager(20685): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@f7e5388 does not exist
11-25 04:22:48.902 W/WindowManager(20685): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8733)
11-25 04:22:48.902 W/WindowManager(20685): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8724)
11-25 04:22:48.902 W/WindowManager(20685): at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1209)
11-25 04:22:48.902 W/WindowManager(20685): at android.os.BinderProxy.sendDeathNotice(Binder.java:558)
11-25 04:22:48.902 I/WindowState(20685): WIN DEATH: null
11-25 04:22:48.904 I/ActivityManager(20685): Process com.candyjuice (pid 21550) has died
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)
{
Log.i("NoodlePermissionGranter", "onRequestPermissionsResult");
if (requestCode != PERMISSIONS_REQUEST_CODE)
return;
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// permission was granted, yay! Do the
// contacts-related task you need to do.
Log.i("NoodlePermissionGranter", PERMISSION_GRANTED);
UnityPlayer.UnitySendMessage(UNITY_CALLBACK_GAMEOBJECT_NAME, UNITY_CALLBACK_METHOD_NAME, PERMISSION_GRANTED);
} else {
// permission denied, boo! Disable the
// functionality that depends on this permission.
Log.i("NoodlePermissionGranter",PERMISSION_DENIED);
UnityPlayer.UnitySendMessage(UNITY_CALLBACK_GAMEOBJECT_NAME, UNITY_CALLBACK_METHOD_NAME, PERMISSION_DENIED);
}
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.remove(this);
fragmentTransaction.commit();
//SDD
// shouldBeOkayToStartTheApplicationNow();
}
};