I am getting a date/time string from web in the format of "yyyy/mm/dd'T'HH:MM:SS'Z'" and it is in UTC. Now i have to identify the current time zone of device and then convert this time to my local time. (FYI, Currently, UTC time is 10:25 AM, in india current time is 3:55 PM)
I want to develop a game, so I need to know elapsed time at lots places in my game. For example, to measuring FPS. I see there is some example use "System.currentTimeMillis" to measure elapsed time. But I see the warning on document: http://developer.android.com/intl/zh-TW/reference/java/lang/System.ht... "This method shouldn't be used for measuring timeouts or other elapsed time measurements, as changing the system time can affect the results." So, if this method should not be used for measuring elapsed time, then what will be suitable?
By any means, programmatically can I get the install date & time of the already installed apps on the android device. The ApplicationInfo doesn't provide this info. While digging through the /data folder through the DDMS perspective, I saw the installed apk's do contains the Date & time of when it was installed, but the sad part is that this /data folder is not accessible on the device programmatically.
Is there any way to determine programmatically the time at which an Android application was installed? I don't see anything in PackageInfo, etc.
--EDIT-- To clarify, App A is installed at Time X. At some later time, Time Y, App B is installed. Is there any way App B can know when App A was installed? The link http://stackoverflow.com/questions/2831333/how-to-get-app-install-time-from-android/2920310#2920310 indicates that reading the modify time on the source dir of the App is sufficient. Is this really correct? Why?
As you know, i can use System.currentTimeMillis() to fetch current local time, but how to convert local time to UTC time? the code below, i can get the timezone, utc_bias also can be got
my problem is i can't determine how to use this utc_bias: added or minus to current local time to get UTC time? You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to email@example.com To unsubscribe from this group, send email to firstname.lastname@example.org For more options,
I'm just trying to find the way to get current time. But I don't want to use currentTimeMillis() method, because the current time on device may be wrong. Is there any way to make some request to the Internet to get right current time?
I need to get pure UTC time in application level. It should not be changed by user or location or anything else. When I try with System.currentTimeMillis() or getTime() of Date class, they always return value of local time. If user change date or time, the return value is also changed. I found handleEndOfInit method in android_modem.c (externalqemu elephony) and the method is like below. Probably, the variable "utc" is what I want.
1. Is the android_modem.c for emulator?? 2. If it is, I think there must be similar file for target. Where is it? 3. How can I get the "utc" value in my application?................
I want to get current time accurately. I tried to get the time by "System.currentTimeMillis()" but it has the effect on the modificaion by User. So it is not useful for me. Could you kindly tell me how to get current time accurately?
In my application I will be writing messages to a text file. When I am writing the messages I also want to include the time in it. How do i write in the current date and time? Must I use Calendar now = Calendar.getInstance()?
I am new to the android programming environment. I am currently working on a project which deals with the user's phone battery level.I am showing the current battery level left on the phone.now i want to display the amount of duration of "idle time, talk time, video playback, audio playback and web surfing" that can be done based on the current battery level. What kind of approach shall i follow.(or) What available API shall i use to get those.
MotoDroid 2.2. Since 2.2, the auto-rotate screen goes haywire from time to time. I normally use the vertical format, easier to type, but when it switches, not much screen left, and I have to go back and back to start over again.
I just got the magic yesterday and so far I'm loving it. Just have a couple questions about texting. When I receive a text it usually tells me the time in eastern time though I'm pacific. However, my sent messages come up with the right time. This makes it so that threaded sms is kind of useless. Everything is all out of whack. Also, every once in a while it just won't even give me a time and there has been once or twice(after fiddling with it for a bit) that it gave me the right time but it just went back to the wrong time right after. Could this be a problem with the phone or is it rogers' fault? I'm assuming it's getting the time from the network and they have it wrong(meaning I can't fix it) but I just wanted to see if anyone else has had this problem.
Also, is there any way to make it vibrate when I receive a text? I feel dumb for asking this as it seems like it should be something really obvious but I can't seem to find it anywhere.
I recently received an LG optimus f3 with android 4.1.2.
After activating the phone, it displayed the correct date and time for my time zone, so I didn't mess around with settings to reset the time, as I would with any other device.
However, I've noticed that the time changes to exactly an hour ahead, before changing itself back several minutes later.
I went to settings > date and time, but 24 hour time and selecting a date format are the only options listed.
I prefer to leave mobile data off when I am at home and can use the wi-fi. Is it necessary to have mobile data turned on, so the phone can receive the time from a cell tower, or is there a way I can set an internal clock?
When i'm connected to my router at home via wifi, the connection randomly drops from time to time. My laptop and TV is fine which are both running via the internet. The setting is set to stay connected always, even when the screen goes black.
Does anyone have a resolution for this? Perhaps static IP? if this is the answer, what should the settings be?