際際滷

際際滷Share a Scribd company logo
Android Push Notifications
Barcelona Android User Group May 2014
Hello world
Clients
Orange
El Corte Ingl辿s
Endesa
Sodexo
Ikea
Nespresso
Fira Barcelona
Ajuntament de Barcelona
ESADE
The Phone House
The company
20 people
Digital Signage
User Interactivity
Projects
Spain
United Kingdom
Germany
Netherlands
Finland
www.focusonemotions.com
@focusonemotions
Hello world
Orestes Carracedo
8 years as a developer
4 years as an Android user
3,5 years at Focus On Emotions
Certified SCRUM Master
PHP 5.3 Zend Certified Engineer
Read about me
http://blog.orestes.io
Follow me
@orestesCA
Android push notifications
Briefing
Make it on time
Code as less as possible
Be robust
Make use of existing OS tools
Make use of existing apps
Be flexible
Create multiple decoupled tools that work together
Content management
$ adb push /local/folder /remote/folder
PHP SFTP Wrapper
$ php load-device-content.php 300 7
Loading content 
50 % 20/40 KB
100 % 40/40 KB
Done.
/mnt/sdcard/focus
+ openvpn
+ player
+ scheduler
+ upload
- content
- october_2013
+ media
Remote access
$ adb connect 192.168.1.42:5555
$ time adb connect 192.168.1.42:5555
unable to connect to 192.168.1.42:5555
real 1m3.163s
user 0m0.000s
sys 0m0.020s
.
.
$ time timeout 9s adb connect 192.168.1.42
real 0m9.003s
user 0m0.000s
sys 0m0.020s
Pushing content updates
Problem
 280 devices
 Intermittent connectivity
Solution
 Parallelisation
 Retries, reporting
Queue System
Thread #1 ./update-content --device 10 --content 15
Thread #2 ./update-content --device 11 --content 15
Waiting  ./update-content --device 12 --content 16
ADB cap
Choosing a solution
Message Broker Maintenance Difficulty
ZeroMQ Yes Hard
Redis Yes Easy
Custom QMS Yes Easier
GCM Push Notifications No Easiest
Services architecture
Apache Cordova
V
P
N
BusyBox
A
D
B
S
S
H
JavaScript player
SuperSU
scheduler
Downloader
Uploader
Services architecture
BusyBoxSuperSU DownloaderUploader
scheduler
Apache Cordova
JavaScript player
Push
Notifications
IntentIntent
Runtime.getRuntime().exec()
Thank you!
Feedback
orestes.ca@gmail.com

More Related Content

Android push notifications