{"id":5660,"date":"2017-04-25T10:00:31","date_gmt":"2017-04-25T01:00:31","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=5660"},"modified":"2017-04-24T19:02:07","modified_gmt":"2017-04-24T10:02:07","slug":"%e6%96%b0%e4%ba%ba%e6%88%90%e9%95%b7%e8%a8%98%e9%8c%b224th","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/5660","title":{"rendered":"\u65b0\u4eba\u6210\u9577\u8a18\u933224th"},"content":{"rendered":"<p>\u4eca\u56de\u306f\u3001Android\u306e\u30bb\u30f3\u30b5\u30fc\u3067\u53d6\u5f97\u3067\u304d\u308b\u3082\u306e\u3092\u5b66\u7fd2\u3057\u3066\u3044\u304d\u307e\u3059<\/p>\n<p>\u53d6\u5f97\u3067\u304d\u308b\u30bb\u30f3\u30b5\u30fc\u306e\u4f8b\u3068\u3057\u3066\u3001\u52a0\u901f\u5ea6\u30bb\u30f3\u30b5\u30fc\u3084\u5730\u78c1\u6c17\u30bb\u30f3\u30b5\u30fc\u304c\u3042\u308a\u307e\u3059<br \/>\n<img loading=\"lazy\" class=\"alignnone size-medium wp-image-5667\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2017\/04\/device-2017-04-24-183619-169x300.png\" alt=\"device-2017-04-24-183619\" width=\"169\" height=\"300\" border=\"1\" srcset=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/04\/device-2017-04-24-183619-169x300.png 169w, https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/04\/device-2017-04-24-183619.png 1440w\" sizes=\"(max-width: 169px) 100vw, 169px\" \/><br \/>\n<!--more--><\/p>\n<h3>\u5229\u7528\u3067\u304d\u308b\u30bb\u30f3\u30b5\u30fc\u306e\u78ba\u8a8d<\/h3>\n<p>\u7aef\u672b\u306b\u3088\u3063\u3066\u306f\u3001\u5229\u7528\u3067\u304d\u306a\u3044\u30bb\u30f3\u30b5\u30fc\u3082\u3042\u308a\u307e\u3059<br \/>\n\u81ea\u8eab\u306e\u7aef\u672b\u304c\u3001\u3069\u306e\u30bb\u30f3\u30b5\u30fc\u3092\u5229\u7528\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3057\u305f\u3044\u65b9\u306f\u3001\u4ee5\u4e0b\u30b3\u30fc\u30c9\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059<\/p>\n<pre style=\"border: dashed #000000 2px;\"><code>\tprotected void onCreate(@Nullable Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_blog1);\r\n\r\n\t\ttextView = (TextView) findViewById(R.id.textview_rating);\r\n\r\n\t\tsensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\r\n\t\tList sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL);\r\n\r\n\t\tfor(Sensor sensor:sensorList){\r\n\t\t\tLog.d(\"Sensor\", sensor.getName());\r\n\t\t}\r\n\t}\r\n<\/code><\/pre>\n<p>\u3053\u308c\u3067\u3001Logcat\u306b\u7aef\u672b\u304c\u5229\u7528\u53ef\u80fd\u306a\u3001\u30bb\u30f3\u30b5\u30fc\u306e\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n<h3>\u30bb\u30f3\u30b5\u30fc\u306e\u53d6\u5f97\u3001\u5229\u7528\u4f8b<\/h3>\n<p>\u79c1\u304c\u4f7f\u3044\u305f\u304b\u3063\u305f\u306e\u306f\u3001\u6c17\u6e29\u3092\u53d6\u5f97\u3059\u308b\u30bb\u30f3\u30b5\u30fc(TYPE_AMBIENT_TEMPERATURE)\u3067\u3059\u304c\u3001\u624b\u6301\u3061\u306e\u7aef\u672b\u3067\u306f\u3001\u6c17\u6e29\u306e\u30bb\u30f3\u30b5\u30fc\u306f\u5229\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u6c17\u5727\u3092\u53d6\u5f97\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059<br \/>\n\u6c17\u5727\u3092\u53d6\u5f97\u3059\u308b\u30bb\u30f3\u30b5\u30fc\u306f\u3001TYPE_PRESSURE\u3092\u6307\u5b9a\u3057\u307e\u3059<br \/>\n\u30ea\u30b9\u30ca\u30fc\u306f\u3001SensorEventListener\u3092\u5b9f\u88c5\u3057\u3066\u4f7f\u7528\u3057\u307e\u3059<\/p>\n<pre style=\"border: dashed #000000 2px;\"><code>\t@Override\r\n\tprotected void onCreate(@Nullable Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_blog1);\r\n\r\n\t\ttextView = (TextView) findViewById(R.id.textview_rating);\r\n\r\n\t\tsensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected void onResume() {\r\n\t\tsuper.onResume();\r\n\t\tList sensorList = sensorManager.getSensorList(Sensor.TYPE_PRESSURE);\r\n\r\n\t\tif(sensorList.size() &gt; 0){\r\n\t\t\tSensor sensor = sensorList.get(0);\r\n\t\t\tsensorManager.registerListener(this, sensor, \r\n\t\t\t\tSensorManager.SENSOR_DELAY_FASTEST);\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tprotected void onPause() {\r\n\t\tsuper.onPause();\r\n\t\tsensorManager.unregisterListener(this);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic void onSensorChanged(SensorEvent event) {\r\n\t\tswitch (event.sensor.getType()) {\r\n\t\t\tcase Sensor.TYPE_PRESSURE:\r\n\t\t\t\ttextView.setText(String.valueOf(event.values[0]));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\r\n\r\n\t}\r\n<\/code><\/pre>\n<p>onCreate\u3067\u306f\u3001SensorManager\u306e\u53d6\u5f97\u3092\u3057\u307e\u3059<br \/>\nonResume\u3067\u306f\u3001\u30bb\u30f3\u30b5\u30fc\u306e\u53d6\u5f97\u3068\u30bb\u30f3\u30b5\u30fc\u306e\u30ea\u30b9\u30ca\u3092\u767b\u9332\u3057\u307e\u3059<br \/>\n\u30bb\u30f3\u30b5\u30fc\u53d6\u5f97\u6642\u306b\u3001\u30ea\u30b9\u30c8\u306e\u30b5\u30a4\u30ba\u304c0\u306e\u5834\u5408\u306b\u306f\u3001\u30bb\u30f3\u30b5\u30fc\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u3053\u3068\u3092\u793a\u3057\u307e\u3059<br \/>\n0\u4ee5\u4e0a\u306e\u5834\u5408\u306b\u3001\u30ea\u30b9\u30c8\u306e1\u500b\u76ee\u306e\u8981\u7d20\u3092\u53d6\u5f97\u3057\u3066\u30ea\u30b9\u30ca\u306e\u767b\u9332\u3092\u884c\u3044\u307e\u3059<br \/>\nonPause\u3067\u306f\u3001\u30bb\u30f3\u30b5\u30fc\u306e\u30ea\u30b9\u30ca\u3092\u89e3\u9664\u3057\u307e\u3059<br \/>\n\u30a2\u30d7\u30ea\u304c\u30d0\u30c3\u30af\u30b0\u30e9\u30f3\u30c9\u306b\u56de\u3063\u305f\u6642\u306b\u306f\u3001\u30bb\u30f3\u30b5\u30fc\u306e\u53d6\u5f97\u3092\u3084\u3081\u308b\u3053\u3068\u3067\u3001\u96fb\u6c60\u306e\u6d88\u8cbb\u3092\u6291\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<\/p>\n<p>onSensorChanged\u306f\u3001registerListener\u3067\u767b\u9332\u3057\u305f\u30bb\u30f3\u30b5\u30fc\u306b\u5909\u5316\u304c\u3042\u3063\u305f\u5834\u5408\u306b\u547c\u3070\u308c\u307e\u3059<br \/>\n\u4eca\u56de\u306f\u3001\u53d6\u5f97\u3057\u305f\u6c17\u5727\u3092\u30c6\u30ad\u30b9\u30c8\u30d3\u30e5\u30fc\u306b\u30bb\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059<\/p>\n<p>onAccuracyChanged\u306f\u3001\u30bb\u30f3\u30b5\u30fc\u7cbe\u5ea6\u304c\u5909\u66f4\u3055\u308c\u305f\u5834\u5408\u306b\u547c\u3070\u308c\u307e\u3059<br \/>\n\u4eca\u56de\u306f\u3001\u306a\u306b\u3082\u3057\u307e\u305b\u3093<\/p>\n<p>\u4ee5\u4e0a\u3067\u3001\u5b9f\u88c5\u306f\u7d42\u4e86\u3067\u3059<\/p>\n<p>TYPE_PRESSURE\u306e\u90e8\u5206\u3092\u5909\u66f4\u3059\u308c\u3070\u3001\u4ed6\u306e\u30bb\u30f3\u30b5\u30fc\u3082\u53d6\u5f97\u3067\u304d\u307e\u3059<\/p>\n<h3>\u7d42\u308f\u308a\u306b<\/h3>\n<p>\u30bb\u30f3\u30b5\u30fc\u306f\u3001\u53d6\u5f97\u983b\u5ea6\u3084\u30ea\u30b9\u30ca\u306e\u5bfe\u5fdc\u3092\u3057\u3063\u304b\u308a\u3057\u306a\u3044\u3068\u3001\u7aef\u672b\u306b\u8ca0\u62c5\u304c\u304b\u304b\u308b\u3082\u306e\u3067\u3059<br \/>\n\u9ad8\u983b\u5ea6\u3067\u53d6\u5f97\u3059\u308c\u3070\u3001\u305d\u308c\u3060\u3051\u7cbe\u5ea6\u306f\u9ad8\u3044\u3067\u3059\u304c\u3001\u96fb\u6c60\u3092\u6d88\u8cbb\u3057\u3084\u3059\u3044\u3067\u3059<br \/>\n\u30a2\u30d7\u30ea\u306b\u9069\u3057\u305f\u8a2d\u5b9a\u3092\u5e38\u306b\u76ee\u6307\u3057\u305f\u3044\u3067\u3059<\/p>\n<p>\u706b\u66dc\u65e5\u62c5\u5f53\uff1apoppy<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5660\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/5660\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"\u65b0\u4eba\u6210\u9577\u8a18\u933224th\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5660\" data-text=\"\u65b0\u4eba\u6210\u9577\u8a18\u933224th\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5660\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5660\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306f\u3001Android\u306e\u30bb\u30f3\u30b5\u30fc\u3067\u53d6\u5f97\u3067\u304d\u308b\u3082\u306e\u3092\u5b66\u7fd2\u3057\u3066\u3044\u304d\u307e\u3059 \u53d6\u5f97\u3067\u304d\u308b\u30bb\u30f3\u30b5\u30fc\u306e\u4f8b\u3068\u3057\u3066\u3001\u52a0\u901f\u5ea6\u30bb\u30f3\u30b5\u30fc\u3084\u5730\u78c1\u6c17\u30bb\u30f3\u30b5\u30fc\u304c\u3042\u308a\u307e\u3059<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[100,12],"tags":[56,79,115],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/5660"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=5660"}],"version-history":[{"count":6,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/5660\/revisions"}],"predecessor-version":[{"id":5669,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/5660\/revisions\/5669"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=5660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=5660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=5660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}