I upgraded to the latest version of SfRotator and also using XF 2.3.3193 version with FormsAppCompatActivity. Below is how I implemente my rotator
SfRotator rotator = new SfRotator()
{
NavigationStripMode = NavigationStripMode.Dots,
NavigationDelay = 2000,
NavigationDirection = NavigationDirection.Horizontal,
NavigationStripPosition = NavigationStripPosition.Bottom,
EnableAutoPlay = true,
EnableLooping = true,
EnableSwiping = true,
Margin = new Thickness(30, 10),
VerticalOptions = LayoutOptions.Start,
HorizontalOptions = LayoutOptions.Center,
HeightRequest = Device.Idiom == TargetIdiom.Phone ? 300 : 500,
WidthRequest = Device.Idiom == TargetIdiom.Phone ? 300 : 500
};
If I click soft/hard back button and navigate to page before, I am getting exception below. It looks like something to do with the SfRotator.get_SelectedIndex and Rotator.SfRotator+ISelectionChangedListenerImplementor.SelectionChanged , I tried to handle SelectionChanged event in my code behind but it didnt help.
I tried this enabling and disabling linker as I use linker. I also use Proguard included in my application
02-26 02:42:00.090 I/MonoDroid(22004): UNHANDLED EXCEPTION:
02-26 02:42:00.106 I/MonoDroid(22004): System.ArgumentException: Handle must be valid.
02-26 02:42:00.106 I/MonoDroid(22004): Parameter name: instance
02-26 02:42:00.106 I/MonoDroid(22004): at Java.Interop.JniEnvironment+InstanceMethods.CallIntMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00017] in /Users/builder/data/lanes/4009/9578cdcd/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11452
02-26 02:42:00.106 I/MonoDroid(22004): at Android.Runtime.JNIEnv.CallIntMethod (System.IntPtr jobject, System.IntPtr jmethod) [0x00000] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/JNIEnv.g.cs:186
02-26 02:42:00.106 I/MonoDroid(22004): at Com.Syncfusion.Rotator.SfRotator.get_SelectedIndex () [0x00043] in <18c74aaa7c904130be9a742a5f9f7879>:0
02-26 02:42:00.106 I/MonoDroid(22004): at Syncfusion.SfRotator.XForms.Droid.SfRotatorRenderer.SelectionChangedEvent (System.Object sender, Com.Syncfusion.Rotator.SfRotator+SelectionChangedEventArgs e) [0x00000] in <30178b71eba84f91bda8d2d9fe95b67e>:0
02-26 02:42:00.106 I/MonoDroid(22004): at Com.Syncfusion.Rotator.SfRotator+ISelectionChangedListenerImplementor.SelectionChanged (Java.Lang.Object p0, Java.Lang.Object p1) [0x00018] in <18c74aaa7c904130be9a742a5f9f7879>:0
02-26 02:42:00.106 I/MonoDroid(22004): at Com.Syncfusion.Rotator.SfRotator+ISelectionChangedListenerInvoker.n_SelectionChanged_Ljava_lang_Object_Ljava_lang_Object_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_p0, System.IntPtr native_p1) [0x00017] in <18c74aaa7c904130be9a742a5f9f7879>:0
02-26 02:42:00.106 I/MonoDroid(22004): at (wrapper dynamic-method) System.Object:d097901e-003d-481c-b3a8-ded719dcf805 (intptr,intptr,intptr,intptr)
02-26 02:42:00.153 W/Xamarin.Insights(22004): Warning: Unhandled exception: System.ArgumentException: Handle must be valid.
02-26 02:42:00.153 W/Xamarin.Insights(22004): Parameter name: instance
02-26 02:42:00.153 W/Xamarin.Insights(22004): at Java.Interop.JniEnvironment+InstanceMethods.CallIntMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00017] in /Users/builder/data/lanes/4009/9578cdcd/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11452
02-26 02:42:00.153 W/Xamarin.Insights(22004): at Android.Runtime.JNIEnv.CallIntMethod (System.IntPtr jobject, System.IntPtr jmethod) [0x00000] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/JNIEnv.g.cs:186
02-26 02:42:00.153 W/Xamarin.Insights(22004): at Com.Syncfusion.Rotator.SfRotator.get_SelectedIndex () [0x00043] in <18c74aaa7c904130be9a742a5f9f7879>:0
02-26 02:42:00.153 W/Xamarin.Insights(22004): at Syncfusion.SfRotator.XForms.Droid.SfRotatorRenderer.SelectionChangedEvent (System.Object sender, Com.Syncfusion.Rotator.SfRotator+SelectionChangedEventArgs e) [0x00000] in <30178b71eba84f91bda8d2d9fe95b67e>:0
02-26 02:42:00.153 W/Xamarin.Insights(22004): at Com.Syncfusion.Rotator.SfRotator+ISelectionChangedListenerImplementor.SelectionChanged (Java.Lang.Object p0, Java.Lang.Object p1) [0x00018] in <18c74aaa7c904130be9a742a5f9f7879>:0
02-26 02:42:00.153 W/Xamarin.Insights(22004): at Com.Syncfusion.Rotator.SfRotator+ISelectionChangedListenerInvoker.n_SelectionChanged_Ljava_lang_Object_Ljava_lang_Object_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_p0, System.IntPtr native_p1) [0x00017] in <18c74aaa7c904130be9a742a5f9f7879>:0
02-26 02:42:00.153 W/Xamarin.Insights(22004): at (wrapper dynamic-method) System.Object:d097901e-003d-481c-b3a8-ded719dcf805 (intptr,intptr,intptr,intptr)
02-26 02:42:00.300 W/rkout.myworkout(22004): type=1400 audit(0.0:1105267): avc: denied { read } for name="mem" dev="debugfs" ino=41248514 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0 ppid=441 pcomm="main" tgid=441 tgcomm="main"
02-26 02:42:00.349 D/Mono (22004): DllImport searching in: '__Internal' ('(null)').
02-26 02:42:00.300 W/rkout.myworkout(22004): type=1400 audit(0.0:1105268): avc: denied { read } for name="mem" dev="debugfs" ino=41248514 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0 ppid=441 pcomm="main" tgid=441 tgcomm="main"
02-26 02:42:00.349 D/Mono (22004): Searching for 'java_interop_jnienv_get_long_field'.
02-26 02:42:00.349 D/Mono (22004): Probing 'java_interop_jnienv_get_long_field'.
02-26 02:42:00.349 D/Mono (22004): Found as 'java_interop_jnienv_get_long_field'.
02-26 02:42:00.425 D/Mono (22004): DllImport searching in: '__Internal' ('(null)').
02-26 02:42:00.425 D/Mono (22004): Searching for 'java_interop_jnienv_call_long_method_a'.
02-26 02:42:00.425 D/Mono (22004): Probing 'java_interop_jnienv_call_long_method_a'.
02-26 02:42:00.426 D/Mono (22004): Found as 'java_interop_jnienv_call_long_method_a'.
02-26 02:42:00.480 D/Mono (22004): Assembly Ref addref HockeySDK.AndroidBindings[0xaa577ac0] -> System[0x976780c0]: 25
02-26 02:42:00.493 W/art (22004): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable