Setting the system time from GPS?

by Hadmut » Tue, 08 Mar 2011 05:57:39 GMT


Sponsored Links
 Hi,

I have a Motorola Milestone  (european version of the Droid). The
internal clock of my device is terribly unprecise, need to adjust it
every now and then.

Ironically, the device has a builtin GPS receiver, and thus always the
precise time. Why doesn't android use the GPS signal to adjust it's
internal clock?


(I have a rather old-fashioned navigation system in my car, that can't
compete with android, but continuosly sets the clock of my car to the
GPS time, so my car always has the accurate time.)


regards

-- 
.



Re: Setting the system time from GPS?

by Craig Mitchell » Tue, 08 Mar 2011 06:51:19 GMT


 You should always have the accurate time based on the mobile network
provider.

Settings -> Date & Time -> Select "Automatic".

This takes into account daylight savings and things like that.





-- 
.


Sponsored Links


Re: Setting the system time from GPS?

by liuyu » Tue, 08 Mar 2011 09:27:50 GMT


 Hi, Hadmut,

GPS consumes a lot battery power and only works at outdoor.
Regular user would not always keep GPS on to sync the time.
I think this is why android uses the mobile network instead of GPS to
sync the time.
Besides, if you can't get accurate time from your mobile network,
you'd better check whether your network providers time synchronization
first.




-- 
.



Re: Re: Setting the system time from GPS?

by Disconnect » Tue, 08 Mar 2011 22:57:06 GMT


 FWIW (at least a couple years ago) cell time is remarkably broken on
tmobile, periodically being as much as 15 mins off or sending down the wrong
time zone entirely.

I believe the android 'network' time sync actually uses ntp, so it is almost
as accurate as taking the gps clocks (and a lot easier on battery.)






-- 
.



Other Threads

1. android.net.NetworkConnectivityListener$ConnectivityBroadcastReceiver @4337ce70

Hi,
     Anyone konws the ConnectivityBroadcastReceiver class? There is
nothing clues in new SDK documents.When I ran my app,there is an
error  in background
 "09-05 09:53:58.889: ERROR/ActivityThread(188):
android.app.IntentReceiverLeaked: Activity com.xxx.xxx.aa.MainActivity
has leaked IntentReceiver android.net.NetworkConnectivityListener
[EMAIL PROTECTED] that was originally registered
here. Are you missing a call to unregisterReceiver()?"
and my app still  work well. So what's the meaning of
"IntentReceiverLeaked"?How could I avoid it?Thank you very much.

--~--~---------~--~----~------------~-------~--~----~

2. When dexing the classes to apk format file, it is said out of memory error

Hi, experts
       I ever wrote a project using android, the whole package
includes about 500 java files. With last android version, I ran it
successfully and got the right result.
       Now, I change to use the latest version: android-sdk-
windows-0.9_beta.zip. I don't make any changes in the build file, I
get a OOME(out of memory error) like the following:

       dex:
     [echo] Converting compiled files and external libraries into bin/
classes.dex...
    [apply]
    [apply] UNEXPECTED TOP-LEVEL ERROR:
    [apply] java.lang.OutOfMemoryError: Java heap space
    [apply]     at java.io.DataInputStream.<init>(DataInputStream.java:
42)
    [apply]     at com.android.dx.util.ByteArray
$MyDataInputStream.<init>(ByteArray.java:365)
    [apply]     at
com.android.dx.util.ByteArray.makeDataInputStream(ByteArray.java:260)
    [apply]     at
com.android.dx.cf.direct.StdAttributeFactory.parseLocalVariables(StdAttributeFactory.java:
567)
    [apply]     at
com.android.dx.cf.direct.StdAttributeFactory.localVariableTable(StdAttributeFactory.java:
519)
    [apply]     at
com.android.dx.cf.direct.StdAttributeFactory.parse0(StdAttributeFactory.java:
180)
    [apply]     at
com.android.dx.cf.direct.AttributeFactory.parse(AttributeFactory.java:
96)
    [apply]     at
com.android.dx.cf.direct.AttributeListParser.parse(AttributeListParser.java:
141)
    [apply]     at
com.android.dx.cf.direct.AttributeListParser.parseIfNecessary(AttributeListParser.java:
115)
    [apply]     at
com.android.dx.cf.direct.AttributeListParser.getList(AttributeListParser.java:
106)
    [apply]     at
com.android.dx.cf.direct.StdAttributeFactory.code(StdAttributeFactory.java:
302)
    [apply]     at
com.android.dx.cf.direct.StdAttributeFactory.parse0(StdAttributeFactory.java:
141)
    [apply]     at
com.android.dx.cf.direct.AttributeFactory.parse(AttributeFactory.java:
96)
    [apply]     at
com.android.dx.cf.direct.AttributeListParser.parse(AttributeListParser.java:
141)
    [apply]     at
com.android.dx.cf.direct.AttributeListParser.parseIfNecessary(AttributeListParser.java:
115)
    [apply]     at
com.android.dx.cf.direct.AttributeListParser.getEndOffset(AttributeListParser.java:
96)
    [apply]     at
com.android.dx.cf.direct.MemberListParser.parse(MemberListParser.java:
213)
    [apply]     at
com.android.dx.cf.direct.MemberListParser.parseIfNecessary(MemberListParser.java:
108)
    [apply]     at
com.android.dx.cf.direct.MethodListParser.getList(MethodListParser.java:
54)
    [apply]     at
com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:
529)
    [apply]     at
com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:
393)
    [apply]     at
com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:
375)
    [apply]     at
com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:
238)
    [apply]     at
com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:109)
    [apply]     at
com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:85)
    [apply]     at
com.android.dx.command.dexer.Main.processClass(Main.java:297)
    [apply]     at
com.android.dx.command.dexer.Main.processFileBytes(Main.java:276)
    [apply]     at com.android.dx.command.dexer.Main.access$100(Main.java:
56)
    [apply]     at com.android.dx.command.dexer.Main
$1.processFileBytes(Main.java:228)
    [apply]     at
com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:
134)
    [apply]     at
com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:
190)
    [apply]     at
com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:
122)

    Do I need to make the heap space larger? If so, how can I make it
larger? Thanks!

Regards!
Tao

--~--~---------~--~----~------------~-------~--~----~

3. adding Scroll bar

4. Replacement for MapView's OnLongPressListener

5. Can't call startActivity() - real easy, please help

6. ACTION_PICK_ACTIVITY: anyone have this working?

7. Problem with running emulator - my program won't show up