获取Android设备上当前时间 [英] Get current time on Android device
问题描述
我要建立在我的统一的Android应用程序,它可以让用户选择一个时间的东西,然后把它们发送那时如果他们不使用的应用程序后,每半小时的通知和
我有Android原生插件( HTTPS://www.assetstore。 unity3d.com/en/#!/content/10825 )安装在照顾本地通知,但不知道如何在一个特定的时间发送本地通知。我如何获得设备上的当前时间?有没有办法做到这一点在Unity?
System.currentMilleseconds();
将reruen milleseconds自1970年以来...您可以使用
日历C = Calender.getInstance();
c.getItem(Calender.DayInMonth)
...唧唧歪歪
I want to set up something in my Unity Android application that let's the user pick a time and then sends them a notification at that time and every half hour after if they don't use the app.
I have the Android Native plugin (https://www.assetstore.unity3d.com/en/#!/content/10825) installed that takes care of local notifications but don't know how to send local notifications at a specific time. How do I get the current time on the device? Is there a way to do that in Unity?
System.currentMilleseconds();
will reruen milleseconds since 1970... you can use
Calender c = Calender.getInstance();
c.getItem(Calender.DayInMonth)
... BLA BLA BLA
这篇关于获取Android设备上当前时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!