SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Cloud to Device Messaging(with Google App Engine) Lars Vogel Twitter: @vogella http://www.vogella.de
About me – Lars Vogel  Works as independent Eclipse and Android Consultant and Trainer Also works for SAP AG as Product Owner in a Scrum team Maintains http://www.vogella.de Java, Eclipse and Android related Tutorials with ~20 000 visitors per day
The challenge Mobile Phone Data in the Cloud
Internet creates value for your application
Getting the data Polling   Pushing
Polling is easy 1.) Ask the server if new data is available2.) If new data is available download it3.) Sleep / wait 4.) Repeat 1.)
Polling every 5 min can consume 10 % of your battery
Pushing Server informs the phone once new data is available Info triggeres a download of data
Cloud to Device Messaging Available for Android 2.2 (Beta – Invite only) Requires the Market available on the device Use existing Google connections Light-weight data will be send to the device Message is specific to your application (via permission) Use AlarmManager to keep the connection (Heartbeat)
C2DM – Building blocks Gmail User for the application registration Android Application Googles C2DM server Your Application Server
C2DM Architecture Googles C2DM Server Android App Your application server
C2DM Architecture Request registration ID Unique registration ID Googles C2DM Server Android App Server might send  new registration ID
C2DM Architecture Sends Registration ID to server Android App Server stores the registration ID
Sending messages New HTTP Post message with registration id and authentication token * 200 – ok (with id==ok) 404 – get no auth token 503 – Retry with backoff
Return 200 with error QuotaExceeded InvalidRegistration MessageTooBig MissingCollapseKey
C2DM Architecture Sends notification message to device Reads the real data from server
Building the app
Actually its relatively simple Google provides some util classes To register call:  C2DMessaging.register(context, Your.Email@gmail.com) Register the Google provided C2DM broadcast receiver in your „AndroidManifest.xml“. Google receiver will forward the information it receives to:  	context.getPackageName() + ".C2DMReceiver"
 Your C2DMReceiver Gets the registration ID and send it to your server
Permissions
Register Googles Receiver
Send registration ID to server
Further points Best effort delivery: Google will try to deliver all messages but some might get lost  Push can send 1024 characters -> not suited for big data, just notification
Server can be anything curl, php,  For testing build your server also on the phone....
Your Java application server
from Guillaume Laforge and Patrick Chanezon http://www.slideshare.net/glaforge/google-app-engine-java-groovy-baby
Writing Java Webs application is annoyingly hard...
Google App Engine GAE allows you to host webapplications on the Google infrastructure.   Scalable Infrastructure
Google App Engine No Server maintenance Super easy deployment
It automatically scales up and down Computing power over time
App Engine Architecture Load Balancer App Engine FrontEnd App Engine FrontEnd App Engine FrontEnd AppServer AppServer AppServer
GAE Key points Deployment is super simple Supports subset of JPA / JDO for persistence Scalable per definition Free to get started (significant volume)
Receiving the registration ID
Send out message
Funny: Cloud vrs. Mobile Cloud No Threads (Webworkers) No Access to file system Only Key / Value (+JPA, JDO) Time limited for requests 30  Mobile Threads Access to file system SQL Datebase Time limited for Activity 5 secs
Summary  C2DM powerful and relatively simple to use Google App Engine makes the server site easy
Picture CreditsAdd the prefix http://www.sxc.hu/photo Elephant: http://www.sxc.hu/photo/103473 Mouse http://www.sxc.hu/photo/1097314 Liquid http://www.sxc.hu/photo/1109534 Beta 853828 Despair 150108 Old Computer http://www.sxc.hu/photo/1028528 Person with remote http://www.sxc.hu/photo/485640 Victory fingers 906072 Guy with a tie 877661
Futher information C2DM Tutorial http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html Google App Engine Tutorial http://www.vogella.de/articles/GoogleAppEngineJava/article.html Chrome to Phone Example  http://code.google.com/p/chrometophone/
Thank you For further questions: Lars.Vogel@gmail.com http://www.vogella.de http://www.twitter.com/vogella
License & Acknowledgements This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License See http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.en_US

Weitere ähnliche Inhalte

Was ist angesagt?

Hashiconf AWS Lambda Breakout
Hashiconf AWS Lambda BreakoutHashiconf AWS Lambda Breakout
Hashiconf AWS Lambda BreakoutIan Massingham
 
Cloud-powered Mobile Apps - Pop-up Loft TLV 2017
Cloud-powered Mobile Apps - Pop-up Loft TLV 2017Cloud-powered Mobile Apps - Pop-up Loft TLV 2017
Cloud-powered Mobile Apps - Pop-up Loft TLV 2017Amazon Web Services
 
20141021 AWS Cloud Taekwon - Big Data on AWS
20141021 AWS Cloud Taekwon - Big Data on AWS20141021 AWS Cloud Taekwon - Big Data on AWS
20141021 AWS Cloud Taekwon - Big Data on AWSAmazon Web Services Korea
 
Building Better IoT Applications without Servers
Building Better IoT Applications without ServersBuilding Better IoT Applications without Servers
Building Better IoT Applications without ServersIan Massingham
 
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...Amazon Web Services
 
AWS November Webinar Series - Get Started with Automated Mobile Application T...
AWS November Webinar Series - Get Started with Automated Mobile Application T...AWS November Webinar Series - Get Started with Automated Mobile Application T...
AWS November Webinar Series - Get Started with Automated Mobile Application T...Amazon Web Services
 
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar SeriesMobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar SeriesAmazon Web Services
 
Announcing Amazon AppStream 2.0 - January 2017 Online Tech Talks
Announcing Amazon AppStream 2.0 - January 2017 Online Tech TalksAnnouncing Amazon AppStream 2.0 - January 2017 Online Tech Talks
Announcing Amazon AppStream 2.0 - January 2017 Online Tech TalksAmazon Web Services
 
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017Amazon Web Services
 
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018 AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018 Amazon Web Services Korea
 
Migrating Internal IT Apps - Jenn Boden
 Migrating Internal IT Apps - Jenn Boden Migrating Internal IT Apps - Jenn Boden
Migrating Internal IT Apps - Jenn BodenAmazon Web Services
 
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul MaddoxAWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul MaddoxAWS Riyadh User Group
 
AWS Mobile Hub Overview
AWS Mobile Hub OverviewAWS Mobile Hub Overview
AWS Mobile Hub OverviewDanilo Poccia
 
Aero app updates how to v1.1510.12
Aero app updates how to v1.1510.12Aero app updates how to v1.1510.12
Aero app updates how to v1.1510.125101AVNREGT
 
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...Amazon Web Services
 
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...Amazon Web Services
 

Was ist angesagt? (20)

Hashiconf AWS Lambda Breakout
Hashiconf AWS Lambda BreakoutHashiconf AWS Lambda Breakout
Hashiconf AWS Lambda Breakout
 
Cloud-powered Mobile Apps - Pop-up Loft TLV 2017
Cloud-powered Mobile Apps - Pop-up Loft TLV 2017Cloud-powered Mobile Apps - Pop-up Loft TLV 2017
Cloud-powered Mobile Apps - Pop-up Loft TLV 2017
 
20141021 AWS Cloud Taekwon - Big Data on AWS
20141021 AWS Cloud Taekwon - Big Data on AWS20141021 AWS Cloud Taekwon - Big Data on AWS
20141021 AWS Cloud Taekwon - Big Data on AWS
 
Building Better IoT Applications without Servers
Building Better IoT Applications without ServersBuilding Better IoT Applications without Servers
Building Better IoT Applications without Servers
 
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
 
AWS November Webinar Series - Get Started with Automated Mobile Application T...
AWS November Webinar Series - Get Started with Automated Mobile Application T...AWS November Webinar Series - Get Started with Automated Mobile Application T...
AWS November Webinar Series - Get Started with Automated Mobile Application T...
 
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar SeriesMobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
 
Announcing Amazon AppStream 2.0 - January 2017 Online Tech Talks
Announcing Amazon AppStream 2.0 - January 2017 Online Tech TalksAnnouncing Amazon AppStream 2.0 - January 2017 Online Tech Talks
Announcing Amazon AppStream 2.0 - January 2017 Online Tech Talks
 
Introducing AWS Device Farm
Introducing AWS Device FarmIntroducing AWS Device Farm
Introducing AWS Device Farm
 
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017
 
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018 AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018
 
Migrating Internal IT Apps - Jenn Boden
 Migrating Internal IT Apps - Jenn Boden Migrating Internal IT Apps - Jenn Boden
Migrating Internal IT Apps - Jenn Boden
 
Serverless everywhere
Serverless everywhereServerless everywhere
Serverless everywhere
 
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul MaddoxAWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
 
AWS Mobile Hub Overview
AWS Mobile Hub OverviewAWS Mobile Hub Overview
AWS Mobile Hub Overview
 
AWS Mobile Hub
AWS Mobile HubAWS Mobile Hub
AWS Mobile Hub
 
