User Tag List

Results 1 to 3 of 3

Thread: How can I retrieve the date/time on Android?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question How can I retrieve the date/time on Android?

    I am making an idle game, and the core mechanic of those games is that you can close them down and then open them up again and the game will have "progressed" depending on how long you have been away (like in games like Adventure Capitalist, Clicker Heroes etc etc). For the windows and iOS runtime I am using the iOS Timestamp object for this. I thought this was also going to work in Android, but apparently it does not.

    How can I retrieve the time on Android?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Isn't the Date & Time object cross-platform?

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Hmm I need a timestamp. The good thing with the iOS timestamp is that what I retereive is a long number so it is very easy to compare it.
    I have no idea how to make the minutes,seconds, hours, date etc into a long number to compare with the date & time object, if that is possible?.

    There is no way to retreive a timestamp like with the iOS timestamp?

    Its apparently called "unix timestamp"
    http://www.epochconverter.com/
    https://en.wikipedia.org/wiki/Unix_time

    Maybe I can retrieve a number with the get object from the internet of the current unix timestamp? If so how? Not sure how reliable that would be though?

Similar Threads

  1. 'Date And Time Object' how to set date?
    By King_Cool in forum Fusion 2.5
    Replies: 2
    Last Post: 6th December 2015, 11:04 AM
  2. Date & Time Object Changes Computer Time
    By StoDaBest in forum Fusion 2.5
    Replies: 5
    Last Post: 6th June 2015, 01:18 AM
  3. Retrieve time
    By qenio in forum Android Export Module 2.5
    Replies: 2
    Last Post: 3rd March 2015, 09:41 AM
  4. [RC7] Date&Time Bug (MFA and APK)
    By Koji_Kabuto in forum Android Export Module Version 2.0
    Replies: 7
    Last Post: 25th April 2013, 01:53 AM
  5. [bug] Date&time object doesn't show date
    By qenio in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 19th March 2012, 09:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •