DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
Betabeers Android as a Digital Signage platform
1. Android as a Digital Signage platform
Betabeers Barcelona November 2013
2. Hello world
The company
Clients
20 people
Orange
Digital Signage
El Corte Inglés
User Interactivity
Endesa
Sodexo
Projects
Spain
United Kingdom
Germany
Netherlands
Finland
www.focusonemotions.com
@focusonemotions
Ikea
Nespresso
Fira Barcelona
Ajuntament de Barcelona
ESADE
The Phone House
3. Hello world
Orestes Carracedo
8 years as a developer
4 years as an Android user
3,5 years at Focus On Emotions
Software Development Director
Certified SCRUM Master
PHP 5.3 Zend Certified Engineer
Read about me
http://blog.orestes.io
Follow me
@orestesCA
9. 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
17. Scheduler
Power management
$ reboot # (duh)
Screen state management
$ input keyevent 26 # power
$ input keyevent 82 # menu
Player state management
$ killall com.focusonemotions.android.player
$ am start -n com.[...].player/.Wrapper
http://developer.android.com/reference/android/view/KeyEvent.html
18. Restricted user access
●
Kill UI process
● Custom launcher
AndroidManifest
<category android:name="android.intent.category.HOME" />
/system/build.prop
qemu.hw.mainkeys=1
●
Custom ROM
http://thebitplague.wordpress.com/2013/04/05/kiosk-mode-on-the-nexus-7/
21. Remote shell
$ 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
user
sys
1m3.163s
0m0.000s
0m0.020s
$ time timeout 9s adb connect 192.168.1.42
real
user
sys
0m9.003s
0m0.000s
0m0.020s
26. Statistics & graphs
Whisper database (updates to past data)
Carbon aggregation (Use an IP, not a hostname UDP is better than TCP, is off by default)
Graphite for rendering
$ /opt/graphite/bin/carbon-cache.py start --debug
$ echo ‘value.received’ `date +%s` | nc -w 1 127.0.0.1 2003
StatsD/statsite as aggregator/proxy (v8 nodejs vs C)
<?php StatsD::increment(‘com.focusonemotions.app.pushing’);
http://graphite.readthedocs.org/en/latest/
https://github.com/etsy/statsd/
https://github.com/armon/statsite
36. Testing
Scenario Outline: Get a list of cities based on the passed parameters
Given I have an endpoint "http://api.pushmaster.focusonemotions.com/1.0/city/"
And I pass an argument "id" "<id>"
And I pass an argument "title" "<title>"
When I make a "<method>" request to the endpoint
Then I should get a valid response "<response>"
Examples:
| method
| GET
| GET
| GET
| GET
| GET
| id | title
|
|
| 1 |
|
| Hobbiton
| -1 |
|
| FOO
|
|
|
|
|
|
response
city/city-list.json
city/city-get-by-id.json
city/city-get-by-title.json
null.json
null.json
|
|
|
|
|
|
41. Monitoring with Nagios
$ php check-device-content.php 192.168.1.42
Up-to-date
$ php check-device-content.php 192.168.1.42
Out of date
http://nagios.sourceforge.net/docs/3_0/quickstart.html
43. Thank you!
Feedback
orestes.ca@gmail.com
Team
Project Manager Juanra Posada
Lead Developer Orestes Carracedo
Developers Javier Morales
Dimas López
http://www.focusonemotions.com
JavaScript Ninja Raúl Jiménez
System Administrators Javier Domingo
dev@focusonemotions
Gonzalo Rodríguez
44. Challenge
Break out of the player app, win an
Amazon gift card!
●
●
●
●
Try to guess the unlock gesture
Try to guess the unlock code
No buttons
No fastboot