Aero app updates how to v1.1510.12
Aero app updates how to v1.1510.12Aero app updates how to v1.1510.12
Aero app updates how to v1.1510.12
 
AWS Architecture - GDC 2014
AWS Architecture - GDC 2014AWS Architecture - GDC 2014
AWS Architecture - GDC 2014
 
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
 
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
 

Andere mochten auch

Java Support On Google App Engine
Java Support On Google App EngineJava Support On Google App Engine
Java Support On Google App EngineXebia IT Architects
 
Google App Engine Introduction
Google App Engine IntroductionGoogle App Engine Introduction
Google App Engine IntroductionSimon Su
 
Gcm presentation
Gcm presentationGcm presentation
Gcm presentationNiraj Singh
 
Google Cloud Messaging
Google Cloud Messaging Google Cloud Messaging
Google Cloud Messaging Sandip Jadhav
 
Introduction to google cloud messaging in android
Introduction to google cloud messaging in androidIntroduction to google cloud messaging in android
Introduction to google cloud messaging in androidRIA RUI Society
 
Google Cloud Messaging
Google Cloud MessagingGoogle Cloud Messaging
Google Cloud MessagingArvind Devaraj
 
Google cloud messaging
Google cloud messagingGoogle cloud messaging
Google cloud messagingAmardeep Vijay
 

Andere mochten auch (11)

Java Support On Google App Engine
Java Support On Google App EngineJava Support On Google App Engine
Java Support On Google App Engine
 
Google App Engine Introduction
Google App Engine IntroductionGoogle App Engine Introduction
Google App Engine Introduction
 
GCM for Android
GCM for AndroidGCM for Android
GCM for Android
 
Gcm presentation
Gcm presentationGcm presentation
Gcm presentation
 
cloude computing
cloude computingcloude computing
cloude computing
 
Google Cloud Messaging
Google Cloud Messaging Google Cloud Messaging
Google Cloud Messaging
 
Introduction to google cloud messaging in android
Introduction to google cloud messaging in androidIntroduction to google cloud messaging in android
Introduction to google cloud messaging in android
 
Google Cloud Messaging
Google Cloud Messaging Google Cloud Messaging
Google Cloud Messaging
 
FCM & GCM
FCM & GCMFCM & GCM
FCM & GCM
 
Google Cloud Messaging
Google Cloud MessagingGoogle Cloud Messaging
Google Cloud Messaging
 
Google cloud messaging
Google cloud messagingGoogle cloud messaging
Google cloud messaging
 

Ähnlich wie Android Cloud to Device Messaging with the Google App Engine

Android C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceAndroid C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceLars Vogel
 
Busy Bee Application Develompent Platform
Busy Bee Application Develompent PlatformBusy Bee Application Develompent Platform
Busy Bee Application Develompent PlatformUtkarsh Shukla
 
Building what's next with google cloud's powerful infrastructure
Building what's next with google cloud's powerful infrastructureBuilding what's next with google cloud's powerful infrastructure
Building what's next with google cloud's powerful infrastructureMediaAgility
 
Mobile March Windows Azure Notification Hubs
Mobile March Windows Azure Notification HubsMobile March Windows Azure Notification Hubs
Mobile March Windows Azure Notification HubsAdam Grocholski
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platformrajdeep
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...e-Legion
 
Multi channel advantage
Multi channel advantageMulti channel advantage
Multi channel advantageDipesh Mukerji
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobileFlavius-Radu Demian
 
Building IoT Apps in the Cloud Webinar
Building IoT Apps in the Cloud WebinarBuilding IoT Apps in the Cloud Webinar
Building IoT Apps in the Cloud WebinarDreamFactory
 
Raspberry pi and Google Cloud
Raspberry pi and Google CloudRaspberry pi and Google Cloud
Raspberry pi and Google CloudFaisal Mehmood
 
GCM with Pushbots
GCM with PushbotsGCM with Pushbots
GCM with PushbotsAshish RAj
 
Building a chat app with windows azure mobile services
Building a chat app with windows azure mobile servicesBuilding a chat app with windows azure mobile services
Building a chat app with windows azure mobile servicesFlavius-Radu Demian
 
Google Cloud Platform (GCP) At a Glance
Google Cloud Platform (GCP)  At a GlanceGoogle Cloud Platform (GCP)  At a Glance
Google Cloud Platform (GCP) At a GlanceCloud Analogy
 
Google Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data editionGoogle Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data editionDaniel Zivkovic
 
18 windows phone 8.1 for the enterprise developer
18   windows phone 8.1 for the enterprise developer18   windows phone 8.1 for the enterprise developer
18 windows phone 8.1 for the enterprise developerWindowsPhoneRocks
 
