{"id":7,"date":"2015-06-08T20:05:22","date_gmt":"2015-06-08T11:05:22","guid":{"rendered":"http:\/\/medicalfields.jp\/blog\/?p=7"},"modified":"2015-06-11T17:00:32","modified_gmt":"2015-06-11T08:00:32","slug":"%e5%9c%a8%e5%ba%ab%e7%ae%a1%e7%90%86%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0","status":"publish","type":"post","link":"https:\/\/medicalfields.jp\/blog\/java\/%e5%9c%a8%e5%ba%ab%e7%ae%a1%e7%90%86%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0\/","title":{"rendered":"GalaxyJ\u306e\u30d0\u30b0"},"content":{"rendered":"<p>\u73fe\u5728\u5728\u5eab\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3092\u7d76\u8cdb\u88fd\u4f5c\u4e2d\u3060\u3051\u3069\u3001\u6a5f\u7a2e\u306b\u3088\u3063\u3066USB\u30d0\u30fc\u30b3\u30fc\u30c9\u30ea\u30fc\u30c0\u306e\u6319\u52d5\u304c\u3053\u3068\u306a\u308b\u304b\u3089\u56f0\u3063\u3066\u3057\u307e\u3046\u3002GalaxyJ\u306eUsbManager\u304cnull\u3092\u8fd4\u3059\u554f\u984c\u306fSamsung\u306b\u30d0\u30b0\u30ec\u30dd\u30fc\u30c8\u3092\u9001\u308b\u304b\u60a9\u307f\u4e2d\u3002<\/p>\n<p>\u30d0\u30fc\u30b3\u30fc\u30c9\u30ea\u30fc\u30c0\u304c\u63a5\u7d9a\u3055\u308c\u3066\u308b\u304b\u306eclass\u3060\u3051\u3069\u3053\u308c\u3067\u3044\u3044\u3082\u306e\u3060\u308d\u3046\u304b<\/p>\n<pre>boolean USBexist=false;\r\nboolean exist=false;\r\n      boolean returnExist=false;\r\nUsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);\r\n   HashMap&lt;String, UsbDevice&gt; map=manager.getDeviceList();\r\n   Iterator&lt;UsbDevice&gt; it = map.values().iterator();\r\n   while(it.hasNext()) {\r\n       UsbDevice device = it.next();\r\n          USBexist=true;\r\n          returnExist=true;\r\n       Log.d(\"USB\", \"NAME =\" + device.getDeviceName());\r\n       \/\/ use device info\r\n      \/\/if(showMessage)Toast.makeText(getApplicationContext(), \"USB\u304c\u63a5\u7d9a\u3055\u308c\u307e\u3057\u305f\u3002\", Toast.LENGTH_SHORT).show();\r\n     }\r\n\r\n      if(newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) {\r\n          exist=true;\r\n          returnExist=true;\r\n          \/\/if(showMessage)Toast.makeText(getApplicationContext(), \"\u30d0\u30fc\u30b3\u30fc\u30c9\u30b9\u30ad\u30e3\u30ca\u30fc\u304c\u63a5\u7d9a\u3055\u308c\u307e\u3057\u305f\u3002\", Toast.LENGTH_SHORT).show();\r\n          \/\/((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).showInputMethodPicker();\r\n          \/\/Toast.makeText(this, \"Barcode Scanner detected. Please turn OFF Hardware\/Physical keyboard to enable softkeyboard to function.\", Toast.LENGTH_LONG).show();\r\n      }<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u73fe\u5728\u5728\u5eab\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3092\u7d76\u8cdb\u88fd\u4f5c\u4e2d\u3060\u3051\u3069\u3001\u6a5f\u7a2e\u306b\u3088\u3063\u3066USB\u30d0\u30fc\u30b3\u30fc\u30c9\u30ea\u30fc\u30c0\u306e\u6319\u52d5\u304c\u3053\u3068\u306a\u308b\u304b\u3089\u56f0\u3063\u3066\u3057\u307e\u3046\u3002GalaxyJ\u306eUsbManager\u304cnull\u3092\u8fd4\u3059\u554f\u984c\u306fSamsung\u306b\u30d0\u30b0\u30ec\u30dd\u30fc\u30c8\u3092\u9001\u308b\u304b\u60a9\u307f\u4e2d\u3002 \u30d0\u30fc\u30b3\u30fc &hellip; <a href=\"https:\/\/medicalfields.jp\/blog\/java\/%e5%9c%a8%e5%ba%ab%e7%ae%a1%e7%90%86%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0\/\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">GalaxyJ\u306e\u30d0\u30b0<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[4],"tags":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6kJO0-7","_links":{"self":[{"href":"https:\/\/medicalfields.jp\/blog\/wp-json\/wp\/v2\/posts\/7"}],"collection":[{"href":"https:\/\/medicalfields.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/medicalfields.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/medicalfields.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/medicalfields.jp\/blog\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":2,"href":"https:\/\/medicalfields.jp\/blog\/wp-json\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":18,"href":"https:\/\/medicalfields.jp\/blog\/wp-json\/wp\/v2\/posts\/7\/revisions\/18"}],"wp:attachment":[{"href":"https:\/\/medicalfields.jp\/blog\/wp-json\/wp\/v2\/media?parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/medicalfields.jp\/blog\/wp-json\/wp\/v2\/categories?post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/medicalfields.jp\/blog\/wp-json\/wp\/v2\/tags?post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}