android - Application after leaving background state starts from root activity without calling OnResume method when used memory on device more than 75% -
i working mvvmcross on xamarin android technology. created project main actvity inherited mvxcachingfragmentcompatactivity done on https://github.com/mvvmcross/mvvmcross-samples/tree/master/xplatformmenus/xplatformmenus.droid demo. have bug in mvxactivity, call homeviewmodel using intent go application permissions :
intent intent1 = new intent(); intent1.setaction(android.provider.settings.actionapplicationdetailssettings); packageinfo info = activity.packagemanager.getpackageinfo(activity.packagename, 0); android.net.uri uri = android.net.uri.fromparts("package", info.packagename, null); intent1.setdata(uri); activity.startactivity(intent1);
but have bug when applications opened on acer iconia 1 10 (more 75% of memory used) , new intent started, when click back, restored mvxcachingfragmentcompatactivity, not calling on homefragment onresume method.
could please give me advice or idea how can fix or @ least how can understand happening in program in time when application returning background. read https://developer.xamarin.com/guides/android/application_fundamentals/activity_lifecycle/ , know in moment activity supposed restored background, cannot debug because debuging mode stopped on acer iconia 1 10 device.
thank in advance. please let me know if need precise or give more code examples.
i figured out, problem in 1 static variable didn't reinitialize after activity recreation. when saved status on onsaveinstancestate method , restore on onrestoreinstancestate(bundle savedinstancestate) works perfectly!
Comments
Post a Comment