Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
お金🤑をかけずにフィードバックフォームを構築しちゃう💪お話
Search
ayatk
March 31, 2018
Programming
2
1.2k
お金🤑をかけずにフィードバックフォームを構築しちゃう💪お話
Google Formsでフィードバックフォームを作っちゃおうってお話を2018年3月31日のLT会でやりました
ayatk
March 31, 2018
Tweet
Share
More Decks by ayatk
See All by ayatk
チーム開発 @ GitHub
ayatk
2
540
Android開発における自動化のすゝめ
ayatk
5
900
Other Decks in Programming
See All in Programming
선언형 UI에서의 상태관리
l2hyunwoo
0
200
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1k
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
210
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
1k
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
1
290
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
8
2k
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
350
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
160
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
570
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
740
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
We Have a Design System, Now What?
morganepeng
51
7.3k
Agile that works and the tools we love
rasmusluckow
328
21k
Side Projects
sachag
452
42k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Building Applications with DynamoDB
mza
91
6.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
GitHub's CSS Performance
jonrohan
1031
460k
Transcript
͓ۚΛ͔͚ͣʹ ϑΟʔυόοΫϑΥʔϜΛ ߏஙͪ͠Ό͏͓ @ayatk 2018/03/31
͜Μͳײ͡ͷਓ͕λʔήοτ • ࡞ͬͨΞϓϦׂ͕ͱμϯϩʔυ͞Ε͖ͯͨ(200ͱ ͔)͚ͲϢʔβʔ͔ΒͷϑΟʔυόοΫ͕গͳ͍ • ϑΟʔυόοΫͷͨΊʹ͍߹ΘͤϑΥʔϜతͳ ͷΛ࡞Γ͍͚ͨͲ͓͕ۚͳ͍ʂʂʂ • ΞϓϦͷຊ࣭͡Όͳ͍ͷͰͦΜͳʹ࿑ྗΛ͔͚ͨ͘ ͳ͍
ͦΜͳ͋ͳͨʹ!!!!!
ɹɹGoogle Forms ͕͋ΔΜͰ͢Α!!!
Google Forms ͬͯ͜Μͳͭ
• ΠϕϯτͷΞϯέʔτͩͬͨΓΛ؆୯ʹ࡞Ε ͯ؆୯ʹ৴Ͱ͖Δͭ • spreadsheetͰूܭ؆୯ • ཁ͢ΔʹGOD Google Forms ͬͯ͜Μͳͭ
࣮Google FormsɺURLΛ ୟ͍ͯճ͢Δ͜ͱՄೳ
https://docs.google.com/forms/d/e/ 1FAIpQLSeE52pcZ3cNRGTmDIdVDGE KBQlD-YOo62_fCh1Q1OXpnEvUmQ/ formResponse?entry. 134763060=%E3%81%BB%E3%81%9 2%E3%81%BB%E3%81%92%E3%81% BB%E3%81%92%E3%81%BB%E3%81 %92%E3%81%BB%E3%81%92 Let’s ΞΫηε
None
ճͷฤूը໘ΛݟΔͱʁ ͖ͬ͞ૹͬͨͭ
Կهೖͯ͠ͳ͍ͷʹճ͕ ه͞Εͯ͠·ͬͨ…
͜ΕΛAndroidʹΈࠐΊ λμͰαʔόϨεͳ ͍߹ΘͤγεςϜ͕Ͱ͖Δ
Δ͔͠Ͷ͐!!!!
࣮ࡍʹ࡞͍͖ͬͯ·͠ΐ͍
ϑΥʔϜΛ࡞Δ
ϑΥʔϜΛ࡞Δ • ͱΓ͋͑ͣϑΥʔϜΛ࡞Βͳ͖Ό͕࢝·Βͳ͍ • ϑΥʔϜϢʔβ͕ݟΔͷͰͳ͍ • ߥΒ͠ରࡦͷͨΊͷIPͩͬͨΓUAͩͬͨΓΛؚΊͯ ྑ͍ • ͨͩ͠ݸਓΛಛఆͰ͖ͳ͍ৗࣝͷൣғʹ͢Δ͜ͱʂʂ
(͍ͥͬͬͬͬͬͨʹి൪߸ύεϫʔυͱ͔ऩू͠ͳ͍)
None
࡞ͬͨ
͋ͷURLͲ͏ͬͯ ੜ͢Δͷʁ
A.ʮࣄલೖྗͨ͠URLΛऔಘʯ Ͱऔͬͯ͜ΕΔ
ͭ͜
URLΛੜ͢Δ
ʮࣄલೖྗͨ͠URLΛऔಘʯ ΛΫϦοΫ͠ɺదʹจࣈΛ ೖΕΔ
None
URLΛੜ͢Δ • ԼͷϦϯΫΛऔಘΛΫϦοΫ͢ΔͱɺԼʹʮϦ ϯΫΛίϐʔʯͱ͍͏ΫϦοΫͰ͖Δͷ͔Ͱ ͖ͳ͍ͷ͔Θ͔Βͳ͍Կ͔͕ग़ͯ͘ΔͷͰɺ ΫϦοΫ͢Δ
URLΛੜ͢Δ • ίϐʔ͢ΔͱҎԼͷΑ͏ͳURL͕Ͱ͖Δ https://docs.google.com/forms/d/e/ 1FAIpQLSdS6NK- K7HQ2xr8YqNWC3pOyf0WwbUxR7stpiux_H MmgdP3FA/viewform?usp=pp_url&entry. 2091053327=aaaa&entry. 682069554=wei&entry. 1656816265=A&entry.1013490606=hoo
URLղઆͷίʔφʔ • େࣄͳͷҎԼͷ3ͭͷཁૉ • ϑΥʔϜࣗମͷURL https://docs.google.com/forms/d/e/<ID>/ • ϑΥʔϜʹରͯ͠ͲͷΑ͏ͳૢ࡞Λ͢Δͷ͔ /<ID>/viewform •
ΫΤϦύϥϝʔλ /<ID>/viewform?entry.xxxx=hoge&entry.xxx=…
URLղઆͷίʔφʔ • ϑΥʔϜʹରͯ͠ͷૢ࡞ͰΑ͘ݟΔͷ͕ • viewform • edit • formResponse •
ࠓճ͍ͭ͜Λ͏
URLղઆͷίʔφʔ • ΫΤϦύϥϝʔλ • entry.xxxxͱͳΜͳͷ͔ • ֤ೖྗϑΥʔϜΛද͢ID • ׂͱϥϯμϜͬΆ͍ •
DevToolͰɺinputλάͷnameΛݟͯ֬ೝ͕Ͱ͖Δ • entry.xxxxʹೖΕ͍ͨจࣈྻબࢶͷจࣈྻΛURLΤϯίʔυͯ͠ ϦΫΤετΛ͛Δͱ͍͍ײ͡ʹͰ͖Δ
Androidʹ࣮͢Δ
Androidʹ࣮͢Δ • URLϕʔεͰͷճΫΤϦύϥϝʔλ͚ͩͰͳ ͘ɺPOSTϝιουͷϦΫΤετϘσΟͰͤΔ • POST͕ਖ਼نͷ࣮ͬΆ͍ • Δ͜ͱϕʔεͷ࣮ͱͯ͠POSTͷํ͕ҙຯత ʹ͋ͬͯͦ͏
Androidʹ࣮͢Δ • ͜Μͳײ͡ͷΛࢦ͢ • ViewΛ࡞Δͷ͕ͩΔ͍ͷ Ͱػೳ࠷খݶ
Service Interface interface FormService { @POST(“/forms/d/e/<Google-form-ID>/formResponse”) @FormUrlEncoded fun postForm( @Field("entry.2091053327")
hoge: String, @Field("entry.682069554") huga: String, // దʹIDݟͳ͕Β૿ͯ͠ཉ͍͠ ..... ): Single<Response<Void>> }
Form Client object FormClient { val service: FormService = Retrofit
.Builder() .client(OkHttpClient.Builder().build()) .baseUrl("https://docs.google.com/") .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .build() .create(FormService::class.java) }
࣮͢Δը໘ͷߏ Element: EditText ID: form Element: Button ID: submit
Main Activity override fun onCreate() { RxTextView.textChanges(form) .map { it.isNotBlank()
} .subscribe({ submit.isEnabled = it }) submit.setOnClickListener { FormClient.service .postForm(form.text.toString()) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe({ /* ͳΜ͔৭ʑ͢Δ */}) .addTo(compositeDisposable) } }
DEEMMMMO
Google FormsͰ շదͳαʔόϨεڥΛ ࡞ͬͯߦ͖·ͬ͠ΐ͍
αϯϓϧ࡞ͬͨͷͰݟͯ https://github.com/ayatk/ google-form
ऴΘΓ