User Tag List

Results 1 to 6 of 6

Thread: android get current time?

  1. #1
    No Products Registered

    Join Date
    Dec 2016
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    android get current time?

    How do I get the current time of the phone?
    Want to use it within an event but how would I get it? Thanks

  2. #2
    No Products Registered

    Join Date
    Dec 2016
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want to take the current time, and add a value, so the value could be 25 hours could be 2 hours etc.
    How can I get the time and add the value so it calculates the time + the value
    So if its 5.00pm and I add 20 it will display the time as 1pm

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    You can use the Date & Time object to get the current time of the device(in hours for example).

    I'm not sure what you want exactly.
    You need the value to control the time of the phone or do you just want to synchronize your own clock in the game with the device time?
    Can you explain in a bit more detail what event you're trying to create here?

  4. #4
    No Products Registered

    Join Date
    Dec 2016
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want a timer in the game to sync with the phone time, then be able to add to it.
    So the user can add time on and the time will add to the timer.
    So if its 8.20 am and the users clicks add 2 hours it will display 10.20
    also the ability to show the day would also be good so displays monday, then if the clock passes 24.00 it will display the next day

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    This means you only need the phone time to sync hours/minutes/also seconds? + day with your game clock? And after syncing you don't need to check phone time again(except you wanna sync again) and your game clock is just running and you also need the ability to change the game time independently? Do you want this for a clock(with graphics) in your game? Can you explain how you display the time in your game actually?
    I would make an example for you then.

  6. #6
    No Products Registered

    Join Date
    Dec 2016
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes i only need to current time once, then add a value to it.
    i have been using counters to display the time in the game
    not sure if this is the best thing to use
    it only needs to use the current time as a base figure to start with then add to the time and calculate the time + the day of the week

Similar Threads

  1. How can I retrieve the date/time on Android?
    By Outcast in forum Android Export Module 2.5
    Replies: 2
    Last Post: 11th May 2016, 12:51 PM
  2. Android Export Error - Build Fails Every Time Between 4-5 sec
    By henryhissagames in forum Android Export Module 2.5
    Replies: 4
    Last Post: 29th December 2015, 06:27 PM
  3. Productivity App: Time Calculator for iOS / Android
    By Christian_Wheel in forum WIP & Released Games & Apps
    Replies: 1
    Last Post: 3rd September 2015, 12:15 PM
  4. Correct current settings for Android export?
    By animdude in forum Android Export Module 2.5
    Replies: 3
    Last Post: 8th March 2015, 01:40 AM
  5. Android Ads slowing down my game BIG TIME
    By mobo in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 12th February 2014, 01:04 PM

Tags for this Thread

Posting Permissions

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