Submit Search
Upload
GeliPayを支える技術
•
2 likes
•
1,726 views
Yusei Nishiyama
Follow
Open Hack Day Japan 2で開発した、GeliPayの解説(クライアント側)。
Read less
Read more
Technology
Report
Share
Report
Share
1 of 25
Download Now
Download to read offline
Recommended
芸者東京とScala〜おみせやさんから脳トレクエストまでの軌跡〜
芸者東京とScala〜おみせやさんから脳トレクエストまでの軌跡〜
scalaconfjp
Open Hack Day Japan 2 (iBencon)
Open Hack Day Japan 2 (iBencon)
Yusei Nishiyama
Video Editing in iOS
Video Editing in iOS
Yusei Nishiyama
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
More Related Content
Recently uploaded
バイオリンの運弓動作計測による初心者と経験者の差異分析
バイオリンの運弓動作計測による初心者と経験者の差異分析
sugiuralab
JAWS DAYS 2024 E-3 ランチにまつわるちょっといい話 〜給食がない町の小中学生に温かい昼食を〜
JAWS DAYS 2024 E-3 ランチにまつわるちょっといい話 〜給食がない町の小中学生に温かい昼食を〜
Naomi Yamasaki
00001_test_automation_portfolio_20240313
00001_test_automation_portfolio_20240313
ssuserf8ea02
SIG-AUDIO 2024 Vol.02 オンラインセミナー 「必殺使音人(ひっさつしおとにん)カットシーンを成敗せよ」
SIG-AUDIO 2024 Vol.02 オンラインセミナー 「必殺使音人(ひっさつしおとにん)カットシーンを成敗せよ」
IGDA Japan SIG-Audio
これからはじめるAnsible - Ansible Night Tokyo 2024
これからはじめるAnsible - Ansible Night Tokyo 2024
Hideki Saito
キャラで動かすGPT ~GPTsでどんな感じに作っているとか考えていることとか~
キャラで動かすGPT ~GPTsでどんな感じに作っているとか考えていることとか~
honeshabri
キンドリル_ネットワーク自動化成熟度診断サービス ご紹介資料 2024年3月版
キンドリル_ネットワーク自動化成熟度診断サービス ご紹介資料 2024年3月版
Takayuki Nakayama
AWS_Bedrock入門 このスライドは2024/03/08の勉強会で発表されたものです。
AWS_Bedrock入門 このスライドは2024/03/08の勉強会で発表されたものです。
iPride Co., Ltd.
The 86th National Convention of IPSJ (Student Encouragement Award))
The 86th National Convention of IPSJ (Student Encouragement Award))
yoshidakids7
チームで開発するための環境を整える
チームで開発するための環境を整える
onozaty
IGDA Japan SIG Audio #22 オンラインセミナー VRの知る.pdf
IGDA Japan SIG Audio #22 オンラインセミナー VRの知る.pdf
IGDA Japan SIG-Audio
AWS Lambdaと AWS API Gatewayを使ったREST API作り
AWS Lambdaと AWS API Gatewayを使ったREST API作り
iPride Co., Ltd.
Recently uploaded
(12)
バイオリンの運弓動作計測による初心者と経験者の差異分析
バイオリンの運弓動作計測による初心者と経験者の差異分析
JAWS DAYS 2024 E-3 ランチにまつわるちょっといい話 〜給食がない町の小中学生に温かい昼食を〜
JAWS DAYS 2024 E-3 ランチにまつわるちょっといい話 〜給食がない町の小中学生に温かい昼食を〜
00001_test_automation_portfolio_20240313
00001_test_automation_portfolio_20240313
SIG-AUDIO 2024 Vol.02 オンラインセミナー 「必殺使音人(ひっさつしおとにん)カットシーンを成敗せよ」
SIG-AUDIO 2024 Vol.02 オンラインセミナー 「必殺使音人(ひっさつしおとにん)カットシーンを成敗せよ」
これからはじめるAnsible - Ansible Night Tokyo 2024
これからはじめるAnsible - Ansible Night Tokyo 2024
キャラで動かすGPT ~GPTsでどんな感じに作っているとか考えていることとか~
キャラで動かすGPT ~GPTsでどんな感じに作っているとか考えていることとか~
キンドリル_ネットワーク自動化成熟度診断サービス ご紹介資料 2024年3月版
キンドリル_ネットワーク自動化成熟度診断サービス ご紹介資料 2024年3月版
AWS_Bedrock入門 このスライドは2024/03/08の勉強会で発表されたものです。
AWS_Bedrock入門 このスライドは2024/03/08の勉強会で発表されたものです。
The 86th National Convention of IPSJ (Student Encouragement Award))
The 86th National Convention of IPSJ (Student Encouragement Award))
チームで開発するための環境を整える
チームで開発するための環境を整える
IGDA Japan SIG Audio #22 オンラインセミナー VRの知る.pdf
IGDA Japan SIG Audio #22 オンラインセミナー VRの知る.pdf
AWS Lambdaと AWS API Gatewayを使ったREST API作り
AWS Lambdaと AWS API Gatewayを使ったREST API作り
Featured
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
Introduction to C Programming Language
Introduction to C Programming Language
Simplilearn
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
Palo Alto Software
Featured
(20)
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
ChatGPT webinar slides
ChatGPT webinar slides
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Introduction to C Programming Language
Introduction to C Programming Language
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
GeliPayを支える技術
1.
GeliPayを支える技術 如何にして我々は便所から人を追放したか その理論と実践
2.
自己紹介 name: 西山勇世 twitter: @yuseinishiyama blog:
http://yuseinishiyama.com • iOSアプリケーション開発者。 • Findaysという動画編集アプリを開発しています。 • Unityも少々。ARとか。 • Emacs!Emacs!Emacs! • (Lisp(LispLispLispLisp)) 神聖なるRMS
3.
GeliPayとは という「クソ」アプリ。Open Hack Day
Japan 2 で明和電機賞という意味深な賞をいただきました。
4.
勝因 • 審査員のカラーにあわせ ること。 • 以上。
5.
GeliPayを支える技術
6.
ありません • ただのジオフェンシングだし… • 昨年末ぐらいに流行ってたし… • 何を今更とバカにされるの怖いし辛い… • 傷つきたくないヨ(>_<)
7.
頑張ります
8.
やったこと • iBeaconの検出。 • iBeacon領域内の滞在時間の計測。 • サーバーサイド(Heroku+Rails)との通信。 • 音声合成。 • PayPalでの課金処理。 • 次々出てくる食べ物の処理(ご馳走様でした)。
9.
バックグラウンド処理
10.
Capabilities
11.
音声再生(バックグラウンド) - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary
*)launchOptions { AVAudioSession *audioSession = [AVAudioSession sharedInstance]; [audioSession setCategory:AVAudioSessionCategoryPlayback error:nil]; [audioSession setActive:YES error:nil]; . . . }
12.
Local Notification UILocalNotification *localNotification
= [[UILocalNotification alloc] init]; [localNotification setAlertBody:@"hoge"]; [localNotification setSoundName:UILocalNotificationDefaultSoundName]; [[UIApplication sharedApplication] presentLocalNotificationNow:localNotification];
13.
注意 • フォアグラウンドでLocal Notificationを通知し ても無視される。 • フォアグラウンド時のLocal Notificationは AppDelegate内のコールバックで受け取り、そ こで処理する。 -
(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
14.
Estimote SDK
15.
初期化 - (void)setupBeacon { _beaconManager =
[[ESTBeaconManager alloc] init]; [_beaconManager setDelegate:self]; [_beaconManager setAvoidUnknownStateBeacons:YES]; _region = [[ESTBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID major:kBeaconMajorID minor:kBeaconMinorID identifier:@"jp.co.GeliPayClient.iBencon"]; ! ! ! } [_beaconManager startMonitoringForRegion:_region]; [_beaconManager startRangingBeaconsInRegion:_region]; [_beaconManager requestStateForRegion:_region];
16.
リージョン監視 余裕、余裕… ! [_beaconManager startMonitoringForRegion:_region]; ! -(void)beaconManager:(ESTBeaconManager *)manager didEnterRegion:(ESTBeaconRegion *)region; ! -(void)beaconManager:(ESTBeaconManager
*)manager didExitRegion:(ESTBeaconRegion *)region;
17.
問題 • 結構遠くても検出されてしまう。 • なかなか領域外を検出しない。数十メートル離れ ないといけない。 • つまり、トイレからだいぶ離れていても、トイレ にいることにされて恥ずかしい音声が流れるので ヤバイ。 • もはや、単なるテロでは。
18.
レンジング • リージョン内にいる場合、毎秒検出したビーコン の配列を通知。おおまかな距離も判定できる。 • 跨いだ時だけ検出されるリージョン監視とは異 なり、何度も呼ばれるので冪等でない処理はセ マフォ的な何かを作るなどして対応する必要が ある。
19.
[_beaconManager startRangingBeaconsInRegion:_region]; ! - (void)beaconManager:(ESTBeaconManager
*)manager didRangeBeacons:(NSArray *)beacons inRegion:(ESTBeaconRegion *)region { if([beacons count] > 0) { ESTBeacon *selectedBeacon = beacons[0]; switch (selectedBeacon.proximity) { case CLProximityNear: [self onEnterRegion:region]; break; case CLProximityImmediate: [self onEnterRegion:region]; break; default: [self onExitRegion]; break; } } }
20.
注意 監視開始時に領域内にいる場合はコールバックが呼ば れない。こちらから問い合わせる必要がある。 ! [_beaconManager requestStateForRegion:_region]; ! -(void)beaconManager:(ESTBeaconManager *)manager didDetermineState:(CLRegionState)state forRegion:(ESTBeaconRegion
*)region;
21.
その他
22.
AVSpeechSynthesizer AVSpeechSynthesizer* speechSynthesizer = [[AVSpeechSynthesizer
alloc] init]; NSString* speakingText = @"私のトイレは長いです。" AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:speakingText]; [utterance setRate:0.3]; [speechSynthesizer speakUtterance:utterance];
23.
PayPal iOS SDK -(void)presentPaymentViewController { PayPalPayment
*payment = [[PayPalPayment alloc] init]; payment.amount = [[NSDecimalNumber alloc] initWithString:@"39.95"]; payment.currencyCode = @"USD"; payment.shortDescription = @"下痢止め"; if (!payment.processable) { NSLog(@"This payment would not be processable."); } // サンドボックスモード [PayPalPaymentViewController setEnvironment:PayPalEnvironmentNoNetwork]; NSString *aPayerId = @"hogehoge42@example.com"; PayPalPaymentViewController *paymentViewController; paymentViewController = [[PayPalPaymentViewController alloc] initWithClientId:kPayPalClientID receiverEmail:kReceiverEmail payerId:aPayerId payment:payment delegate:[GPCPaymentManager sharedInstance]]; [self presentViewController:paymentViewController animated:YES completion:nil]; }
24.
Webサービス稼働中 • http://gelipay.herokuapp.com/ • 私が、私のiBeaconの近くにいるかどうかを 一目で確認できます。話題の可視化。 • Let s アクセス!!!┗(^o^
)┓三┗(^o^ )┓三
25.
ありがとうございました ソースコード: https://github.com/iBencon/GeliPayClient
Download Now