{"id":8951,"date":"2016-05-17T12:07:07","date_gmt":"2016-05-17T03:07:07","guid":{"rendered":"http:\/\/www.webtech.co.jp\/blog\/?p=8951"},"modified":"2020-06-16T09:35:40","modified_gmt":"2020-06-16T00:35:40","slug":"android_push","status":"publish","type":"post","link":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/","title":{"rendered":"Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067"},"content":{"rendered":"<p>R&amp;D\u90e8\u306e\u4f50\u85e4\u4f38\u3067\u3059\u3002<\/p>\n<p>\u5148\u65e5\u3001\u958b\u767a\u4e2d\u306eAndroid\u30a2\u30d7\u30ea\u3067\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u6a5f\u80fd\u306b\u5bfe\u5fdc\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u3068\u304d\u306b\u5fc5\u8981\u306a\u300cAPI\u30ad\u30fc\u300d\u306e\u53d6\u5f97\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\u304c\u308f\u304b\u308a\u306b\u304f\u304f\u3001\u3068\u3066\u3082\u82e6\u52b4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>Android\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e\u4ed5\u69d8\u306f\u904e\u53bb\u306b\u4e8c\u5ea6\u3001\u5927\u304d\u304f\u5909\u66f4\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u30cd\u30c3\u30c8\u4e0a\u3067\u691c\u7d22\u3057\u3066\u3082\u65b0\u3057\u3044\u60c5\u5831\u304c\u306a\u304b\u306a\u304b\u898b\u3064\u304b\u3089\u305a\u3001\u3053\u308c\u3082\u82e6\u52b4\u3057\u305f\u7406\u7531\u306e\u4e00\u3064\u3067\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u4eca\u56de\u306e\u8a18\u4e8b\u3067\u306f\u3001\u3053\u306e\u300cAPI\u30ad\u30fc\u300d\u306e\u53d6\u5f97\u624b\u9806\u3001\u304a\u3088\u3073\u5b9f\u969b\u306bAndroid\u30a2\u30d7\u30ea\u306b\u7d44\u307f\u8fbc\u3093\u3067\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3092\u53d7\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u307e\u3067\u306e\u4e00\u9023\u306e\u624b\u9806\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\n\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u3092\u691c\u8a0e\u3055\u308c\u3066\u3044\u308b\u958b\u767a\u8005\u306e\u7686\u69d8\u306e\u304a\u5f79\u306b\u7acb\u3066\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u3053\u306e\u8a18\u4e8b\u306f\u30012016\u5e745\u6708\u4e0a\u65ec\u6642\u70b9\u306eGoogle Developers Console \u306e\u4ed5\u69d8\u3092\u5143\u306b\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002\u4eca\u5f8c\u3001Google\u306b\u3088\u3063\u3066\u4ed5\u69d8\u304c\u5909\u66f4\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u3092\u3042\u3089\u304b\u3058\u3081\u3054\u4e86\u627f\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<div class=\"box\"><strong>\u30102016\u5e748\u67082\u65e5 \u8ffd\u8a18\u3011<br \/>\n\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e\u4ed5\u7d44\u307f\u304c\u5909\u66f4\u3068\u306a\u3063\u305f\u305f\u3081\u3001\u73fe\u5728\u306f\u672c\u30a8\u30f3\u30c8\u30ea\u30fc\u306e\u65b9\u6cd5\u3067\u306f\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u304c\u884c\u3048\u306a\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/strong><\/div>\n<p><!--more--><\/p>\n<h2>\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e\u4ed5\u7d44\u307f<\/h2>\n<p>\u30b9\u30de\u30db\u306e\u30e1\u30fc\u30eb\u3084SNS\u306a\u3069\u306e\u30a2\u30d7\u30ea\u306f\u3001\u7aef\u672b\u4f7f\u7528\u8005\u3084\u30a2\u30d7\u30ea\u304c\u81ea\u3089\u80fd\u52d5\u7684\u306b\u66f4\u65b0\u78ba\u8a8d\u3092\u3057\u306a\u304f\u3066\u3082\u3001\u5e38\u306b\u6700\u65b0\u60c5\u5831\u3092\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u53d6\u5f97\u30fb\u8868\u793a\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u60c5\u5831\u306b\u66f4\u65b0\u304c\u3042\u3063\u305f\u3053\u3068\u3092\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u7aef\u672b\u3078\u300c\u901a\u77e5\u300d\u3057\u3066\u304f\u308c\u308b\u4ed5\u7d44\u307f\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002\u3053\u306e\u4ed5\u7d44\u307f\u304c\u300c\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u300d\u3067\u3059\u3002<\/p>\n<p>\u9001\u4fe1\u8005(\u30a2\u30d7\u30ea\u306e\u30b5\u30fc\u30d3\u30b9\u904b\u7528\u8005)\u306f\u3001\u300c<strong>Google Cloud Messaging (GCM)<\/strong>\u300d\u3068\u3044\u3046Google\u793e\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u4e16\u754c\u4e2d\u306e\u7aef\u672b\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u81ea\u5206\u306e\u30a2\u30d7\u30ea\u5b9b\u306b\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"padding-left: 30px;\"><em>* GCM\u3092\u4f7f\u3063\u305f\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306fiOS\u30a2\u30d7\u30ea\u3067\u3082\u5229\u7528\u53ef\u80fd\u3067\u3059\u304c\u3001\u4eca\u56de\u306e\u8a18\u4e8b\u3067\u306f\u5272\u611b\u3057\u307e\u3059\u3002<\/em><\/p>\n<p>\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u3067\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u306f\u307e\u305a\u3001\u4e0b\u8a18\u306e\u6e96\u5099\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul style=\"list-style-type: circle;\">\n<li>GCM\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u300c<strong>API\u30ad\u30fc<\/strong>\u300d\u3092\u53d6\u5f97\u3059\u308b<\/li>\n<li>\u30a2\u30d7\u30ea\u3067\u3001\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e\u300c<strong>\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8<\/strong>\u300d\u306e\u53d7\u4fe1\u3068\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u7aef\u672b\u306e\u300c<strong>\u8b58\u5225\u30c8\u30fc\u30af\u30f3<\/strong>\u300d\u306e\u9001\u4fe1\u306b\u5bfe\u5fdc\u3059\u308b<\/li>\n<li>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u30a2\u30d7\u30ea\u304b\u3089\u7aef\u672b\u6bce\u306b\u9001\u3089\u308c\u3066\u304f\u308b\u300c<strong>\u8b58\u5225\u30c8\u30fc\u30af\u30f3<\/strong>\u300d\u3092\u53d7\u4fe1\u3057\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u3069\u3078\u84c4\u7a4d\u30fb\u7ba1\u7406\u3059\u308b\u300c<strong>\u30c8\u30fc\u30af\u30f3\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc<\/strong>\u300d\u3092\u7528\u610f\u3059\u308b<\/li>\n<li>\u300c<strong>\u30c8\u30fc\u30af\u30f3\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc<\/strong>\u300d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u84c4\u7a4d\u3055\u308c\u305f\u300c<strong>\u8b58\u5225\u30c8\u30fc\u30af\u30f3<\/strong>\u300d\u3092\u7528\u3044\u3001\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u9001\u4fe1\u3092GCM\u3078\u4f9d\u983c\u3059\u308b\u305f\u3081\u306e\u300c<strong>\u901a\u77e5\u9001\u4fe1\u30c4\u30fc\u30eb<\/strong>\u300d\u3092\u7528\u610f\u3059\u308b<\/li>\n<\/ul>\n<p>\u5b9f\u969b\u306e\u51e6\u7406\u306e\u6d41\u308c\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u7aef\u672b\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u30a2\u30d7\u30ea\u306f\u3001\u300c\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u300d\u3092\u300c\u30c8\u30fc\u30af\u30f3\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u300d\u3078\u9001\u4fe1\u3059\u308b\u3002<br \/>\n* \u8b58\u5225\u30c8\u30fc\u30af\u30f3\u306f\u7aef\u672b\u518d\u8d77\u52d5\u306a\u3069\u3067\u4e0d\u5b9a\u671f\u306b\u5909\u308f\u308b\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001\u305d\u306e\u90fd\u5ea6\u3001\u518d\u9001\u4fe1\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<li>\u300c\u30c8\u30fc\u30af\u30f3\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u300d\u306f\u53d7\u4fe1\u3057\u305f\u300c\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u300d\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u3069\u3078\u4fdd\u5b58\u3059\u308b\u3002<\/li>\n<li>\u9001\u4fe1\u8005\u306f\u3001\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3092\u884c\u3044\u305f\u3044\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u3001\u901a\u77e5\u76f8\u624b\u306e\u300c\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u4e00\u89a7\u300d\u3068\u300c\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8\u300d\u3092\u7528\u610f\u3057\u3001\u3053\u308c\u3089\u3092\u300c\u901a\u77e5\u9001\u4fe1\u30c4\u30fc\u30eb\u300d\u3092\u7528\u3044\u3066GCM\u306b\u9001\u4fe1\u3059\u308b\u3002\u3053\u306e\u3068\u304d\u306b\u300cAPI\u30ad\u30fc\u300d\u304c\u5fc5\u8981\u3068\u306a\u308b\u3002<\/li>\n<li>GCM\u306f\u3001\u53d7\u3051\u53d6\u3063\u305f\u300c\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u4e00\u89a7\u300d\u306e\u3059\u3079\u3066\u306e\u7aef\u672b\u3078\u300c\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8\u300d\u3092\u4e00\u6589\u306b\u9001\u4fe1\u3059\u308b\u3002<\/li>\n<li>\u5404\u7aef\u672b\u306e\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u304c\u300c\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8\u300d\u3092\u53d7\u4fe1\u3057\u3001\u305d\u306e\u5185\u5bb9\u306b\u5fdc\u3058\u3066\u3001\u753b\u9762\u306e\u66f4\u65b0\u3084\u901a\u77e5\u30d0\u30fc\u3078\u306e\u8868\u793a\u306a\u3069\u3092\u884c\u3046\u3002<\/li>\n<\/ol>\n<p>\u4eca\u56de\u306f\u8aac\u660e\u3092\u7c21\u7565\u5316\u3059\u308b\u305f\u3081\u3001\u300c\u30c8\u30fc\u30af\u30f3\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u300d\u90e8\u5206\u306f\u5272\u611b\u3057\u307e\u3059\u3002\u30a2\u30d7\u30ea\u958b\u767a\u8005\u304c\u65e2\u306b\u7aef\u672b\u306e\u300c\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u300d\u3092\u77e5\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3001\u5b9f\u969b\u306bGCM\u3092\u5229\u7528\u3057\u3066\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u3067\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e\u53d7\u4fe1\u3092\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>GCM\u306e\u5229\u7528\u958b\u59cb(API\u30ad\u30fc\u306e\u53d6\u5f97)\u624b\u9806<\/h2>\n<p>\u524d\u8ff0\u306e\u3088\u3046\u306b\u3001\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306b\u306fGCM\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001GCM\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u306fGoogle\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3067\u300cAPI\u30ad\u30fc\u300d\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3053\u306e\u65b9\u6cd5\u304c\u610f\u5916\u3068\u308f\u304b\u308a\u306b\u304f\u3044\u306e\u3067\u3001\u4ee5\u4e0b\u306b\u753b\u9762\u30ad\u30e3\u30d7\u30c1\u30e3\u3092\u4ea4\u3048\u3066\u624b\u9806\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>\u30101\u3011\u307e\u305a\u3001Google Developers Console \u3078\u3001\u958b\u767a\u8005\u7528\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3068 Google API \u4e00\u89a7\u753b\u9762\u304c\u958b\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push02-1.png\" alt=\"push02\" \/><\/p>\n<p>\u30102\u3011\u3053\u3053\u3067\u300cGoogle Cloud Messaging\u300d\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push33.png\" alt=\"push33\" \/><\/p>\n<p>\u30103\u3011\u300cGoogle Cloud Messaging\u300d\u306e\u4e0b\u306b\u3042\u308b\u300c\u8a73\u7d30\u300d\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001Cloud Messaging \u306e\u30da\u30fc\u30b8\u306b\u98db\u3073\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push15.png\" alt=\"push15\"\/><\/p>\n<p>\u300cSimple and reliable messaging to reach over a billion devices.\u300d\u7d20\u6575\u306a\u97ff\u304d\u3067\u3059\u3002<\/p>\n<p>\u30104\u3011\u300cTRY IT ON ANDROID\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push16.png\" alt=\"push16\" \/><\/p>\n<p>\u3053\u3053\u3067\u30b5\u30f3\u30d7\u30eb\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3082\u5165\u624b\u3067\u304d\u307e\u3059\u304c\u3001\u4eca\u56de\u306e\u89e3\u8aac\u3067\u306f\u81ea\u524d\u3067\u7528\u610f\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u3082\u3061\u308d\u3093\u3001\u3053\u306e\u30da\u30fc\u30b8\u306b\u3042\u308b\u30b5\u30f3\u30d7\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u30105\u3011\u6b21\u306b\u3001\u300c2. Get a configuration file\u300d\u306e\u8aac\u660e\u306e\u4e0b\u306e\u65b9\u306b\u3042\u308b\u300cGET A CONFIGURATION FILE\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push34.png\" alt=\"push34\" \/><\/p>\n<p>\u300cApp name\u300d\u3068\u300cAndroid package name\u300d\u306e\u5165\u529b\u304c\u5fc5\u8981\u3067\u3059\u3002\u5b9f\u969b\u306b\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u3059\u308b\u30a2\u30d7\u30ea\u306e\u30a2\u30d7\u30ea\u540d\u3068\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u3053\u3053\u3067\u306f App name \u306f\u300cPushTestApp\u300d\u3001Android package name \u306f\u300cjp.co.webtech.pushtestapp\u300d\u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30106\u3011\u300cCONTINUE TO Choose and configure services\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u5148\u306b\u9032\u307f\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push35-1.png\" alt=\"push35\" \/><\/p>\n<p>\u300cYou are configuring the <strong>PushTestApp<\/strong> app with package name <strong>jp.co.webtech.pushtestapp<\/strong>.\u300d<br \/>\n\u3068\u8868\u793a\u3055\u308c\u308c\u3070\u3001\u624b\u7d9a\u304d\u306f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p>\u30107\u3011\u7d9a\u3044\u3066\u3001\u300cENABLE GOOGLE CLOUD MESSAGING\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066Google Cloud Messaging \u30b5\u30fc\u30d3\u30b9\u3092\u6709\u52b9\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push36.png\" alt=\"push36\" \/><\/p>\n<p>Cloud Messaging \u304c\u6709\u52b9\u306b\u306a\u308a\u3001\u300cServer API Key\u300d\u3068\u300cSender ID\u300d\u304c\u767a\u884c\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u304c\u3001\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306b\u5fc5\u9808\u3068\u306a\u308b\u6587\u5b57\u5217\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u3053\u306eKey\u3068ID\u306f\u3001<strong><span style=\"text-decoration: underline;\">\u767a\u884c\u3057\u306a\u304a\u3059\u305f\u3073\u306b\u5909\u308f\u3063\u3066\u3057\u307e\u3046<\/span><\/strong>\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>GCM\u306e\u5229\u7528\u306b\u5fc5\u8981\u3068\u306a\u308b\u300cAPI\u30ad\u30fc\u300d\u306e\u53d6\u5f97\u624b\u9806\u306f\u3053\u308c\u3067\u5b8c\u4e86\u3067\u3059\u3002\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u624b\u9806<\/h2>\n<p>\u3067\u306f\u6b21\u306b\u3001Android\u30a2\u30d7\u30ea\u3067\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e\u53d7\u4fe1\u306b\u5bfe\u5fdc\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u958b\u767a\u74b0\u5883\u306b\u306fAndroid Studio \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1>\u307e\u305a\u3001Android Studio \u3067\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/h1>\n<p>API\u30ad\u30fc\u3092\u53d6\u5f97\u3057\u305f\u3068\u304d\u306b\u6307\u5b9a\u3057\u305f\u30a2\u30d7\u30ea\u540d\u3068\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306b\u5408\u308f\u305b\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Application name\u3092\u300cPushTestApp\u300d\u3001Company Domain\u3092\u300cwebtech.co.jp\u300d\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push21.png\" alt=\"push21\" \/><\/p>\n<p>&nbsp;<\/p>\n<h1>\u30af\u30e9\u30b9\u30923\u3064\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/h1>\n<p>\u307e\u305a\u3001\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u3092\u53d6\u5f97\u3059\u308b\u30af\u30e9\u30b9\u3067\u3059\u3002<\/p>\n<p>SENDER_ID \u306b\u5148\u307b\u3069\u5165\u624b\u3057\u305f Sender ID \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>MyGcmIntentService.java:<\/p>\n<pre class=\"brush: java; gutter: true\">package jp.co.webtech.pushtestapp;\r\n\r\nimport android.app.IntentService;\r\nimport android.content.Intent;\r\nimport android.util.Log;\r\n\r\nimport com.google.android.gms.gcm.GoogleCloudMessaging;\r\nimport com.google.android.gms.iid.InstanceID;\r\n\r\n\/**\r\n * \u975e\u540c\u671f\u3067\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u3092\u53d6\u5f97\u3059\u308b\r\n *\/\r\npublic class MyGcmIntentService extends IntentService {\r\n\r\n    public static final String TAG = MyGcmIntentService.class.getSimpleName();\r\n\r\n    public static final String SENDER_ID = &quot;470359069872&quot;;\r\n\r\n    public MyGcmIntentService() {\r\n        super(&quot;MyGcmIntentService service&quot;);\r\n    }\r\n\r\n    @Override\r\n    protected void onHandleIntent(Intent intent) {\r\n        try {\r\n            InstanceID instanceID = InstanceID.getInstance(this);\r\n            \/\/GCM Registration Token\u53d6\u5f97\r\n            String token = instanceID.getToken(SENDER_ID, GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);\r\n            Log.i(TAG, &quot;GCM Registration Token: &quot; + token);\r\n        } catch (Exception e) {\r\n            Log.e(TAG, &quot;exception &quot; + e.getMessage());\r\n        }\r\n    }\r\n}<\/pre>\n<p>\u6b21\u306b\u3001\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b\u30af\u30e9\u30b9\u3067\u3059\u3002<\/p>\n<p>MyGcmListenerService.java:<\/p>\n<pre class=\"brush: java; gutter: true\">package jp.co.webtech.pushtestapp;\r\n\r\nimport android.os.Bundle;\r\nimport android.util.Log;\r\n\r\nimport com.google.android.gms.gcm.GcmListenerService;\r\n\r\n\/**\r\n * \u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u53d7\u3051\u53d6\u308a\r\n *\/\r\npublic class MyGcmListenerService extends GcmListenerService {\r\n    public static final String TAG = MyGcmIntentService.class.getSimpleName();\r\n\r\n    @Override\r\n    public void onMessageReceived(String from, Bundle data) {\r\n        super.onMessageReceived(from, data);\r\n        \/\/ \u9001\u4fe1\u5143\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u756a\u53f7\r\n        Log.v(TAG, &quot;from=&quot; + from);\r\n        \/\/ \u9001\u4fe1\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\r\n        Log.v(TAG, &quot;message=&quot; + data.get(&quot;message&quot;));\r\n    }\r\n}<\/pre>\n<p>\u6700\u5f8c\u306b\u3001\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u304c\u66f4\u65b0\u3055\u308c\u305f\u3053\u3068\u3092\u691c\u77e5\u3059\u308b\u305f\u3081\u306e\u30af\u30e9\u30b9\u3067\u3059\u3002<\/p>\n<p>\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u306f\u7aef\u672b\u306e\u518d\u8d77\u52d5\u306a\u3069\u3067\u4e0d\u5b9a\u671f\u306b\u66f4\u65b0\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001\u305d\u306e\u5834\u5408\u306f\u53d6\u5f97\u3057\u306a\u304a\u3057\u3001\u5fc5\u8981\u3067\u3042\u308c\u3070\u300c\u8a8d\u8a3c\u30ad\u30fc\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u300d\u3078\u9001\u4fe1\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>MyInstanceIDListenerService.java<\/p>\n<pre class=\"brush: java; gutter: true\">package jp.co.webtech.pushtestapp;\r\n\r\nimport android.content.Intent;\r\n\r\nimport com.google.android.gms.iid.InstanceIDListenerService;\r\n\r\n\/**\r\n * \u8b58\u5225\u30c8\u30fc\u30af\u30f3\u304c\u66f4\u65b0\u3055\u308c\u305f\r\n *\/\r\npublic class MyInstanceIDListenerService extends InstanceIDListenerService {\r\n    @Override\r\n    public void onTokenRefresh() {\r\n        super.onTokenRefresh();\r\n        \/\/ \u8b58\u5225\u30c8\u30fc\u30af\u30f3\u3092\u53d6\u5f97\u3057\u306a\u304a\u3059\r\n        Intent intent = new Intent(this, MyGcmIntentService.class);\r\n        startService(intent);\r\n    }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<h1>build.gradle \u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/h1>\n<p>\u30af\u30e9\u30b9\u30923\u3064\u8ffd\u52a0\u3057\u305f\u3089\u3001\u7d9a\u3044\u3066 build.gradle \u306e dependencies \u306b\u300ccompile &#8216;com.google.android.gms:play-services:8.4.0&#8217;\u300d\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre>dependencies {\r\n    compile fileTree(dir: &#039;libs&#039;, include: [&#039;*.jar&#039;])\r\n    testCompile &#039;junit:junit:4.12&#039;\r\n    compile &#039;com.android.support:appcompat-v7:23.1.1&#039;\r\n    compile &#039;com.google.android.gms:play-services:8.4.0&#039;    \u2190\u8ffd\u52a0\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<h1>AndroidManifest.xml \u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/h1>\n<p>AndroidManifest.xml \u306b\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3001\u30b5\u30fc\u30d3\u30b9\u3001\u30ec\u30b7\u30fc\u30d0\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30e1\u30f3\u30c8\u306e&#8221;\u2193\u2193\u2193&#8221;\u304b\u3089&#8221;\u2191\u2191\u2191&#8221;\u306e\u90e8\u5206\u304c\u8ffd\u52a0\u3057\u305f\u90e8\u5206\u306b\u306a\u308a\u307e\u3059\u3002\u3082\u3061\u308d\u3093\u30a2\u30d7\u30ea\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u3068\u30af\u30e9\u30b9\u540d\u306f\u9069\u5b9c\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;manifest package=&quot;jp.co.webtech.pushtestapp&quot;\r\n          xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;&gt;\r\n\r\n&lt;!-- \u2193\u2193\u2193\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3 --&gt;\r\n&lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; \/&gt;\r\n&lt;uses-permission android:name=&quot;com.google.android.c2dm.permission.RECEIVE&quot; \/&gt;\r\n&lt;!-- \u2191\u2191\u2191--&gt;\r\n\r\n&lt;application\r\n    android:allowBackup=&quot;true&quot;\r\n    android:icon=&quot;@mipmap\/ic_launcher&quot;\r\n    android:label=&quot;@string\/app_name&quot;\r\n    android:supportsRtl=&quot;true&quot;\r\n    android:theme=&quot;@style\/AppTheme&quot;&gt;\r\n\r\n    &lt;!-- \u2193\u2193\u2193\u30b5\u30fc\u30d3\u30b9\u3001\u30ec\u30b7\u30fc\u30d0--&gt;\r\n    &lt;service android:name=&quot;.MyGcmIntentService&quot;\/&gt;\r\n    &lt;service\r\n        android:name=&quot;.MyGcmListenerService&quot;\r\n        android:exported=&quot;false&quot; &gt;\r\n        &lt;intent-filter&gt;\r\n            &lt;action android:name=&quot;com.google.android.c2dm.intent.RECEIVE&quot; \/&gt;\r\n        &lt;\/intent-filter&gt;\r\n    &lt;\/service&gt;\r\n    &lt;service\r\n        android:name=&quot;.MyInstanceIDListenerService&quot;\r\n        android:exported=&quot;false&quot;&gt;\r\n        &lt;intent-filter&gt;\r\n            &lt;action android:name=&quot;com.google.android.gms.iid.InstanceID&quot;\/&gt;\r\n        &lt;\/intent-filter&gt;\r\n    &lt;\/service&gt;\r\n\r\n    &lt;receiver\r\n        android:name=&quot;com.google.android.gms.gcm.GcmReceiver&quot;\r\n        android:exported=&quot;true&quot;\r\n        android:permission=&quot;com.google.android.c2dm.permission.SEND&quot; &gt;\r\n        &lt;intent-filter&gt;\r\n            &lt;action android:name=&quot;com.google.android.c2dm.intent.RECEIVE&quot; \/&gt;\r\n            &lt;category android:name=&quot;jp.co.webtech.pushtestapp&quot; \/&gt;\r\n        &lt;\/intent-filter&gt;\r\n        &lt;intent-filter&gt;\r\n            &lt;action android:name=&quot;com.google.android.c2dm.intent.REGISTRATION&quot; \/&gt;\r\n            &lt;category android:name=&quot;jp.co.webtech.pushtestapp&quot; \/&gt;\r\n        &lt;\/intent-filter&gt;\r\n    &lt;\/receiver&gt;\r\n    &lt;!-- \u2191\u2191\u2191--&gt;\r\n\r\n    &lt;activity android:name=&quot;.MainActivity&quot;&gt;\r\n        &lt;intent-filter&gt;\r\n            &lt;action android:name=&quot;android.intent.action.MAIN&quot;\/&gt;\r\n\r\n            &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;\/&gt;\r\n        &lt;\/intent-filter&gt;\r\n    &lt;\/activity&gt;\r\n&lt;\/application&gt;\r\n\r\n&lt;\/manifest&gt;\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h1>\u3067\u306f\u3001\u4f5c\u6210\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/h1>\n<p>logcat\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b IntentService \u3067\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u5b9f\u884c\u3055\u308c\u3066\u53d6\u5f97\u3055\u308c\u305f\u8b58\u5225\u30c8\u30fc\u30af\u30f3(Registration Token)\u304c\u30ed\u30b0\u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>03-31 09:24:00.047 3721-3816\/jp.co.webtech.pushtestapp I\/MyGcmIntentService: GCM Registration Token: cfF7YmCvVrU:APA91bHqvpto7rfdHxi4b5Vizm1MKFWXL2avZ5suOjcCVQuLzCoRjc79ehjVUm2syaz9RbWG7mhcopAJC0TZk21YXmA-rgg6x9QTiESzcPbJhqUZLMCjHlk_iYiBIpMv8SLKsnNzyoRU<\/pre>\n<p>\u51fa\u529b\u3055\u308c\u305f &#8220;Registration Token :&#8221; \u4ee5\u964d\u306e\u6587\u5b57\u5217\u3092\u30b3\u30d4\u30fc\u3057\u3066\u63a7\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u306f\u74b0\u5883\u3054\u3068\u306b\u7570\u306a\u308b\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3067\u306f\u3001\u3053\u306e\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u3092\u4f7f\u3063\u3066\u3001\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u9001\u4fe1\u5148\u7aef\u672b\u3092\u533a\u5225\u3057\u3066\u3044\u307e\u3059\u3002\u5b9f\u969b\u306e\u904b\u7528\u6642\u306b\u306f\u3001\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u306f\u300c\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u300d\u3092\u7528\u610f\u3057\u3066\u30a2\u30d7\u30ea\u304b\u3089\u53d7\u4fe1\u3057\u3001\u7ba1\u7406\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u7d9a\u3044\u3066\u3001\u3053\u306e\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u306e\u7aef\u672b\u306b\u3001\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3067\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e\u9001\u4fe1<\/h2>\n<p>\u3067\u306f\u3001\u300c\u901a\u77e5\u9001\u4fe1\u30c4\u30fc\u30eb\u300d\u3092\u4f7f\u3063\u3066\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u3053\u3067\u8a00\u3046\u300c\u901a\u77e5\u9001\u4fe1\u30c4\u30fc\u30eb\u300d\u3068\u3044\u3046\u306e\u306f\u3001GCM\u3078\u306e\u901a\u77e5\u4f9d\u983c\u3092\u5b9f\u73fe\u3067\u304d\u308c\u3070\u3069\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3082\u69cb\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u307e\u305a\u306f\u4f8b\u3068\u3057\u3066\u3001Linux \u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089 &#8220;curl&#8221; \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u3001GCM\u3078\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3092\u4f9d\u983c\u3059\u308b\u624b\u9806\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p style=\"padding-left: 30px;\">* &#8220;curl&#8221; \u30b3\u30de\u30f3\u30c9\u306fWindows\u74b0\u5883\u3067\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u4f7f\u3048\u307e\u3059\u3002\u8208\u5473\u3042\u308b\u65b9\u306f\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u5f15\u6570\u306f\u3053\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>curl --header &quot;project_id: &lt;Sender ID&gt;&quot; --header &quot;Authorization: key=&lt;Server API Key&gt;&quot; --header &quot;Content-Type: application\/json&quot; https:\/\/gcm-http.googleapis.com\/gcm\/send -d &quot;{\\&quot;registration_ids\\&quot;:[\\&quot;&lt;Registration Token&gt;\\&quot;], \\&quot;data\\&quot;:{\\&quot;message\\&quot;:\\&quot;&lt;\u9001\u308a\u305f\u3044\u30e1\u30c3\u30bb\u30fc\u30b8&gt;\\&quot;}}&quot; -k<\/pre>\n<p>\u5b9f\u969b\u306b Server API Key, Sender ID, Registration Token \u3092\u5165\u308c\u308b\u3068\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>curl --header &quot;project_id: 470359069872&quot; --header &quot;Authorization: key=AIzaSyAm2PGhAkDMe51AwqR0RcdesRu2mGF9h5U&quot; --header &quot;Content-Type: application\/json&quot; https:\/\/gcm-http.googleapis.com\/gcm\/send -d &quot;{\\&quot;registration_ids\\&quot;:[\\&quot;cfF7YmCvVrU:APA91bHqvpto7rfdHxi4b5Vizm1MKFWXL2avZ5suOjcCVQuLzCoRjc79ehjVUm2syaz9RbWG7mhcopAJC0TZk21YXmA-rgg6x9QTiESzcPbJhqUZLMCjHlk_iYiBIpMv8SLKsnNzyoRU\\&quot;], \\&quot;data\\&quot;:{\\&quot;message\\&quot;:\\&quot;Hello GCM World\\&quot;}}&quot; -k<\/pre>\n<p>\u9001\u4fe1\u5148\u306e\u8b58\u5225\u30c8\u30fc\u30af\u30f3(Registration Token)\u304c\u8907\u6570\u3042\u308b\u5834\u5408\u306f\u30ab\u30f3\u30de\u3067\u533a\u5207\u3063\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002\u306a\u304a\u3001\u30a8\u30b9\u30b1\u30fc\u30d7\u6587\u5b57\u304c\u308f\u304b\u308a\u306b\u304f\u3044\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p style=\"padding-left: 30px;\">* \u3068\u3053\u308d\u3067\u3001\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e\u4f9d\u983c\u5148(GCM)\u306eURL\u306f\u3001\u73fe\u5728\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u3092\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u5f15\u6570\u306b\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\nhttps:\/\/gcm-http.googleapis.com\/gcm\/send<br \/>\n\u3053\u306eURL\u306f\u3001Google\u306e\u5927\u304d\u306a\u4ed5\u69d8\u5909\u66f4\u3067\u5909\u308f\u3063\u3066\u3057\u307e\u3046\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3067\u306f\u3001\u5148\u7a0b\u306eAndroid\u30a2\u30d7\u30ea\u304c\u8d77\u52d5\u3057\u3066\u3042\u308b\u72b6\u614b\u3067\u3001\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u3053\u306e\u3088\u3046\u306a\u5b9f\u884c\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<pre>{&quot;multicast_id&quot;:7625687185847865149,&quot;success&quot;:1,&quot;failure&quot;:0,&quot;canonical_ids&quot;:0,&quot;results&quot;:[{&quot;message_id&quot;:&quot;0:1459384639091038%02219117f9fd7ecd&quot;}]}<\/pre>\n<p>\u300c&#8221;success&#8221;:1\u300d\u3068\u306a\u3063\u3066\u3044\u308c\u3070\u3001GCM\u3078\u306e\u9001\u4fe1\u306f\u6210\u529f\u3067\u3059\u3002\u300c&#8221;failure&#8221;:1\u300d\u3068\u306a\u3063\u305f\u5834\u5408\u306f\u3069\u3053\u304b\u5f15\u6570\u306a\u3069\u304c\u9593\u9055\u3048\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u9001\u4fe1\u304c\u6210\u529f\u3057\u3001Android\u30a2\u30d7\u30ea\u3082\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u3066\u3044\u308c\u3070\u3001\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3067 &#8220;Hello GCM World&#8221; \u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u3092\u53d7\u4fe1\u3057\u305f\u3053\u3068\u304clogcat\u3067\u78ba\u8a8d\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<pre>03-31 09:37:18.566 3721-18992\/jp.co.webtech.pushtestapp V\/MyGcmIntentService: message=Hello GCM World<\/pre>\n<p>&nbsp;<\/p>\n<p>\u4ee5\u4e0a\u304c curl \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308b\u901a\u77e5\u958b\u59cb\u306e\u624b\u9806\u3067\u3059\u304c\u3001\u3053\u308c\u3067\u306f\u5c11\u3005\u308f\u304b\u308a\u306b\u304f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001Ruby \u3092\u4f7f\u3063\u305f\u5834\u5408\u306e\u9001\u4fe1\u30b3\u30fc\u30c9\u306e\u4f8b\u3082\u7d39\u4ecb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\u3053\u3061\u3089\u3082\u3001\u74b0\u5883\u3092\u7528\u610f\u3067\u304d\u308c\u3070Windows\u4e0a\u3067\u3082\u5b9f\u884c\u53ef\u80fd\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>gcm_send.rb:<\/p>\n<pre class=\"brush: ruby; gutter: true\">require &#039;net\/http&#039;\r\nrequire &#039;json&#039;\r\nrequire &#039;openssl&#039;\r\n\r\n#GCM\u306ePOST\u5148URL (\u5909\u66f4\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\uff01)\r\nURL_GCM               = &quot;https:\/\/gcm-http.googleapis.com\/gcm\/send&quot;\r\n\r\n#Server API\u30ad\u30fc\r\nGOOGLE_API_KEY        = &quot;AIzaSyAm2PGhAkDMe51AwqR0RcdesRu2mGF9h5U&quot;\r\n\r\n#\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u756a\u53f7(Sender ID)\r\nGOOGLE_PROJECT_NUMBER = &quot;470359069872&quot;\r\n\r\n#\u30d8\u30c3\u30c0\r\nheaders = {\r\n  &#039;project_id&#039; =&gt; GOOGLE_PROJECT_NUMBER,\r\n  &#039;Authorization&#039; =&gt; &#039;key=&#039; + GOOGLE_API_KEY,\r\n  &#039;Content-Type&#039; =&gt; &#039;application\/json&#039;\r\n}\r\n\r\n#\u9001\u4fe1\u5148\u306e\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u306e\u914d\u5217\r\nids = [\r\n  &quot;cfF7YmCvVrU:APA91bHqvpto7rfdHxi4b5Vizm1MKFWXL2avZ5suOjcCVQuLzCoRjc79ehjVUm2syaz9RbWG7mhcopAJC0TZk21YXmA-rgg6x9QTiESzcPbJhqUZLMCjHlk_iYiBIpMv8SLKsnNzyoRU&quot;,\r\n]\r\n\r\n#\u9001\u4fe1\u3059\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\r\nmessage = { &#039;message&#039; =&gt; &#039;Hello GCM!&#039; }\r\n\r\n#\u9001\u4fe1\u5185\u5bb9\u306e\u9023\u60f3\u914d\u5217\r\nbody = { &#039;registration_ids&#039; =&gt; ids, &#039;data&#039; =&gt; message }\r\n\r\n#HTTP\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u4f5c\u6210\r\nuri = URI(URL_GCM)\r\nhttp = Net::HTTP.new(uri.host, uri.port)\r\n\r\n#https\u3067\u901a\u4fe1\u3057\u307e\u3059\r\nhttp.use_ssl = true\r\n\r\n#\u8a3c\u660e\u66f8\u3092\u4f7f\u3044\u307e\u305b\u3093\r\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\r\n\r\n#POST\u30ea\u30af\u30a8\u30b9\u30c8\u30af\u30e9\u30b9\u751f\u6210\r\npost = Net::HTTP::Post.new(uri.path, headers)\r\n\r\n#\u9023\u60f3\u914d\u5217\u3092JSON\u5316\r\npost.body = body.to_json\r\n\r\n#\u9001\u4fe1\r\nresponse = http.request(post)\r\n\r\n#\u7d50\u679cJSON\u3092\u9023\u60f3\u914d\u5217\u306b\u3059\u308b\r\nresult = JSON.parse!(response.body)\r\n\r\n#\u6574\u5f62\u3057\u3066\u8868\u793a\r\nputs jj(result)\r\n\r\n#\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9\u8868\u793a\r\nputs &quot;response=#{response.code}&quot;<\/pre>\n<p>&nbsp;<\/p>\n<p>\u4ee5\u4e0a\u3067\u3059\u3002\u3044\u304b\u304c\u3067\u3057\u305f\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u4eca\u56de\u306f\u300c\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u300d\u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u306f\u5272\u611b\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u304c\u3001\u8981\u306f\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u304b\u3089\u8b58\u5225\u30c8\u30fc\u30af\u30f3\u3092\u53d7\u3051\u53d6\u3063\u3066\u7ba1\u7406\u3057\u3001\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3057\u305f\u3044\u3068\u304d\u306b\u305d\u306e\u4e00\u89a7\u3092\u751f\u6210\u3067\u304d\u308b\u3082\u306e\u3067\u3042\u308c\u3070\u3001\u4ed5\u7d44\u307f\u306f\u4f55\u3067\u3082\u304b\u307e\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u306a\u304a\u3001\u30a6\u30a7\u30d6\u30c6\u30af\u30ce\u30ed\u30b8\u3067\u306f\u3001\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3084<a title=\"Android\u30b9\u30de\u30db\u306b\u304a\u3051\u308b\u300c\u6b69\u6570\u30ab\u30a6\u30f3\u30c8\u300d\u7cbe\u5ea6\u5411\u4e0a\u3078\u306e\u6b69\u307f\" href=\"https:\/\/www.webtech.co.jp\/blog\/os\/android\/7987\/\">\u6b69\u6570\u8a08\u6e2c\u30a8\u30f3\u30b8\u30f3<\/a>\u306a\u3069\u3092\u4f7f\u3063\u305f\u3001\u300c\u5065\u5eb7\u4fc3\u9032\u300d\u300c\u898b\u5b88\u308a\u300d\u3092\u76ee\u7684\u3068\u3057\u305f<a title=\"\u5730\u57df\u4f4f\u6c11\u306e\u5065\u5eb7\u4fc3\u9032\u306b\u8ca2\u732e \u5065\u5eb7\u5897\u9032\u30a2\u30d7\u30ea\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u5236\u4f5c\" href=\"https:\/\/www.webtech.co.jp\/apps\/\">\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u306e\u63d0\u6848\u30fb\u958b\u767a\u3092<\/a>\u884c\u3063\u3066\u304a\u308a\u307e\u3059\u3002\u3054\u8208\u5473\u304c\u3042\u308a\u307e\u3057\u305f\u3089\u662f\u975e\u304a\u6c17\u8efd\u306b\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>R&amp;D\u90e8\u306e\u4f50\u85e4\u4f38\u3067\u3059\u3002 \u5148\u65e5\u3001\u958b\u767a\u4e2d\u306eAndroid\u30a2\u30d7\u30ea\u3067\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u6a5f\u80fd\u306b\u5bfe\u5fdc\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u3068\u304d\u306b\u5fc5\u8981\u306a\u300cAPI\u30ad\u30fc\u300d\u306e\u53d6\u5f97\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\u304c\u308f\u304b\u308a\u306b\u304f\u304f\u3001\u3068\u3066\u3082\u82e6\u52b4\u3057\u307e\u3057\u305f\u3002 Android\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e &hellip; <a href=\"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":26,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[584],"tags":[44,57,45,678,653],"class_list":["post-8951","post","type-post","status-publish","format-standard","hentry","category-android","tag-android","tag-google","tag-45","tag-678","tag-653"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067 - OPTPiX Labs Blog<\/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.webtech.co.jp\/blog\/os\/android\/8951\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067 - OPTPiX Labs Blog\" \/>\n<meta property=\"og:description\" content=\"R&amp;D\u90e8\u306e\u4f50\u85e4\u4f38\u3067\u3059\u3002 \u5148\u65e5\u3001\u958b\u767a\u4e2d\u306eAndroid\u30a2\u30d7\u30ea\u3067\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u6a5f\u80fd\u306b\u5bfe\u5fdc\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u3068\u304d\u306b\u5fc5\u8981\u306a\u300cAPI\u30ad\u30fc\u300d\u306e\u53d6\u5f97\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\u304c\u308f\u304b\u308a\u306b\u304f\u304f\u3001\u3068\u3066\u3082\u82e6\u52b4\u3057\u307e\u3057\u305f\u3002 Android\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e &hellip; \u7d9a\u304d\u3092\u8aad\u3080 &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/\" \/>\n<meta property=\"og:site_name\" content=\"OPTPiX Labs Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/OPTPiX\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-17T03:07:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-16T00:35:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push02-1.png\" \/>\n<meta name=\"author\" content=\"cri_shima\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@optpix\" \/>\n<meta name=\"twitter:site\" content=\"@optpix\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"cri_shima\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"6\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/\"},\"author\":{\"name\":\"cri_shima\",\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/#\\\/schema\\\/person\\\/ec280eba287a293130b38c674a55ba6b\"},\"headline\":\"Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067\",\"datePublished\":\"2016-05-17T03:07:07+00:00\",\"dateModified\":\"2020-06-16T00:35:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/\"},\"wordCount\":219,\"publisher\":{\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/03\\\/push02-1.png\",\"keywords\":[\"Android\",\"Google\",\"\u30a2\u30d7\u30ea\",\"\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\",\"\u901a\u77e5\"],\"articleSection\":[\"Android\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/\",\"url\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/\",\"name\":\"Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067 - OPTPiX Labs Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/03\\\/push02-1.png\",\"datePublished\":\"2016-05-17T03:07:07+00:00\",\"dateModified\":\"2020-06-16T00:35:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/03\\\/push02-1.png\",\"contentUrl\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/03\\\/push02-1.png\",\"width\":1280,\"height\":768},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/os\\\/android\\\/8951\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/\",\"name\":\"OPTPiX Labs Blog\",\"description\":\"\u30a6\u30a7\u30d6\u30c6\u30af\u30ce\u30ed\u30b8\u516c\u5f0f\u30d6\u30ed\u30b0\u300c\u753b\u50cf\u5909\u63db\u306e\u77e5\u6075\u888b\u300d\u306f\u540d\u79f0\u304c\u300cOPTPiX Labs Blog\u300d\u306b\u5909\u308f\u308a\u307e\u3057\u305f\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793e\u30a6\u30a7\u30d6\u30c6\u30af\u30ce\u30ed\u30b8\",\"url\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/wt_logo_schema-1.png\",\"contentUrl\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/wt_logo_schema-1.png\",\"width\":512,\"height\":512,\"caption\":\"\u682a\u5f0f\u4f1a\u793e\u30a6\u30a7\u30d6\u30c6\u30af\u30ce\u30ed\u30b8\"},\"image\":{\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/OPTPiX\",\"https:\\\/\\\/x.com\\\/optpix\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.webtech.co.jp\\\/blog\\\/#\\\/schema\\\/person\\\/ec280eba287a293130b38c674a55ba6b\",\"name\":\"cri_shima\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067 - OPTPiX Labs Blog","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.webtech.co.jp\/blog\/os\/android\/8951\/","og_locale":"ja_JP","og_type":"article","og_title":"Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067 - OPTPiX Labs Blog","og_description":"R&amp;D\u90e8\u306e\u4f50\u85e4\u4f38\u3067\u3059\u3002 \u5148\u65e5\u3001\u958b\u767a\u4e2d\u306eAndroid\u30a2\u30d7\u30ea\u3067\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u6a5f\u80fd\u306b\u5bfe\u5fdc\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u3068\u304d\u306b\u5fc5\u8981\u306a\u300cAPI\u30ad\u30fc\u300d\u306e\u53d6\u5f97\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\u304c\u308f\u304b\u308a\u306b\u304f\u304f\u3001\u3068\u3066\u3082\u82e6\u52b4\u3057\u307e\u3057\u305f\u3002 Android\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u306e &hellip; \u7d9a\u304d\u3092\u8aad\u3080 &rarr;","og_url":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/","og_site_name":"OPTPiX Labs Blog","article_publisher":"https:\/\/www.facebook.com\/OPTPiX","article_published_time":"2016-05-17T03:07:07+00:00","article_modified_time":"2020-06-16T00:35:40+00:00","og_image":[{"url":"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push02-1.png","type":"","width":"","height":""}],"author":"cri_shima","twitter_card":"summary_large_image","twitter_creator":"@optpix","twitter_site":"@optpix","twitter_misc":{"\u57f7\u7b46\u8005":"cri_shima","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"6\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/#article","isPartOf":{"@id":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/"},"author":{"name":"cri_shima","@id":"https:\/\/www.webtech.co.jp\/blog\/#\/schema\/person\/ec280eba287a293130b38c674a55ba6b"},"headline":"Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067","datePublished":"2016-05-17T03:07:07+00:00","dateModified":"2020-06-16T00:35:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/"},"wordCount":219,"publisher":{"@id":"https:\/\/www.webtech.co.jp\/blog\/#organization"},"image":{"@id":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push02-1.png","keywords":["Android","Google","\u30a2\u30d7\u30ea","\u30d7\u30c3\u30b7\u30e5\u901a\u77e5","\u901a\u77e5"],"articleSection":["Android"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/","url":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/","name":"Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067 - OPTPiX Labs Blog","isPartOf":{"@id":"https:\/\/www.webtech.co.jp\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/#primaryimage"},"image":{"@id":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push02-1.png","datePublished":"2016-05-17T03:07:07+00:00","dateModified":"2020-06-16T00:35:40+00:00","breadcrumb":{"@id":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/#primaryimage","url":"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push02-1.png","contentUrl":"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2016\/03\/push02-1.png","width":1280,"height":768},{"@type":"BreadcrumbList","@id":"https:\/\/www.webtech.co.jp\/blog\/os\/android\/8951\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/www.webtech.co.jp\/blog\/"},{"@type":"ListItem","position":2,"name":"Android\u30a2\u30d7\u30ea\u306e\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u5bfe\u5fdc\u306e\u8981\u70b9 \uff0d API\u30ad\u30fc\u53d6\u5f97\u304b\u3089\u52d5\u4f5c\u78ba\u8a8d\u307e\u3067"}]},{"@type":"WebSite","@id":"https:\/\/www.webtech.co.jp\/blog\/#website","url":"https:\/\/www.webtech.co.jp\/blog\/","name":"OPTPiX Labs Blog","description":"\u30a6\u30a7\u30d6\u30c6\u30af\u30ce\u30ed\u30b8\u516c\u5f0f\u30d6\u30ed\u30b0\u300c\u753b\u50cf\u5909\u63db\u306e\u77e5\u6075\u888b\u300d\u306f\u540d\u79f0\u304c\u300cOPTPiX Labs Blog\u300d\u306b\u5909\u308f\u308a\u307e\u3057\u305f\u3002","publisher":{"@id":"https:\/\/www.webtech.co.jp\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webtech.co.jp\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.webtech.co.jp\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793e\u30a6\u30a7\u30d6\u30c6\u30af\u30ce\u30ed\u30b8","url":"https:\/\/www.webtech.co.jp\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.webtech.co.jp\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2021\/01\/wt_logo_schema-1.png","contentUrl":"https:\/\/www.webtech.co.jp\/blog\/wp-content\/uploads\/2021\/01\/wt_logo_schema-1.png","width":512,"height":512,"caption":"\u682a\u5f0f\u4f1a\u793e\u30a6\u30a7\u30d6\u30c6\u30af\u30ce\u30ed\u30b8"},"image":{"@id":"https:\/\/www.webtech.co.jp\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/OPTPiX","https:\/\/x.com\/optpix"]},{"@type":"Person","@id":"https:\/\/www.webtech.co.jp\/blog\/#\/schema\/person\/ec280eba287a293130b38c674a55ba6b","name":"cri_shima"}]}},"_links":{"self":[{"href":"https:\/\/www.webtech.co.jp\/blog\/wp-json\/wp\/v2\/posts\/8951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webtech.co.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webtech.co.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webtech.co.jp\/blog\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webtech.co.jp\/blog\/wp-json\/wp\/v2\/comments?post=8951"}],"version-history":[{"count":0,"href":"https:\/\/www.webtech.co.jp\/blog\/wp-json\/wp\/v2\/posts\/8951\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.webtech.co.jp\/blog\/wp-json\/wp\/v2\/media?parent=8951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webtech.co.jp\/blog\/wp-json\/wp\/v2\/categories?post=8951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webtech.co.jp\/blog\/wp-json\/wp\/v2\/tags?post=8951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}