{"id":663,"date":"2021-05-15T09:13:24","date_gmt":"2021-05-15T08:13:24","guid":{"rendered":"https:\/\/www.cipv6.de\/worp\/?p=663"},"modified":"2024-03-30T09:05:58","modified_gmt":"2024-03-30T08:05:58","slug":"java-remove-brackets-leading-slashes-from-string","status":"publish","type":"post","link":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/","title":{"rendered":"Java: Remove brackets \/ leading slashes from String"},"content":{"rendered":"\n<p>My Android-app have always presented the DNS-Server(s) with brackets \/ leading slashes like:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"417\" height=\"624\" data-attachment-id=\"665\" data-permalink=\"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg?fit=417%2C624&amp;ssl=1\" data-orig-size=\"417,624\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg?fit=417%2C624&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg?resize=417%2C624&#038;ssl=1\" alt=\"\" class=\"wp-image-665\" srcset=\"https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg?w=417&amp;ssl=1 417w, https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg?resize=200%2C300&amp;ssl=1 200w\" sizes=\"auto, (max-width: 417px) 85vw, 417px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>How can we get rid of these unnecessary characters ?<\/strong><\/p>\n\n\n\n<p>String myIp2Dns1:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String myIp2Dns1 = String.valueOf (LinkProp.getDnsServers()) ;<\/code><\/pre>\n\n\n\n<p>Log:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Log.d(\"myDnsInfo - Domain - \", \"Domain = \" + LinkProp.getDomains());\nD\/myDnsInfo: dns = &#91;\/10.0.2.3]<\/code><\/pre>\n\n\n\n<p><strong>Solution:<\/strong> <br>Manipulation of String myIp2Dns1:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>myIp2Dns1 = myIp2Dns1.replaceAll(\"&#91;\\\\&#91;\\\\](){}\\\"^\/+\\\"]\",\"\");<\/code><\/pre>\n\n\n\n<p>This command removes brackets \/ slashes \/ backslashes from the String.<\/p>\n\n\n\n<p>The output looks much better now:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"345\" height=\"136\" data-attachment-id=\"666\" data-permalink=\"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/image-9\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/image.png?fit=345%2C136&amp;ssl=1\" data-orig-size=\"345,136\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/image.png?fit=345%2C136&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/image.png?resize=345%2C136&#038;ssl=1\" alt=\"\" class=\"wp-image-666\" srcset=\"https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/image.png?w=345&amp;ssl=1 345w, https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/image.png?resize=300%2C118&amp;ssl=1 300w\" sizes=\"auto, (max-width: 345px) 85vw, 345px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>My Android-app have always presented the DNS-Server(s) with brackets \/ leading slashes like: How can we get rid of these unnecessary characters ? String myIp2Dns1: Log: Solution: Manipulation of String myIp2Dns1: This command removes brackets \/ slashes \/ backslashes from the String. The output looks much better now:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"template-page-builder.php","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Java\/Android\/Android-Studio: Remove brackets \/ leading slashes from String","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[39,40,49,59],"class_list":["post-663","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-android","tag-android-studio","tag-java","tag-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java: Remove brackets \/ leading slashes from String - 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\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java: Remove brackets \/ leading slashes from String - cipv6.de\" \/>\n<meta property=\"og:description\" content=\"My Android-app have always presented the DNS-Server(s) with brackets \/ leading slashes like: How can we get rid of these unnecessary characters ? String myIp2Dns1: Log: Solution: Manipulation of String myIp2Dns1: This command removes brackets \/ slashes \/ backslashes from the String. The output looks much better now:\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/\" \/>\n<meta property=\"og:site_name\" content=\"cipv6.de\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-15T08:13:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-30T08:05:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg\" \/>\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\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\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\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/\"},\"author\":{\"name\":\"ugu5ma\",\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/#\\\/schema\\\/person\\\/5d62b275485540be9e5e9e33d4fab86d\"},\"headline\":\"Java: Remove brackets \\\/ leading slashes from String\",\"datePublished\":\"2021-05-15T08:13:24+00:00\",\"dateModified\":\"2024-03-30T08:05:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/\"},\"wordCount\":54,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/#\\\/schema\\\/person\\\/5d62b275485540be9e5e9e33d4fab86d\"},\"image\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/1-2.jpg\",\"keywords\":[\"Android\",\"Android-Studio\",\"java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/\",\"url\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/\",\"name\":\"Java: Remove brackets \\\/ leading slashes from String - cipv6.de\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/1-2.jpg\",\"datePublished\":\"2021-05-15T08:13:24+00:00\",\"dateModified\":\"2024-03-30T08:05:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.cipv6.de\\\/worp\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/1-2.jpg?fit=417%2C624&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.cipv6.de\\\/worp\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/1-2.jpg?fit=417%2C624&ssl=1\",\"width\":417,\"height\":624},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/index.php\\\/2021\\\/05\\\/15\\\/java-remove-brackets-leading-slashes-from-string\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cipv6.de\\\/worp\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java: Remove brackets \\\/ leading slashes from String\"}]},{\"@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":"Java: Remove brackets \/ leading slashes from String - 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\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/","og_locale":"en_US","og_type":"article","og_title":"Java: Remove brackets \/ leading slashes from String - cipv6.de","og_description":"My Android-app have always presented the DNS-Server(s) with brackets \/ leading slashes like: How can we get rid of these unnecessary characters ? String myIp2Dns1: Log: Solution: Manipulation of String myIp2Dns1: This command removes brackets \/ slashes \/ backslashes from the String. The output looks much better now:","og_url":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/","og_site_name":"cipv6.de","article_published_time":"2021-05-15T08:13:24+00:00","article_modified_time":"2024-03-30T08:05:58+00:00","og_image":[{"url":"https:\/\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg","type":"","width":"","height":""}],"author":"ugu5ma","twitter_card":"summary_large_image","twitter_creator":"@ugu5ma","twitter_site":"@ugu5ma","twitter_misc":{"Written by":"ugu5ma","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/#article","isPartOf":{"@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/"},"author":{"name":"ugu5ma","@id":"https:\/\/www.cipv6.de\/worp\/#\/schema\/person\/5d62b275485540be9e5e9e33d4fab86d"},"headline":"Java: Remove brackets \/ leading slashes from String","datePublished":"2021-05-15T08:13:24+00:00","dateModified":"2024-03-30T08:05:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/"},"wordCount":54,"commentCount":0,"publisher":{"@id":"https:\/\/www.cipv6.de\/worp\/#\/schema\/person\/5d62b275485540be9e5e9e33d4fab86d"},"image":{"@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/#primaryimage"},"thumbnailUrl":"https:\/\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg","keywords":["Android","Android-Studio","java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/","url":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/","name":"Java: Remove brackets \/ leading slashes from String - cipv6.de","isPartOf":{"@id":"https:\/\/www.cipv6.de\/worp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/#primaryimage"},"image":{"@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/#primaryimage"},"thumbnailUrl":"https:\/\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg","datePublished":"2021-05-15T08:13:24+00:00","dateModified":"2024-03-30T08:05:58+00:00","breadcrumb":{"@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/#primaryimage","url":"https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg?fit=417%2C624&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.cipv6.de\/worp\/wp-content\/uploads\/2021\/05\/1-2.jpg?fit=417%2C624&ssl=1","width":417,"height":624},{"@type":"BreadcrumbList","@id":"https:\/\/www.cipv6.de\/worp\/index.php\/2021\/05\/15\/java-remove-brackets-leading-slashes-from-string\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cipv6.de\/worp\/"},{"@type":"ListItem","position":2,"name":"Java: Remove brackets \/ leading slashes from String"}]},{"@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"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9uBTs-aH","jetpack-related-posts":[{"id":127,"url":"https:\/\/www.cipv6.de\/worp\/index.php\/2018\/01\/04\/android-log-or-toast-the-selected-item-in-an-listview\/","url_meta":{"origin":663,"position":0},"title":"Android: Log or Toast the selected Item in an ListView","author":"ugu5ma","date":"January 4, 2018","format":false,"excerpt":"in case you have the need to log.i the selected item of an listview this snippet could help: \u00a0 [java] listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { CheckedTextView checkedTextView = (CheckedTextView) view; String itemClicked = (String) listView.getAdapter().getItem(i); if (checkedTextView.isChecked()) { Log.i(\"Info :\",\u2026","rel":"","context":"In \"Android\"","block_context":{"text":"Android","link":"https:\/\/www.cipv6.de\/worp\/index.php\/tag\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":42,"url":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/run-task-in-background\/","url_meta":{"origin":663,"position":1},"title":"Android: run task in background","author":"ugu5ma","date":"December 22, 2017","format":false,"excerpt":"\u00a0 [java] package de.clarisweb.android.downloadwebcontent; import android.os.AsyncTask; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; public class MainActivity extends AppCompatActivity { public class DownloadTask extends AsyncTask\u00a0{ @Override protected String doInBackground(String... strings) { Log.i(\"URL\", strings[0]); return \"done !\"; } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); DownloadTask task = new DownloadTask(); String\u2026","rel":"","context":"In \"Android\"","block_context":{"text":"Android","link":"https:\/\/www.cipv6.de\/worp\/index.php\/tag\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":58,"url":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-query-jso-data-log-the-response-to-logcat\/","url_meta":{"origin":663,"position":2},"title":"Android: Query JSON-Data , log the response to logcat","author":"ugu5ma","date":"December 22, 2017","format":false,"excerpt":"[java] package de.clarisweb.android.jsondemo; import android.os.AsyncTask; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; import android.view.Menu; import android.view.MenuItem; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; public class MainActivity extends AppCompatActivity { public class DownloadTask extends AsyncTask< String, Void, String> { @Override protected String doInBackground(String...\u2026","rel":"","context":"In \"Android\"","block_context":{"text":"Android","link":"https:\/\/www.cipv6.de\/worp\/index.php\/tag\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":212,"url":"https:\/\/www.cipv6.de\/worp\/index.php\/2018\/11\/12\/android-canvas-put-bitmap-in-the-middle-of-the-screen\/","url_meta":{"origin":663,"position":3},"title":"Android Canvas: put Bitmap in the middle of the screen","author":"ugu5ma","date":"November 12, 2018","format":false,"excerpt":"Code: [java] canvas.drawBitmap(bitmap, (getMeasuredWidth()\/2)-(bitmap.getWidth()\/2), (getMeasuredHeight()\/2 -(bitmap.getHeight()\/2)), null); [\/java]","rel":"","context":"In \"Android\"","block_context":{"text":"Android","link":"https:\/\/www.cipv6.de\/worp\/index.php\/tag\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":112,"url":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/24\/android-how-can-i-hide-the-softkeyboard-when-the-input-was-made\/","url_meta":{"origin":663,"position":4},"title":"Android: How can I hide the softkeyboard when the input was made ?","author":"ugu5ma","date":"December 24, 2017","format":false,"excerpt":"Just add the two lines into your code: [java] InputMethodManager manager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); manager.hideSoftInputFromWindow(editText.getWindowToken(), 0); [\/java] \u00a0","rel":"","context":"In \"Android\"","block_context":{"text":"Android","link":"https:\/\/www.cipv6.de\/worp\/index.php\/tag\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":51,"url":"https:\/\/www.cipv6.de\/worp\/index.php\/2017\/12\/22\/android-timer\/","url_meta":{"origin":663,"position":5},"title":"Android: Timer","author":"ugu5ma","date":"December 22, 2017","format":false,"excerpt":"[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(\"Seconds Left!\", String.valueOf(millisecondsUntilDone \/ 1000)); Toast.makeText(MainActivity.this, \"\" + String.valueOf(millisecondsUntilDone \/ 1000), Toast.LENGTH_SHORT).show(); } public void onFinish() { Log.i(\"We're done!\", \"No more countdown\"); } }.start();<\/pre> [\/java]","rel":"","context":"In \"Android\"","block_context":{"text":"Android","link":"https:\/\/www.cipv6.de\/worp\/index.php\/tag\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/posts\/663","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=663"}],"version-history":[{"count":0,"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/posts\/663\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/media?parent=663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/categories?post=663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cipv6.de\/worp\/index.php\/wp-json\/wp\/v2\/tags?post=663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}