The date picker always returns Year 0, Month 0, Day 0.
Please notice how the logging actually shows the correct date, yet the values in Unity are incorrect!
2020/07/15 14:43:30.991 26063 26079 Debug AndroidNative Unity: [Async] Sent to Unity ->: {"m_day":4,"m_month":5,"m_year":2019}
using SA.Android.App;
using UnityEngine;
public class DatePicker : MonoBehaviour
{
protected void Awake()
{
var date = DateTime.Now;
int year = date.Year;
int month = date.Month - 1; //Compatibility with Android Calendar..
int day = date.Day;
AN_DatePickerDialog picker = new AN_DatePickerDialog(year, month, day);
picker.Show((result) => {
if(result.IsSucceeded) {
Debug.Log("date picked result.Year: " + result.Year);
//Same Android Calendar Compatibility
Debug.Log("date picked result.Month: " + result.Month + 1);
Debug.Log("date picked result.Day: " + result.Day);
} else {
Debug.Log("Failed to pick a date: " + result.Error.FullMessage);
}
});
}
}
0001/01/01 00:00:00.000 -1 -1 Info --------- beginning of main
2020/07/15 14:42:20.979 26063 26063 Error Zygote isWhitelistProcess - Process is Whitelisted
0001/01/01 00:00:00.000 -1 -1 Info --------- beginning of system
2020/07/15 14:42:20.979 26063 26063 Error libpersona scanKnoxPersonas
2020/07/15 14:42:20.980 26063 26063 Error libpersona Couldn't open the File - /data/system/users/0/personalist.xml - No such file or directory
2020/07/15 14:42:20.982 26063 26063 Warn SELinux SELinux selinux_android_compute_policy_index : Policy Index[2], Con:u:r:zygote:s0 RAM:SEPF_SM-G930F_8.0.0_0018, [-1 -1 -1 -1 0 1]
2020/07/15 14:42:20.983 26063 26063 Info SELinux SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=com.DefaultCompany.StansAssetsTest
2020/07/15 14:42:21.005 26063 26063 Debug ActivityThread Added TimaKeyStore provider
2020/07/15 14:42:21.074 26063 26063 Info zygote no shared libraies, dex_files: 1
2020/07/15 14:42:21.308 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] setView = DecorView@10204ea[UnityPlayerActivity] TM=true MM=false
2020/07/15 14:42:21.323 26063 26063 Verbose InputMethodManager Not IME target window, ignoring
2020/07/15 14:42:21.323 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] dispatchAttachedToWindow
2020/07/15 14:42:21.334 26063 26063 Verbose Surface sf_framedrop debug : 0x4f4c, game : false, logging : 0
2020/07/15 14:42:21.335 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 3274201088} changed=true
2020/07/15 14:42:21.338 26063 26063 Debug SurfaceView BG show() Surface(name=Background for - SurfaceView - com.DefaultCompany.StansAssetsTest/com.unity3d.player.UnityPlayerActivity@f4f7951@0) android.view.SurfaceView{f4f7951 VFE...... .F....ID 0,0-1080,1920 #7f0700a1 app:id/unitySurfaceView}
2020/07/15 14:42:21.340 26063 26063 Verbose Surface sf_framedrop debug : 0x4f4c, game : false, logging : 0
2020/07/15 14:42:21.340 26063 26063 Debug SurfaceView surfaceCreated 1 android.view.SurfaceView{f4f7951 VFE...... .F....ID 0,0-1080,1920 #7f0700a1 app:id/unitySurfaceView}
2020/07/15 14:42:21.340 26063 26063 Debug SurfaceView surfaceChanged (1080,1920) 1 android.view.SurfaceView{f4f7951 VFE...... .F....ID 0,0-1080,1920 #7f0700a1 app:id/unitySurfaceView}
2020/07/15 14:42:21.343 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
2020/07/15 14:42:21.343 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] MSG_WINDOW_FOCUS_CHANGED 1
2020/07/15 14:42:21.344 26063 26063 Verbose InputMethodManager Starting input: tba=android.view.inputmethod.EditorInfo@17385b6 nm : com.DefaultCompany.StansAssetsTest ic=null
2020/07/15 14:42:21.344 26063 26063 Info InputMethodManager startInputInner - mService.startInputOrWindowGainedFocus
2020/07/15 14:42:21.350 26063 26063 Verbose InputMethodManager Starting input: tba=android.view.inputmethod.EditorInfo@1b192b7 nm : com.DefaultCompany.StansAssetsTest ic=null
2020/07/15 14:42:21.368 26063 26063 Verbose Surface sf_framedrop debug : 0x4f4c, game : false, logging : 0
2020/07/15 14:42:21.368 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x7 surface={valid=true 3274278912} changed=true
2020/07/15 14:42:22.090 26063 26079 Info Unity SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 3537mb
2020/07/15 14:42:22.091 26063 26079 Info Unity SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)
2020/07/15 14:42:22.092 26063 26079 Info Unity ApplicationInfo com.DefaultCompany.StansAssetsTest version 0.1 build c5c15999-81c7-436d-b216-998564a1bb04
2020/07/15 14:42:22.092 26063 26079 Info Unity Built from '2019.4/staging' branch, Version '2019.4.2f1 (20b4642a3455)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a', Stripping 'Disabled'
2020/07/15 14:42:22.105 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3274278912} changed=false
2020/07/15 14:42:22.124 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3274278912} changed=false
2020/07/15 14:42:22.286 26063 26079 Error vulkan invalid vkGetInstanceProcAddr(VK_NULL_HANDLE, "vkEnumerateInstanceVersion") call
2020/07/15 14:42:22.291 26063 26079 Info vndksupport sphal namespace is not configured for this process. Loading /vendor/lib/hw/vulkan.exynos5.so from the current namespace instead.
2020/07/15 14:42:22.304 26063 26079 Debug vulkan searching for layers in '/data/app/com.DefaultCompany.StansAssetsTest-X0jfRMelJzT4DMDri_1cLw==/lib/arm'
2020/07/15 14:42:22.306 26063 26079 Debug vulkan searching for layers in '/data/app/com.DefaultCompany.StansAssetsTest-X0jfRMelJzT4DMDri_1cLw==/base.apk!/lib/armeabi-v7a'
2020/07/15 14:42:22.306 26063 26079 Debug vulkan vulkan api version_1_0 1.0.0
2020/07/15 14:42:22.306 26063 26079 Debug vulkan vulkan header version 46
2020/07/15 14:42:22.375 26063 26079 Debug vulkan vulkan api version_1_0 1.0.0
2020/07/15 14:42:22.375 26063 26079 Debug vulkan vulkan header version 46
2020/07/15 14:42:22.590 26063 26079 Info zygote android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2020/07/15 14:42:22.590 26063 26079 Info zygote android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2020/07/15 14:42:22.690 26063 26124 Debug AudioTrack Client defaulted notificationFrames to 1365 for frameCount 4096
2020/07/15 14:42:22.699 26063 26124 Warn AudioTrack Use of stream types is deprecated for operations other than volume control
2020/07/15 14:42:22.699 26063 26124 Warn AudioTrack See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case
2020/07/15 14:42:22.700 26063 26124 Info AudioTrack updateAudioTranstionLength FadeIn[0] FadeOut[0] FadeInRing[0]
2020/07/15 14:42:23.225 26063 26079 Info zygote android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2020/07/15 14:42:23.226 26063 26079 Info zygote android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2020/07/15 14:42:23.255 26063 26079 Verbose MediaRouter Adding route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
2020/07/15 14:42:23.263 26063 26079 Verbose MediaRouter Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
2020/07/15 14:42:25.676 26063 26079 Error AndroidNative Log Level is set
2020/07/15 14:42:25.692 26063 26079 Debug AndroidNative Unity: Sent to Java -> AN_UnityBridge.RegisterMessageHandler
2020/07/15 14:42:25.692 26063 26079 Debug AndroidNative Handler registered
2020/07/15 14:42:25.705 26063 26079 Debug AndroidNative StrictMode set
2020/07/15 14:42:25.711 26063 26079 Debug AndroidNative Unity: Sent to Java -> AN_DatePickerDialog.Show :: {"m_year":2020,"m_month":6,"m_day":15}
2020/07/15 14:42:25.859 26063 26079 Debug ScrollView initGoToTop
2020/07/15 14:42:25.962 26063 26079 Info chatty uid=10036(u0_a36) UnityMain identical 1 line
2020/07/15 14:42:25.964 26063 26079 Debug ScrollView initGoToTop
2020/07/15 14:42:25.989 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] setView = DecorView@6e5774f[] TM=true MM=false
2020/07/15 14:42:26.050 26063 26079 Debug AndroidNative Preferred storage set to External
2020/07/15 14:42:26.068 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] dispatchAttachedToWindow
2020/07/15 14:42:26.102 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3274278912} changed=false
2020/07/15 14:42:26.142 26063 26079 Verbose Surface sf_framedrop debug : 0x4f4c, game : false, logging : 0
2020/07/15 14:42:26.142 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] Relayout returned: old=[0,0][0,0] new=[60,181][1020,1738] result=0x27 surface={valid=true 3094573056} changed=true
2020/07/15 14:42:26.145 26063 26079 Debug ScrollView onsize change changed
2020/07/15 14:42:26.145 26063 26079 Debug ScrollView onsize change changed
2020/07/15 14:42:26.148 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] MSG_WINDOW_FOCUS_CHANGED 1
2020/07/15 14:42:26.157 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3274278912} changed=false
2020/07/15 14:42:26.275 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] MSG_RESIZED_REPORT: frame=Rect(60, 181 - 1020, 1738) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
2020/07/15 14:42:26.302 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] MSG_WINDOW_FOCUS_CHANGED 0
2020/07/15 14:42:26.449 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3274278912} changed=false
2020/07/15 14:43:25.779 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:25.829 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:26.518 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:26.560 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:26.591 26063 26079 Verbose InputMethodManager Not IME target window, ignoring
2020/07/15 14:43:26.600 26063 26079 Debug AbsListView in onLayout changed
2020/07/15 14:43:27.655 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:27.707 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:27.707 26063 26079 Debug AbsListView onTouchUp() mTouchMode : 0
2020/07/15 14:43:29.078 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:29.162 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:29.714 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:29.760 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:30.718 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:30.785 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:30.857 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] dispatchDetachedFromWindow
2020/07/15 14:43:30.860 26063 26079 Debug InputEventReceiver channel 'a77f307 com.DefaultCompany.StansAssetsTest/com.unity3d.player.UnityPlayerActivity (client)' ~ Disposing input event receiver.
2020/07/15 14:43:30.860 26063 26079 Debug InputEventReceiver channel 'a77f307 com.DefaultCompany.StansAssetsTest/com.unity3d.player.UnityPlayerActivity (client)' ~NativeInputEventReceiver.
2020/07/15 14:43:30.894 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] MSG_WINDOW_FOCUS_CHANGED 1
2020/07/15 14:43:30.991 26063 26079 Debug AndroidNative Unity: [Async] Sent to Unity ->: {"m_day":4,"m_month":5,"m_year":2019}
2020/07/15 14:43:31.035 26063 26079 Info Unity date picked result.Year: 0
2020/07/15 14:43:31.035 26063 26079 Info Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
2020/07/15 14:43:31.035 26063 26079 Info Unity
2020/07/15 14:43:31.044 26063 26079 Info Unity date picked result.Month: 01
2020/07/15 14:43:31.044 26063 26079 Info Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
2020/07/15 14:43:31.044 26063 26079 Info Unity
2020/07/15 14:43:31.044 26063 26079 Info Unity date picked result.Day: 0
2020/07/15 14:43:31.044 26063 26079 Info Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
2020/07/15 14:43:31.044 26063 26079 Info Unity
2020/07/15 14:43:31.050 26063 26079 Error ViewRootImpl sendUserActionEvent() returned.