How can I get the seconds since 1.1.1970 as a long in Android?

by Streets Of Boston » Fri, 26 Feb 2010 04:00:55 GMT


Sponsored Links
 System.currentTimeMillis() gets you the number of milliseconds sinc
1/1/1970 00:00:00.000 UTC.




--



How can I get the seconds since 1.1.1970 as a long in Android?

by Martin » Fri, 26 Feb 2010 04:12:11 GMT


 Woow, thank you :-)
Greetings, Martin





--


Sponsored Links


Other Threads

1. Adding software to the phone OS?

I developed on a WebOS phone for a while.  The command line seemed to have more
of the usual Unix commands available then Android.  I was able to use a command
sort of like apt-get to suck down most of what I could imagine.  I put a 
webserver
on that phone with PHP.  I could SSH into it over the network.  How are the
resources for Android?  Specifically, I'd rather like to put the sqlite client
on my phone so that I can browse my databases without copying them off of the 
phone.

Thanks,

Tobiah

--

2. Bottle neck in a Maps project

My project is totally error free but still the application is crashing
as soon as it is launching....please help me out...
here is the logcat log of my application run
name of application: hellogooglemap

I/ActivityManager(   38): Starting activity: Intent
{ act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000
cmp=com.android.hello
googlemap/.hellogooglemap bnds=[83,238][157,317] }
I/ActivityManager(   38): Start proc com.android.hellogooglemap for
activity com
.android.hellogooglemap/.hellogooglemap: pid=5486 uid=10026
gids={3003, 1015}
D/ddm-heap( 5486): Got feature list request
E/ActivityThread( 5486): Failed to find provider info for
com.google.settings
E/ActivityThread( 5486): Failed to find provider info for
com.google.settings
E/ActivityThread( 5486): Failed to find provider info for
com.google.settings
D/AndroidRuntime( 5486): Shutting down VM
W/dalvikvm( 5486): threadid=3: thread exiting with uncaught exception
(group=0x4
001b188)
E/AndroidRuntime( 5486): Uncaught handler: thread main exiting due to
uncaught e
xception
E/AndroidRuntime( 5486): java.lang.RuntimeException: Unable to start
activity Co
mponentInfo{com.android.hellogooglemap/
com.android.hellogooglemap.hellogooglemap
}: java.lang.NullPointerException
E/AndroidRuntime( 5486):        at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2496)
E/AndroidRuntime( 5486):        at
android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2512)
E/AndroidRuntime( 5486):        at android.app.ActivityThread.access
$2200(Activi
tyThread.java:119)
E/AndroidRuntime( 5486):        at android.app.ActivityThread
$H.handleMessage(Ac
tivityThread.java:1863)
E/AndroidRuntime( 5486):        at
android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 5486):        at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime( 5486):        at
android.app.ActivityThread.main(ActivityThrea
d.java:4363)
E/AndroidRuntime( 5486):        at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 5486):        at
java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 5486):        at com.android.internal.os.ZygoteInit
$MethodAndA
rgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 5486):        at
com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime( 5486):        at
dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 5486): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 5486):        at
com.android.hellogooglemap.hellogooglemap.onC
reate(hellogooglemap.java:39)
E/AndroidRuntime( 5486):        at
android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime( 5486):        at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2459)
E/AndroidRuntime( 5486):        ... 11 more
I/Process (   38): Sending signal. PID: 5486 SIG: 3
I/dalvikvm( 5486): threadid=7: reacting to signal 3
I/dalvikvm( 5486): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 5486): Sending signal. PID: 5486 SIG: 9
I/ActivityManager(   38): Process com.android.hellogooglemap (pid
5486) has died
.
I/UsageStats(   38): Unexpected resume of com.android.launcher while
already res
umed in com.android.hellogooglemap
W/InputManagerService(   38): Window already focused, ignoring focus
gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@43d86cc0

-- 

3. Can't figure out this compile error

4. Android: How can i put fonts of different size in a view?

5. How to handle two listviews in my activity

6. gps driver

7. Don't show images in SD Card in Android Gallery