GCM Technology for Android
GCM Technology for AndroidGCM Technology for Android
GCM Technology for AndroidRanjitha R_14
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 

Ähnlich wie Android Cloud to Device Messaging with the Google App Engine (20)

Android C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceAndroid C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen Conference
 
Busy Bee Application Develompent Platform
Busy Bee Application Develompent PlatformBusy Bee Application Develompent Platform
Busy Bee Application Develompent Platform
 
Building what's next with google cloud's powerful infrastructure
Building what's next with google cloud's powerful infrastructureBuilding what's next with google cloud's powerful infrastructure
Building what's next with google cloud's powerful infrastructure
 
Mobile March Windows Azure Notification Hubs
Mobile March Windows Azure Notification HubsMobile March Windows Azure Notification Hubs
Mobile March Windows Azure Notification Hubs
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platform
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
 
Multi channel advantage
Multi channel advantageMulti channel advantage
Multi channel advantage
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobile
 
Building IoT Apps in the Cloud Webinar
Building IoT Apps in the Cloud WebinarBuilding IoT Apps in the Cloud Webinar
Building IoT Apps in the Cloud Webinar
 
google cloud messaging
google cloud messaginggoogle cloud messaging
google cloud messaging
 
Raspberry pi and Google Cloud
Raspberry pi and Google CloudRaspberry pi and Google Cloud
Raspberry pi and Google Cloud
 
GCM with Pushbots
GCM with PushbotsGCM with Pushbots
GCM with Pushbots
 
Building a chat app with windows azure mobile services
Building a chat app with windows azure mobile servicesBuilding a chat app with windows azure mobile services
Building a chat app with windows azure mobile services
 
Google Cloud Platform (GCP) At a Glance
Google Cloud Platform (GCP)  At a GlanceGoogle Cloud Platform (GCP)  At a Glance
Google Cloud Platform (GCP) At a Glance
 
Google Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data editionGoogle Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data edition
 
18 windows phone 8.1 for the enterprise developer
18   windows phone 8.1 for the enterprise developer18   windows phone 8.1 for the enterprise developer
18 windows phone 8.1 for the enterprise developer
 
GCM Technology for Android
GCM Technology for AndroidGCM Technology for Android
GCM Technology for Android
 
Sp.pptx
Sp.pptxSp.pptx
Sp.pptx
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 

Mehr von Lars Vogel

Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020Lars Vogel
 
Eclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source projectEclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source projectLars Vogel
 
Android design and Custom views
Android design and Custom views Android design and Custom views
Android design and Custom views Lars Vogel
 
How to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDEHow to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDELars Vogel
 
Building beautiful User Interface in Android
Building beautiful User Interface in AndroidBuilding beautiful User Interface in Android
Building beautiful User Interface in AndroidLars Vogel
 
What is so cool about Android 4.0
What is so cool about Android 4.0What is so cool about Android 4.0
What is so cool about Android 4.0Lars Vogel
 
What is so cool about Android 4.0?
What is so cool about Android 4.0?What is so cool about Android 4.0?
What is so cool about Android 4.0?Lars Vogel
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart JfokusLars Vogel
 
Eclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse DayEclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse DayLars Vogel
 
Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)Lars Vogel
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Lars Vogel
 
Eclipse 2011 Hot Topics
Eclipse 2011 Hot TopicsEclipse 2011 Hot Topics
Eclipse 2011 Hot TopicsLars Vogel
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models Lars Vogel
 
Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010Lars Vogel
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Lars Vogel
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easyLars Vogel
 
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Lars Vogel
 
Eclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugEclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugLars Vogel
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Lars Vogel
 

Mehr von Lars Vogel (20)

Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020
 
Eclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source projectEclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source project
 
Android design and Custom views
Android design and Custom views Android design and Custom views
Android design and Custom views
 
How to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDEHow to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDE
 
Building beautiful User Interface in Android
Building beautiful User Interface in AndroidBuilding beautiful User Interface in Android
Building beautiful User Interface in Android
 
What is so cool about Android 4.0
What is so cool about Android 4.0What is so cool about Android 4.0
What is so cool about Android 4.0
 
What is so cool about Android 4.0?
What is so cool about Android 4.0?What is so cool about Android 4.0?
What is so cool about Android 4.0?
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
 
Eclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse DayEclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse Day
 
Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11
 
Eclipse 2011 Hot Topics
Eclipse 2011 Hot TopicsEclipse 2011 Hot Topics
Eclipse 2011 Hot Topics
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models
 
Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easy
 
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4
 
Eclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugEclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ Rheinjug
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010
 

Kürzlich hochgeladen

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Kürzlich hochgeladen (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Android Cloud to Device Messaging with the Google App Engine

  • 1. Cloud to Device Messaging(with Google App Engine) Lars Vogel Twitter: @vogella http://www.vogella.de
  • 2. About me – Lars Vogel Works as independent Eclipse and Android Consultant and Trainer Also works for SAP AG as Product Owner in a Scrum team Maintains http://www.vogella.de Java, Eclipse and Android related Tutorials with ~20 000 visitors per day
  • 3. The challenge Mobile Phone Data in the Cloud
  • 4. Internet creates value for your application
  • 5. Getting the data Polling Pushing
  • 6. Polling is easy 1.) Ask the server if new data is available2.) If new data is available download it3.) Sleep / wait 4.) Repeat 1.)
  • 7.
  • 8. Polling every 5 min can consume 10 % of your battery
  • 9. Pushing Server informs the phone once new data is available Info triggeres a download of data
  • 10. Cloud to Device Messaging Available for Android 2.2 (Beta – Invite only) Requires the Market available on the device Use existing Google connections Light-weight data will be send to the device Message is specific to your application (via permission) Use AlarmManager to keep the connection (Heartbeat)
  • 11. C2DM – Building blocks Gmail User for the application registration Android Application Googles C2DM server Your Application Server
  • 12. C2DM Architecture Googles C2DM Server Android App Your application server
  • 13. C2DM Architecture Request registration ID Unique registration ID Googles C2DM Server Android App Server might send new registration ID
  • 14. C2DM Architecture Sends Registration ID to server Android App Server stores the registration ID
  • 15. Sending messages New HTTP Post message with registration id and authentication token * 200 – ok (with id==ok) 404 – get no auth token 503 – Retry with backoff
  • 16. Return 200 with error QuotaExceeded InvalidRegistration MessageTooBig MissingCollapseKey
  • 17. C2DM Architecture Sends notification message to device Reads the real data from server
  • 19. Actually its relatively simple Google provides some util classes To register call: C2DMessaging.register(context, Your.Email@gmail.com) Register the Google provided C2DM broadcast receiver in your „AndroidManifest.xml“. Google receiver will forward the information it receives to: context.getPackageName() + ".C2DMReceiver"
  • 20. Your C2DMReceiver Gets the registration ID and send it to your server
  • 23. Send registration ID to server
  • 24. Further points Best effort delivery: Google will try to deliver all messages but some might get lost Push can send 1024 characters -> not suited for big data, just notification
  • 25. Server can be anything curl, php, For testing build your server also on the phone....
  • 27. from Guillaume Laforge and Patrick Chanezon http://www.slideshare.net/glaforge/google-app-engine-java-groovy-baby
  • 28. Writing Java Webs application is annoyingly hard...
  • 29. Google App Engine GAE allows you to host webapplications on the Google infrastructure. Scalable Infrastructure
  • 30. Google App Engine No Server maintenance Super easy deployment
  • 31. It automatically scales up and down Computing power over time
  • 32. App Engine Architecture Load Balancer App Engine FrontEnd App Engine FrontEnd App Engine FrontEnd AppServer AppServer AppServer
  • 33. GAE Key points Deployment is super simple Supports subset of JPA / JDO for persistence Scalable per definition Free to get started (significant volume)
  • 36. Funny: Cloud vrs. Mobile Cloud No Threads (Webworkers) No Access to file system Only Key / Value (+JPA, JDO) Time limited for requests 30 Mobile Threads Access to file system SQL Datebase Time limited for Activity 5 secs
  • 37. Summary C2DM powerful and relatively simple to use Google App Engine makes the server site easy
  • 38. Picture CreditsAdd the prefix http://www.sxc.hu/photo Elephant: http://www.sxc.hu/photo/103473 Mouse http://www.sxc.hu/photo/1097314 Liquid http://www.sxc.hu/photo/1109534 Beta 853828 Despair 150108 Old Computer http://www.sxc.hu/photo/1028528 Person with remote http://www.sxc.hu/photo/485640 Victory fingers 906072 Guy with a tie 877661
  • 39. Futher information C2DM Tutorial http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html Google App Engine Tutorial http://www.vogella.de/articles/GoogleAppEngineJava/article.html Chrome to Phone Example http://code.google.com/p/chrometophone/
  • 40. Thank you For further questions: Lars.Vogel@gmail.com http://www.vogella.de http://www.twitter.com/vogella
  • 41. License & Acknowledgements This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License See http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.en_US