{"id":521,"date":"2016-11-27T07:59:32","date_gmt":"2016-11-26T22:59:32","guid":{"rendered":"http:\/\/blue-bear.jp\/kb\/?p=521"},"modified":"2016-11-27T07:59:32","modified_gmt":"2016-11-26T22:59:32","slug":"androidfirebase-%e4%b8%80%e5%ba%a6%e3%81%a0%e3%81%91db%e3%81%8b%e3%82%89%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80","status":"publish","type":"post","link":"https:\/\/blue-bear.jp\/kb\/androidfirebase-%e4%b8%80%e5%ba%a6%e3%81%a0%e3%81%91db%e3%81%8b%e3%82%89%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80\/","title":{"rendered":"[android][firebase] \u4e00\u5ea6\u3060\u3051DB\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080"},"content":{"rendered":"<h2>\u4e00\u5ea6\u3060\u3051DB\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080<\/h2>\n<p>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/p>\n<pre>\r\nFirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\/\/UserInfo\r\nDatabaseReference ref = FirebaseDatabase.getInstance().getReference());\r\n\r\n        ref.child(\"user\").addListenerForSingleValueEvent(new ValueEventListener() {\r\n            @Override\r\n            public void onDataChange(DataSnapshot snapshot) {\r\n                if (snapshot.hasChild(\"user\")) {\r\n                    for (DataSnapshot child : snapshot.getChildren()) {\r\n                        \/\/\u30c7\u30fc\u30bf\u53d6\u5f97\u5f8c\u306e\u51e6\u7406\r\n                    }\r\n                }\r\n            }\r\n            \/\/\u8aad\u307f\u8fbc\u307f\u30a8\u30e9\u30fc\u6642\r\n            @Override\r\n            public void onCancelled(DatabaseError databaseError) {\r\n                Log.w(MathConstants.TAG, \"loadPost:onCancelled\", databaseError.toException());\r\n                \/\/ \u51e6\u7406\r\n            }\r\n        });\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u5ea6\u3060\u3051DB\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080 \u30b5\u30f3\u30d7<\/p>\n","protected":false},"author":1,"featured_media":383,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[36],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/521"}],"collection":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/comments?post=521"}],"version-history":[{"count":1,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/521\/revisions"}],"predecessor-version":[{"id":522,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/521\/revisions\/522"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/media\/383"}],"wp:attachment":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/media?parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/categories?post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/tags?post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}