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. Style text in color problem

Hi all,
  I am trying to edit a styled text.
  My goal is to display a string, for example "This is a color string"
and  the word "color" is in different color.

  My first solution is to create a string resource like this
  values.xml
    <string name="color_string">This is a <font color="#cc33ff">color</
font> string</<string>
  TextTest.java
    String text = getResources().getString(r.string.color_string);
    (TextView)myView.setText(text);
  Solution 1, failed.

  The second solution is to use android.text.Html package
    String htmlText = Html.fromHtml(text);
    (TextView)myView.setText(htmlText);
  This solution is also failed.

  Does anyone can help on this?

  Thanks a lot.
--~--~---------~--~----~------------~-------~--~----~

2. WiMax Deal the Biggest Victory for Android Yet?

WiMax Deal the Biggest Victory for Android Yet?
from AndroidGuys by Scott Webster

Today sees a monumental event in the wireless industry. Along with partners
Intel, Time Warner Cable, Comcast, and Bright House Networks, Google has
ponied up a share of a $3.2 billion dollar marriage between Sprint and
Clearwire. With the two of them making nice and coming together for a
national WiMax system, the deal puts the Android platform front and center
as the operating system of choice for mobile devices on the network.


We knew from the start that Google was ambitious with Android. Just how
ambitious though is becoming more apparent each week. Today they're pulling
$500 million out of their wallets to ensure that Android based devices and
capabilities are synonymous with this new ultra-fast wireless internet.
Something tells me that there's been some behind closed doors stuff going on
with Intel, Sprint, and Google for a long time. All three of them are
founding Open Handset Alliance members and are probably well aware of each
other's long term goals.



Google wants to get in front of users in as many ways as possible so that
they can sell adverti{*filter*}t in search and websites. As people are migrating
away from desktops, they are turning to mobile internet devices and smart
phones. How does Google integrate their services as deeply as possible?
Android.


I envision a simple game plan:


Google develops a platform that takes advantage of location based
technologies and searches. Needing a way to get it on handsets, they form
the Open Handset Alliance with hardware, software, and technology companies.
Intel agrees to make next generation chipsets with WiMax built in and Sprint
(with pals) provides a network that blankets the country and happens to be
super-duper fast. Known as Xohm, the service is expected to cover 120-140
million potential customers. The handset manufacturers HTC, LG, Samsung, and
Motorola will happily make phones and devices all day long. Even with only a
fraction of the country able to take advantage of the speeds, the backup 3G
networks from Sprint and T-Mobile would still provide a substantial, and
acceptable footprint.

The Clearwire deal is slated to be finalized later this year with a
projected rollout of 2010. By then, it's safe to assume that T-Mobile's 3G
network will be running in a large portion of the United States. Throw in
all of the Wi-Fi networks around the world and you'll have a significant
amount of people using location based searches with instant results. Oh
yeah, there will be targeted ads in there too. Courtesy of Android.

Google's been working on this stuff a lot longer than most realize. In fact,
it's almost like they are working backwards from the end goal. All of the
little things they've done over the last few years will be paying off like
nothing we've seen before.

While you weren't watching closely, Clearwire said earlier this year that
they will start migrating their customers to Gmail and Google Calendar. They
also agreed to start using AdSense for Search capabilities on future portal
apps.

While you weren't looking, Sprint started using Gmail on their website in
addition to integrating YouTube and Google Maps for Mobile on their devices.
And of course, you can't forget that Google does searches still. Sprint has
agreed to use Google as the preferred mobile search provider for the
company.

It's time to start paying attention.

If you've been with AndroidGuys since we started, you'll recall an article I
did back in November calling for Android TV on set top boxes. The idea seems
even less far-fetched today with Google's involvement with cable companies.

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

3. cannt scroll imageview right and down

4. Device Proposal

5. Reference to current Activity being displayed/shown

6. Location API and Opertor api

7. modifying the People content provider