{"id":51,"date":"2017-12-22T10:38:53","date_gmt":"2017-12-22T10:38:53","guid":{"rendered":"https:\/\/www.cipv6.de\/worp\/?p=51"},"modified":"2017-12-22T15:26:29","modified_gmt":"2017-12-22T14:26:29","slug":"android-timer","status":"publish","type":"post","link":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/","title":{"rendered":"Android: Timer"},"content":{"rendered":"<p>[java]<br \/>\n@Override<br \/>\n    protected void onCreate(Bundle savedInstanceState) {<br \/>\n        super.onCreate(savedInstanceState);<br \/>\n        setContentView(R.layout.activity_main);<\/p>\n<p>        new CountDownTimer(10000, 100) {<\/p>\n<p>            public void onTick(long millisecondsUntilDone) {<br \/>\n                Log.i(&quot;Seconds Left!&quot;, String.valueOf(millisecondsUntilDone \/ 1000));<br \/>\n                Toast.makeText(MainActivity.this, &quot;&quot; + String.valueOf(millisecondsUntilDone \/ 1000), Toast.LENGTH_SHORT).show();<br \/>\n            }<\/p>\n<p>            public void onFinish() {<br \/>\n                Log.i(&quot;We&#8217;re done!&quot;, &quot;No more countdown&quot;);<br \/>\n            }<br \/>\n        }.start();&lt;\/pre&gt;<br \/>\n[\/java]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[java] @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); new CountDownTimer(10000, 100) { public void onTick(long millisecondsUntilDone) { Log.i(&quot;Seconds Left!&quot;, String.valueOf(millisecondsUntilDone \/ 1000)); Toast.makeText(MainActivity.this, &quot;&quot; + String.valueOf(millisecondsUntilDone \/ 1000), Toast.LENGTH_SHORT).show(); } public void onFinish() { Log.i(&quot;We&#8217;re done!&quot;, &quot;No more countdown&quot;); } }.start();&lt;\/pre&gt; [\/java]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[39,59],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-android","tag-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Android: Timer - cipv6.de<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android: Timer - cipv6.de\" \/>\n<meta property=\"og:description\" content=\"[java] @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); new CountDownTimer(10000, 100) { public void onTick(long millisecondsUntilDone) { Log.i(&quot;Seconds Left!&quot;, String.valueOf(millisecondsUntilDone \/ 1000)); Toast.makeText(MainActivity.this, &quot;&quot; + String.valueOf(millisecondsUntilDone \/ 1000), Toast.LENGTH_SHORT).show(); } public void onFinish() { Log.i(&quot;We&#8217;re done!&quot;, &quot;No more countdown&quot;); } }.start();&lt;\/pre&gt; [\/java]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/\" \/>\n<meta property=\"og:site_name\" content=\"cipv6.de\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-22T10:38:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-22T14:26:29+00:00\" \/>\n<meta name=\"author\" content=\"ugu5ma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ugu5ma\" \/>\n<meta name=\"twitter:site\" content=\"@ugu5ma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ugu5ma\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2017\\\/12\\\/22\\\/android-timer\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2017\\\/12\\\/22\\\/android-timer\\\/\"},\"author\":{\"name\":\"ugu5ma\",\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/#\\\/schema\\\/person\\\/5d62b275485540be9e5e9e33d4fab86d\"},\"headline\":\"Android: Timer\",\"datePublished\":\"2017-12-22T10:38:53+00:00\",\"dateModified\":\"2017-12-22T14:26:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2017\\\/12\\\/22\\\/android-timer\\\/\"},\"wordCount\":66,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/#\\\/schema\\\/person\\\/5d62b275485540be9e5e9e33d4fab86d\"},\"keywords\":[\"Android\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2017\\\/12\\\/22\\\/android-timer\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2017\\\/12\\\/22\\\/android-timer\\\/\",\"url\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2017\\\/12\\\/22\\\/android-timer\\\/\",\"name\":\"Android: Timer - cipv6.de\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/#website\"},\"datePublished\":\"2017-12-22T10:38:53+00:00\",\"dateModified\":\"2017-12-22T14:26:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2017\\\/12\\\/22\\\/android-timer\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2017\\\/12\\\/22\\\/android-timer\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2017\\\/12\\\/22\\\/android-timer\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android: Timer\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/#website\",\"url\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/\",\"name\":\"cipv6.de\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/#\\\/schema\\\/person\\\/5d62b275485540be9e5e9e33d4fab86d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/#\\\/schema\\\/person\\\/5d62b275485540be9e5e9e33d4fab86d\",\"name\":\"ugu5ma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7211dd31d32612293e4228c8f880721a803dcc15211868f096ea9a8e77b6f316?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7211dd31d32612293e4228c8f880721a803dcc15211868f096ea9a8e77b6f316?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7211dd31d32612293e4228c8f880721a803dcc15211868f096ea9a8e77b6f316?s=96&d=mm&r=g\",\"caption\":\"ugu5ma\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7211dd31d32612293e4228c8f880721a803dcc15211868f096ea9a8e77b6f316?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/cipv6.de\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android: Timer - cipv6.de","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/","og_locale":"en_US","og_type":"article","og_title":"Android: Timer - cipv6.de","og_description":"[java] @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); new CountDownTimer(10000, 100) { public void onTick(long millisecondsUntilDone) { Log.i(&quot;Seconds Left!&quot;, String.valueOf(millisecondsUntilDone \/ 1000)); Toast.makeText(MainActivity.this, &quot;&quot; + String.valueOf(millisecondsUntilDone \/ 1000), Toast.LENGTH_SHORT).show(); } public void onFinish() { Log.i(&quot;We&#8217;re done!&quot;, &quot;No more countdown&quot;); } }.start();&lt;\/pre&gt; [\/java]","og_url":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/","og_site_name":"cipv6.de","article_published_time":"2017-12-22T10:38:53+00:00","article_modified_time":"2017-12-22T14:26:29+00:00","author":"ugu5ma","twitter_card":"summary_large_image","twitter_creator":"@ugu5ma","twitter_site":"@ugu5ma","twitter_misc":{"Written by":"ugu5ma"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/#article","isPartOf":{"@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/"},"author":{"name":"ugu5ma","@id":"https:\/\/www.cipv6.de\/worp\/#\/schema\/person\/5d62b275485540be9e5e9e33d4fab86d"},"headline":"Android: Timer","datePublished":"2017-12-22T10:38:53+00:00","dateModified":"2017-12-22T14:26:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/"},"wordCount":66,"commentCount":1,"publisher":{"@id":"https:\/\/www.cipv6.de\/worp\/#\/schema\/person\/5d62b275485540be9e5e9e33d4fab86d"},"keywords":["Android"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/","url":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/","name":"Android: Timer - cipv6.de","isPartOf":{"@id":"https:\/\/www.cipv6.de\/worp\/#website"},"datePublished":"2017-12-22T10:38:53+00:00","dateModified":"2017-12-22T14:26:29+00:00","breadcrumb":{"@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cipv6.de\/worp\/"},{"@type":"ListItem","position":2,"name":"Android: Timer"}]},{"@type":"WebSite","@id":"https:\/\/www.cipv6.de\/worp\/#website","url":"https:\/\/www.cipv6.de\/worp\/","name":"cipv6.de","description":"","publisher":{"@id":"https:\/\/www.cipv6.de\/worp\/#\/schema\/person\/5d62b275485540be9e5e9e33d4fab86d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cipv6.de\/worp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.cipv6.de\/worp\/#\/schema\/person\/5d62b275485540be9e5e9e33d4fab86d","name":"ugu5ma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7211dd31d32612293e4228c8f880721a803dcc15211868f096ea9a8e77b6f316?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7211dd31d32612293e4228c8f880721a803dcc15211868f096ea9a8e77b6f316?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7211dd31d32612293e4228c8f880721a803dcc15211868f096ea9a8e77b6f316?s=96&d=mm&r=g","caption":"ugu5ma"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/7211dd31d32612293e4228c8f880721a803dcc15211868f096ea9a8e77b6f316?s=96&d=mm&r=g"},"sameAs":["https:\/\/cipv6.de"]}]}},"_links":{"self":[{"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/comments?post=51"}],"version-history":[{"count":0,"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}