Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Firebaseを使ってみた
Search
Katsuya Kato
February 24, 2016
Technology
0
49
Firebaseを使ってみた
関西モバイルアプリ研究会 #11 資料
Katsuya Kato
February 24, 2016
Tweet
Share
More Decks by Katsuya Kato
See All by Katsuya Kato
複業メンバーと共に創るカウシェ
katsuyax
0
720
AndroidThingsとFirebaseで始めるホームセキュリティ / Android Things Home Security
katsuyax
2
5.3k
WWDCでこの先生きのこるには / WWDC2017
katsuyax
0
100
watchOS3の新機能 / watchos3
katsuyax
0
94
iPhone(iOS)のアプリ内課金 / in app purchase
katsuyax
0
110
Other Decks in Technology
See All in Technology
フィッシュボウルのやり方 / How to do a fishbowl
pauli
2
380
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
2.2k
MariaDB Connector/C のcaching_sha2_passwordプラグインの仕様について
boro1234
0
1k
SREが取り組むデプロイ高速化 ─ Docker Buildを最適化した話
capytan
0
140
2025-12-27 Claude CodeでPRレビュー対応を効率化する@機械学習社会実装勉強会第54回
nakamasato
4
990
M&Aで拡大し続けるGENDAのデータ活用を促すためのDatabricks権限管理 / AEON TECH HUB #22
genda
0
240
MySQLのSpatial(GIS)機能をもっと充実させたい ~ MyNA望年会2025LT
sakaik
0
120
AgentCore BrowserとClaude Codeスキルを活用した 『初手AI』を実現する業務自動化AIエージェント基盤
ruzia
7
1.5k
ペアーズにおけるAIエージェント 基盤とText to SQLツールの紹介
hisamouna
2
1.7k
SQLだけでマイグレーションしたい!
makki_d
0
1.2k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.9k
日本Rubyの会: これまでとこれから
snoozer05
PRO
6
240
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
89
The Language of Interfaces
destraynor
162
25k
Done Done
chrislema
186
16k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
310
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
120
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
100
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
73
The untapped power of vector embeddings
frankvandijk
1
1.5k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
170
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
260
Transcript
'JSFCBTFΛͬͯΈͨ ,BUTVZB,BUP
ࣗݾհ w Ճ౻উ w ΈࠐΈۀք͔ΒϞόΠϧۀքʹ ͖ͬͯͯ w ڈʹຊग़͠·ͨ͠
'JSFCBTFΛ ͬͯΈͨΛ͠·͢
'JSFCBTFͱ w ݄ʹ(PPHMFʹങऩ͞Εͨ#BB4ʢ#BDLFOEBTB 4FSWJDFʣ w ετϨʔδɺϢʔβʔཧͳͲΞϓϦέʔγϣϯͷόοΫΤϯ υͱͯ͠ඞཁͱͳΔػೳΛαʔϏεΛఏڙͯ͘͠ΕΔ w νϟοτΞϓϦͷΑ͏ͳϦΞϧλΠϜʹσʔλΛಉظ͢Δඞཁ ͕͋ΔαʔϏεʹద͍ͯ͠Δ
w /P42-ɻ+40/ΦϒδΣΫτͱͯ͠อ࣋͞ΕΔ w ΦϑϥΠϯͷॲཧ͍͍ײ͡ʹͬͯ͘ΕΔʢΒ͍͠ʣ
ͳͥ'JSFCBTF͔
ͳͥ'JSFCBTFͳͷ͔ w J04"OESPJEͰखܰʹ͏͜ͱ͕Ͱ͖ΔͷΛ ୳ͯͨ͠ w ಥવͷ1BSTFDPNऴྃͷ͓Βͤ w ͪΐͬͱ͏͚ͩͳΒֶशίετ͕ͯ͘ࡁΉ ͷͷΛɾɾɾ
ͬͯΈΔ
ΞΧϯτొ w IUUQTXXXpSFCBTFDPN
ཧը໘
ཧը໘ Ճ͞Εͨσʔλ͕ ͜͜ʹදࣔ͞Ε͍ͯ͘
νϟοτΞϓϦΛ ࡞ͬͯΈΔ
None
4%,ͷಋೖ
$PDPB1PET
pod 'Firebase'
ॳظઃఆˍಡΈॻ͖
ॳظઃఆ firebaseRef = Firebase(url:"https:// kanmoba.firebaseio.com/chat/message")
σʔλͷॻ͖ࠐΈ let messageData = ["name":nameTextField.text!, "message": messageTextField.text!] firebaseRef.childByAutoId().setValue(messageData) /4%JDUJPOBSZͰॻ͖ࠐΉσʔλΛ४උ *%ΛϥϯμϜͰੜ͢Δϝιου
σʔλͷॻ͖ࠐΈʢૹ৴ʣ
ཧը໘ͰݟͯΈΔ
σʔλͷಡΈग़͠ firebaseRef.observeEventType(.ChildAdded, withBlock: { snapshot in if let name =
snapshot.value.objectForKey("name") as? String, message = snapshot.value.objectForKey("message") as? String { self.textView.text = "\(self.textView.text)\n\(name) : \(message)" } }) ࢹ͢ΔΠϕϯτΛొ ࢠ͕Ճ͞Εͨͱ͖Λࢹ͢Δ LFZΛࢦఆͯ͠ΛಘΔ
σϞ
None
͘Β͍Ͱ Ͱ͖ͯ͠·ͬͨͷͰ
"OESPJEɾɾɾ
4%,
(SBEMF
HSBEMFCVMJE dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.firebase:firebase-client-android:2.5.2+' }
HSBEMFCVMJE packagingOptions { exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE-FIREBASE.txt' exclude 'META-INF/NOTICE' }
ॳظઃఆˍಡΈॻ͖
ͦͷલʹ1FSNJTTJPO <uses-permission android:name="android.permission.INTERNET" />
ॳظઃఆ Firebase.setAndroidContext(this); firebaseRef = new Firebase("https://kanmoba.firebaseio.com/ chat/message");
σʔλͷॻ͖ࠐΈ HashMap<String, String> post = ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹnew HashMap<String, String>(); post.put("name", nameEditText.getText().toString());
post.put("message", messageEditText.getText().toString()); firebaseRef.push().setValue(post) DIJME#Z"VUP*Eϝιου͕ ແ͔ͬͨɾɾɾ
σʔλͷಡΈग़͠ firebaseRef.addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(DataSnapshot dataSnapshot, String
s) { HashMap hash = (HashMap)dataSnapshot.getValue(); textView.setText(textView.getText() + ɹɹɹɹɹɹɹɹɹɹ ɹɹɹɹ"\n" + hash.get("name") + " : " + ɹɹɹɹɹɹɹɹɹɹɹɹɹɹ hash.get("message")); } } ϦεφʔΛొ
σϞ
None
ͦͷଞؾʹͳΔͱ͜ΖΛ
όΠφϦʁ w #"4&Τϯίʔυ͢Ε0,
Ձ֨
ηΩϡϦςΟ w ʮ3VMFTʯΛઃఆ͢Δ͜ͱͰΞΫηε੍ݶ͕Ͱ͖Δ
σʔλͷαΠζΛ੍ݶ
ϩάΠϯ͍ͯ͠ΔਓͷΈڐՄ
ؾʹͳΔ͜ͱ w σʔλ͕૿͑ͨ࣌ʹ͕͘ͳΒͳ͍͔ʁ w 'JSFCBTFʹ164)৴ػೳ͕ແ͍ w 1FSTFΛϗεςΟϯάͨ͠ํ͕ͬͺΓྑ͍ʁ w Φεεϝͷ#BB4͕Γ͍ͨ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