SlideShare uma empresa Scribd logo
1 de 57
Baixar para ler offline
Android chat in the cloud
RESTful APIs, authentication, push notifications and some additional goodies
Alfredo Morresi
Developer Relations @ Google
Who I am
Alfredo Morresi

ROLE
Developer Relations Program Manager
COUNTRY
Italy
PASSIONS
Community, Development,
Snowboarding, Tiramisu'
REACH ME
alfredomorresi@google.com
plus.google.com/+AlfredoMorresi
@rainbowbreeze
Let’s start with the chat demo app

Download from https://play.google.com/store/apps/details?id=org.alexismp.cloud.backend
In less than 40 minutes?
Forget about the backend!
Use Google Cloud Platform + Mobile Backend Starter
Optional server-side coding: Control your cloud service using Android and iOS client libraries.
Cloud Datastore: Store millions of objects in the cloud and manage them from your app.
Push Notifications: Send and broadcast objects as messages via Apple Push Notifications and
Google Cloud Messaging.
Event Driven Programming: Create real-time interactive user experiences using Continuous
Queries.
User authentication: Authenticate users using Google Accounts and control access on private data.
Built to scale: Mobile backend runs on App Engine infrastructure to scale to millions of users within
hours.
Create your backend

https://developers.google.com/cloud/samples/mbs
Create your backend
Create your backend
Create your backend
Download Android app source code

http://goo.gl/0FLRPp
Set some values in the source and you’ve done!

Change
●
●
●

PROJECT_ID
PROJECT_NUMBER
WEB_CLIENT_ID
Step 1
Accessing to the APIs
Google Cloud Endpoints: generate APIs from annotations

https://developers.google.com/appengine/docs/java/endpoints/
Explore the backend APIs
Explore the APIs:
http://<YOUR_PROJECT_ID>.appspot.com/_ah/api/explorer
Set Open authentication in the backend
Access to RESTful APIs, no authentication
Set the Consts.IS_AUTH_ENABLED to false
Set the Consts.PROJECT_ID to
It was easy!
Access to RESTful APIs, no authentication
Google Cloud Endpoints automatically generates the
Android code required to access the backend APIs
Mobilebackend.Builder builder = new Mobilebackend.Builder(
AndroidHttp.newCompatibleTransport(),
new GsonFactory(),
null);
Mobilebackend backend =
builder.setRootUrl(Consts.ENDPOINT_ROOT_URL).build();
Access to RESTful APIs, no authentication
Insert a new CloudEntity in the backend
CloudEntity post = new CloudEntity("Guestbook");
post.put("message", "Your message here...");
EntityDto resultEntityDto = backend.endpointV1()
.insert(post.getKindName(), post.getEntityDto()).execute();
CloudEntity resultCo =
CloudEntity.createCloudEntityFromEntityDto
(resultEntityDto);
Log.i(Consts.TAG, "insert: inserted: " + resultCo);
Step 2
Accessing to the APIs with authentication
Authenticated access to the APIs
Restrict the API access only to your application(s).
ANDROID Client_ID: identifies your app in unique
way (package name + SHA1 of signing key of the app)
WEB Client_ID: establishes that the client and the
server are from the same developer so the standard
OAuth2 prompt is avoided (no 3rd party app). It’s a
shared token.
https://developers.google.com/appengine/docs/java/endpoints/auth
Generate Android Client ID
Generate Android Client ID
Generate Web Client ID
Generate Web Client ID
Set Android and Web Client IDs in the backend
Authenticated access to the APIs

Set the Consts.IS_AUTH_ENABLED to true
Set the Consts.WEB_CLIENT_ID to Web Client ID
The Android client provides credentials!
GoogleAccountCredential credential =
GoogleAccountCredential.usingAudience(
getActivity(), Consts.AUTH_AUDIENCE);
if (credential.getSelectedAccountName() == null) {
startActivityForResult(
credential.newChooseAccountIntent(),
REQUEST_ACCOUNT_PICKER);
String accountName =
data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);
credential.setSelectedAccountName(accountName);
https://developers.google.
com/appengine/docs/java/endpoints/consume_android#Java_Making_aut
henticated_calls
Authenticated access to the APIs
Inject the credential in the backend manager class
// check if credential has account name
final GoogleAccountCredential gac =
credential == null || credential.getSelectedAccountName() == null
? null
: mCredential;
// create HttpRequestInitializer
HttpRequestInitializer httpRequestInitializer = new HttpRequestInitializer() {
@Override
public void initialize(HttpRequest request) throws IOException {
if (gac != null) {
gac.initialize(request);
}
}
};
Authenticated access to the APIs
Mobilebackend.Builder builder = new Mobilebackend.Builder(
AndroidHttp.newCompatibleTransport(),
new GsonFactory(),
httpRequestInitializer);
Mobilebackend backend =
builder.setRootUrl(Consts.ENDPOINT_ROOT_URL).build();
… Now

the API backend framework automatically
authenticates the user and enforces the authorized
clientIds whitelist, ultimately by supplying a valid
User to the API parameters.
Step 3
Add push notifications
Google Cloud Messaging for Android

http://developer.android.com/google/gcm/index.html
Enable GCM in the project
Generate a Server API Key
Generate a Server API Key
Enable GCM in the backend
Enable GCM in the client

Set the Consts.PROJECT_NUMBER to
A look into GCM client code
http://developer.android.com/google/gcm/client.html

Register your app and store registration ID
String regId = getRegIdFromPref();
if (registrationId.isEmpty()) {
regid = GoogleCloudMessaging.getInstance(context)
.register(PROJECT_ID);
storeRegIdToPref(regId);
}
Create a BroadcastReceiver to receive push messages
@Override
public void onReceive(Context context, Intent intent) {
// Explicitly specify that GcmIntentService will handle the intent
ComponentName comp =
new ComponentName(
context.getPackageName(),
GCMIntentService.class.getName());
// Start service, keeping the device awake while it is launching
startWakefulService(context, (intent.setComponent(comp)));
setResultCode(Activity.RESULT_OK);
}
Handle the message with a Service
protected void onHandleIntent(Intent intent) {
Bundle extras = intent.getExtras();
GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
String msgType = gcm.getMessageType(intent);
if (extras.isEmpty()) { // has effect of unparcelling Bundle
…
}
if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE.equals(messageType)) {
…
}
// Release the wake lock provided by the WakefulBroadcastReceiver.
GCMBroadcastReceiver.completeWakefulIntent(intent);
}
And remember to...

App registration is a network operation
Bonus Step
App internal architecture
Because API calls are slow...

EntityDto resultEntityDto = backend.endpointV1()
.insert(post.getKindName(), post.getEntityDto()).execute();
Never forget!
CloudBackendASync extends CloudBackend
// create a response handler that will receive the result or an error
CloudCallbackHandler<List<CloudEntity>> handler =
new CloudCallbackHandler<List<CloudEntity>>() {
@Override
public void onComplete(List<CloudEntity> results) {
...
}
@Override
public void onError(IOException exception) {
...
}
CloudBackendASync extends CloudBackend

// execute the query with the handler
mProcessingFragment.getCloudBackend().listByKind(
"Guestbook",
CloudEntity.PROP_CREATED_AT,
Order.DESC,
50,
Scope.FUTURE_AND_PAST, handler);
Why these two classes?

Separate the logic
(CloudBackend) from the sync
management
(CloudBackendAsync) makes
the code more testable!
Activity lifecycle (you can do better!)
// Check to see if we have retained the fragment which handles asynchronous backend calls
mProcessingFragment = (CloudBackendFragment) mFragmentManager.
findFragmentByTag(PROCESSING_FRAGMENT_TAG);
// If not retained (or first time running), create a new one
if (mProcessingFragment == null) {
mProcessingFragment = new CloudBackendFragment();
mProcessingFragment.setRetainInstance(true);
fragmentTransaction.add(mProcessingFragment, PROCESSING_FRAGMENT_TAG);
}
…
// execute the insertion with the handler
mProcessingFragment.getCloudBackend().insert(newPost, handler);
mMessageTxt.setEnabled(false);
mSendBtn.setEnabled(false);
Extends the data

CloudEntity post = new CloudEntity("Guestbook");
post.put("message", "Your message here...");
post.put("alf_property", "Custom property value here...");
EntityDto resultEntityDto = backend.endpointV1()
.insert(post.getKindName(), post.getEntityDto()).execute();
CloudEntity resultCo =
CloudEntity.createCloudEntityFromEntityDto(resultEntityDto);
Curious about Google dev initiatives and event in Italy?

https://developersitalia.blogspot.com
Thank you!
http://developers.google.com
Alfredo Morresi
plus.google.com/+AlfredoMorresi
@rainbowbreeze

Mais conteúdo relacionado

Mais procurados

Intel ndk - a few Benchmarks
Intel ndk - a few BenchmarksIntel ndk - a few Benchmarks
Intel ndk - a few Benchmarksfirenze-gtug
 
Intro to Windows Azure Mobile Services with iOS
Intro to Windows Azure Mobile Services with iOSIntro to Windows Azure Mobile Services with iOS
Intro to Windows Azure Mobile Services with iOSAndri Yadi
 
Android Development Training
Android Development TrainingAndroid Development Training
Android Development Trainingchandutata
 
Wearables + Azure development
Wearables + Azure developmentWearables + Azure development
Wearables + Azure developmentAndri Yadi
 
Architecture your android_application
Architecture your android_applicationArchitecture your android_application
Architecture your android_applicationMark Brady
 
Introduction to Android programming
Introduction to Android programmingIntroduction to Android programming
Introduction to Android programmingSirwan Afifi
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App DevelopmentTodd Burgess
 
Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2Ahsanul Karim
 
Project presentation (Loginradius SDK for Android)
Project presentation (Loginradius SDK for Android)Project presentation (Loginradius SDK for Android)
Project presentation (Loginradius SDK for Android)shwetarathi Rathi
 
Introduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting StartedIntroduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting StartedAhsanul Karim
 
FYPJ - Cerebral Android App Development (Report)
FYPJ - Cerebral Android App Development (Report)FYPJ - Cerebral Android App Development (Report)
FYPJ - Cerebral Android App Development (Report)Nehemiah Tan
 
Questions About Android Application Development
Questions About Android Application DevelopmentQuestions About Android Application Development
Questions About Android Application DevelopmentAdeel Rasheed
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginnerAjailal Parackal
 
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemAppcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemBoydlee Pollentine
 
Android Studio Overview
Android Studio OverviewAndroid Studio Overview
Android Studio OverviewSalim Hosen
 
Android application structure
Android application structureAndroid application structure
Android application structureAlexey Ustenko
 
Using Maven to build Java & Android program
Using Maven to build Java & Android programUsing Maven to build Java & Android program
Using Maven to build Java & Android programMu Chun Wang
 
Mobile Application Development With Android
Mobile Application Development With AndroidMobile Application Development With Android
Mobile Application Development With Androidguest213e237
 
Android Workshop Part 1
Android Workshop Part 1Android Workshop Part 1
Android Workshop Part 1NAILBITER
 

Mais procurados (20)

Intel ndk - a few Benchmarks
Intel ndk - a few BenchmarksIntel ndk - a few Benchmarks
Intel ndk - a few Benchmarks
 
Intro to Windows Azure Mobile Services with iOS
Intro to Windows Azure Mobile Services with iOSIntro to Windows Azure Mobile Services with iOS
Intro to Windows Azure Mobile Services with iOS
 
Android Development Training
Android Development TrainingAndroid Development Training
Android Development Training
 
Wearables + Azure development
Wearables + Azure developmentWearables + Azure development
Wearables + Azure development
 
Architecture your android_application
Architecture your android_applicationArchitecture your android_application
Architecture your android_application
 
Introduction to Android programming
Introduction to Android programmingIntroduction to Android programming
Introduction to Android programming
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
 
Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2
 
Project presentation (Loginradius SDK for Android)
Project presentation (Loginradius SDK for Android)Project presentation (Loginradius SDK for Android)
Project presentation (Loginradius SDK for Android)
 
Introduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting StartedIntroduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting Started
 
FYPJ - Cerebral Android App Development (Report)
FYPJ - Cerebral Android App Development (Report)FYPJ - Cerebral Android App Development (Report)
FYPJ - Cerebral Android App Development (Report)
 
Questions About Android Application Development
Questions About Android Application DevelopmentQuestions About Android Application Development
Questions About Android Application Development
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
 
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemAppcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
 
Android Studio Overview
Android Studio OverviewAndroid Studio Overview
Android Studio Overview
 
Android application structure
Android application structureAndroid application structure
Android application structure
 
Ci for Android
Ci for AndroidCi for Android
Ci for Android
 
Using Maven to build Java & Android program
Using Maven to build Java & Android programUsing Maven to build Java & Android program
Using Maven to build Java & Android program
 
Mobile Application Development With Android
Mobile Application Development With AndroidMobile Application Development With Android
Mobile Application Development With Android
 
Android Workshop Part 1
Android Workshop Part 1Android Workshop Part 1
Android Workshop Part 1
 

Destaque

Apertura "Mobile & Embedded" - 13 febbraio 2014
Apertura "Mobile & Embedded" - 13 febbraio 2014Apertura "Mobile & Embedded" - 13 febbraio 2014
Apertura "Mobile & Embedded" - 13 febbraio 2014firenze-gtug
 
Clean android code
Clean android codeClean android code
Clean android codefirenze-gtug
 
EE Incremental Store
EE Incremental StoreEE Incremental Store
EE Incremental Storefirenze-gtug
 
Programming objects with android
Programming objects with androidProgramming objects with android
Programming objects with androidfirenze-gtug
 
Introduction to Google Project Tango and Intel® RealSense™
Introduction to Google Project Tango and Intel® RealSense™Introduction to Google Project Tango and Intel® RealSense™
Introduction to Google Project Tango and Intel® RealSense™Francesca Tosi
 

Destaque (7)

Apertura "Mobile & Embedded" - 13 febbraio 2014
Apertura "Mobile & Embedded" - 13 febbraio 2014Apertura "Mobile & Embedded" - 13 febbraio 2014
Apertura "Mobile & Embedded" - 13 febbraio 2014
 
#Html2Native
#Html2Native#Html2Native
#Html2Native
 
Clean android code
Clean android codeClean android code
Clean android code
 
EE Incremental Store
EE Incremental StoreEE Incremental Store
EE Incremental Store
 
Programming objects with android
Programming objects with androidProgramming objects with android
Programming objects with android
 
IoT, serve?
IoT, serve?IoT, serve?
IoT, serve?
 
Introduction to Google Project Tango and Intel® RealSense™
Introduction to Google Project Tango and Intel® RealSense™Introduction to Google Project Tango and Intel® RealSense™
Introduction to Google Project Tango and Intel® RealSense™
 

Semelhante a Android chat in the cloud

Android Cloud to Device Messaging Framework at GTUG Stockholm
Android Cloud to Device Messaging Framework at GTUG StockholmAndroid Cloud to Device Messaging Framework at GTUG Stockholm
Android Cloud to Device Messaging Framework at GTUG StockholmJohan Nilsson
 
Urban Airship and Android Integration for Push Notification and In-App Notifi...
Urban Airship and Android Integration for Push Notification and In-App Notifi...Urban Airship and Android Integration for Push Notification and In-App Notifi...
Urban Airship and Android Integration for Push Notification and In-App Notifi...Zeeshan Rahman
 
Urban Airship & Android Application Integration Document
Urban Airship & Android Application Integration DocumentUrban Airship & Android Application Integration Document
Urban Airship & Android Application Integration Documentmobi fly
 
Building an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and FirebaseBuilding an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and FirebaseMarina Coelho
 
google drive and the google drive sdk
google drive and the google drive sdkgoogle drive and the google drive sdk
google drive and the google drive sdkfirenze-gtug
 
FOSS STHLM Android Cloud to Device Messaging
FOSS STHLM Android Cloud to Device MessagingFOSS STHLM Android Cloud to Device Messaging
FOSS STHLM Android Cloud to Device MessagingJohan Nilsson
 
Cross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-InCross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-InPeter Friese
 
Google+ sign in for mobile & web apps
Google+ sign in for mobile & web appsGoogle+ sign in for mobile & web apps
Google+ sign in for mobile & web appsLakhdar Meftah
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidAlberto Ruibal
 
The Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror APIThe Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror APIGun Lee
 
Google+ for Mobile Apps on iOS and Android
Google+ for Mobile Apps on iOS and AndroidGoogle+ for Mobile Apps on iOS and Android
Google+ for Mobile Apps on iOS and AndroidPeter Friese
 
Android Evolution, AppForum 2014, Brussels, Friedger Müffke
Android Evolution, AppForum 2014, Brussels, Friedger MüffkeAndroid Evolution, AppForum 2014, Brussels, Friedger Müffke
Android Evolution, AppForum 2014, Brussels, Friedger MüffkeFriedger Müffke
 
Building Mobile Apps on AWS at Websummit Diublin
Building Mobile Apps on AWS at Websummit DiublinBuilding Mobile Apps on AWS at Websummit Diublin
Building Mobile Apps on AWS at Websummit DiublinAmazon Web Services
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspectiveGunjan Kumar
 

Semelhante a Android chat in the cloud (20)

Android Cloud to Device Messaging Framework at GTUG Stockholm
Android Cloud to Device Messaging Framework at GTUG StockholmAndroid Cloud to Device Messaging Framework at GTUG Stockholm
Android Cloud to Device Messaging Framework at GTUG Stockholm
 
Urban Airship and Android Integration for Push Notification and In-App Notifi...
Urban Airship and Android Integration for Push Notification and In-App Notifi...Urban Airship and Android Integration for Push Notification and In-App Notifi...
Urban Airship and Android Integration for Push Notification and In-App Notifi...
 
Urban Airship & Android Application Integration Document
Urban Airship & Android Application Integration DocumentUrban Airship & Android Application Integration Document
Urban Airship & Android Application Integration Document
 
Building an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and FirebaseBuilding an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and Firebase
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
google drive and the google drive sdk
google drive and the google drive sdkgoogle drive and the google drive sdk
google drive and the google drive sdk
 
FOSS STHLM Android Cloud to Device Messaging
FOSS STHLM Android Cloud to Device MessagingFOSS STHLM Android Cloud to Device Messaging
FOSS STHLM Android Cloud to Device Messaging
 
Cross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-InCross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-In
 
Cross platformmobileapp
Cross platformmobileappCross platformmobileapp
Cross platformmobileapp
 
Google+ sign in for mobile & web apps
Google+ sign in for mobile & web appsGoogle+ sign in for mobile & web apps
Google+ sign in for mobile & web apps
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
 
The Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror APIThe Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror API
 
Google+ for Mobile Apps on iOS and Android
Google+ for Mobile Apps on iOS and AndroidGoogle+ for Mobile Apps on iOS and Android
Google+ for Mobile Apps on iOS and Android
 
Android Froyo
Android FroyoAndroid Froyo
Android Froyo
 
Building mobile apps on aws
Building mobile apps on awsBuilding mobile apps on aws
Building mobile apps on aws
 
Building mobile apps on AWS
Building mobile apps on AWSBuilding mobile apps on AWS
Building mobile apps on AWS
 
GCM aperitivo Android
GCM aperitivo AndroidGCM aperitivo Android
GCM aperitivo Android
 
Android Evolution, AppForum 2014, Brussels, Friedger Müffke
Android Evolution, AppForum 2014, Brussels, Friedger MüffkeAndroid Evolution, AppForum 2014, Brussels, Friedger Müffke
Android Evolution, AppForum 2014, Brussels, Friedger Müffke
 
Building Mobile Apps on AWS at Websummit Diublin
Building Mobile Apps on AWS at Websummit DiublinBuilding Mobile Apps on AWS at Websummit Diublin
Building Mobile Apps on AWS at Websummit Diublin
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
 

Mais de firenze-gtug

Html5 apps - GWT oriented
Html5 apps - GWT orientedHtml5 apps - GWT oriented
Html5 apps - GWT orientedfirenze-gtug
 
Android ndk - ottimizzazione su dispositivi Intel
Android ndk - ottimizzazione su dispositivi IntelAndroid ndk - ottimizzazione su dispositivi Intel
Android ndk - ottimizzazione su dispositivi Intelfirenze-gtug
 
Gwt kickoff - Alberto Mancini & Francesca Tosi
Gwt kickoff - Alberto Mancini & Francesca TosiGwt kickoff - Alberto Mancini & Francesca Tosi
Gwt kickoff - Alberto Mancini & Francesca Tosifirenze-gtug
 
Youtube broadcast live - Massimiliano D'Ambrosio
Youtube broadcast live - Massimiliano D'AmbrosioYoutube broadcast live - Massimiliano D'Ambrosio
Youtube broadcast live - Massimiliano D'Ambrosiofirenze-gtug
 
Intro BeagleBone Black - Massimiliano D'Ambrosio
Intro BeagleBone Black - Massimiliano D'AmbrosioIntro BeagleBone Black - Massimiliano D'Ambrosio
Intro BeagleBone Black - Massimiliano D'Ambrosiofirenze-gtug
 
Arduino - Massimiliano D'Ambrosio
Arduino - Massimiliano D'AmbrosioArduino - Massimiliano D'Ambrosio
Arduino - Massimiliano D'Ambrosiofirenze-gtug
 
Introduzione a GAE - Alessandro Aglietti e Lorenzo Bugiani
Introduzione a GAE - Alessandro Aglietti e Lorenzo BugianiIntroduzione a GAE - Alessandro Aglietti e Lorenzo Bugiani
Introduzione a GAE - Alessandro Aglietti e Lorenzo Bugianifirenze-gtug
 
RFID: What & Why - Stefano Coluccini
RFID: What & Why - Stefano ColucciniRFID: What & Why - Stefano Coluccini
RFID: What & Why - Stefano Coluccinifirenze-gtug
 
GWT - AppDays - (25 aprile 2014, pordenone)
GWT - AppDays - (25 aprile 2014, pordenone)GWT - AppDays - (25 aprile 2014, pordenone)
GWT - AppDays - (25 aprile 2014, pordenone)firenze-gtug
 
Presentazione Google App Engine
Presentazione Google App EnginePresentazione Google App Engine
Presentazione Google App Enginefirenze-gtug
 
Maven from dummies
Maven from dummiesMaven from dummies
Maven from dummiesfirenze-gtug
 
Dev fest android application case study
Dev fest android application   case studyDev fest android application   case study
Dev fest android application case studyfirenze-gtug
 
You tube api overview
You tube api overviewYou tube api overview
You tube api overviewfirenze-gtug
 
Gwt development with errai and forge
Gwt development with errai and forgeGwt development with errai and forge
Gwt development with errai and forgefirenze-gtug
 
Google tv gdg_devfest_firenze2012
Google tv gdg_devfest_firenze2012Google tv gdg_devfest_firenze2012
Google tv gdg_devfest_firenze2012firenze-gtug
 
Dev fest2012 opening
Dev fest2012   openingDev fest2012   opening
Dev fest2012 openingfirenze-gtug
 
Unconventional webapps with gwt:elemental & html5
Unconventional webapps with gwt:elemental & html5Unconventional webapps with gwt:elemental & html5
Unconventional webapps with gwt:elemental & html5firenze-gtug
 
Job opportunities in_google_emea
Job opportunities in_google_emeaJob opportunities in_google_emea
Job opportunities in_google_emeafirenze-gtug
 

Mais de firenze-gtug (20)

Html5 apps - GWT oriented
Html5 apps - GWT orientedHtml5 apps - GWT oriented
Html5 apps - GWT oriented
 
Android ndk - ottimizzazione su dispositivi Intel
Android ndk - ottimizzazione su dispositivi IntelAndroid ndk - ottimizzazione su dispositivi Intel
Android ndk - ottimizzazione su dispositivi Intel
 
Gwt kickoff - Alberto Mancini & Francesca Tosi
Gwt kickoff - Alberto Mancini & Francesca TosiGwt kickoff - Alberto Mancini & Francesca Tosi
Gwt kickoff - Alberto Mancini & Francesca Tosi
 
Youtube broadcast live - Massimiliano D'Ambrosio
Youtube broadcast live - Massimiliano D'AmbrosioYoutube broadcast live - Massimiliano D'Ambrosio
Youtube broadcast live - Massimiliano D'Ambrosio
 
Intro BeagleBone Black - Massimiliano D'Ambrosio
Intro BeagleBone Black - Massimiliano D'AmbrosioIntro BeagleBone Black - Massimiliano D'Ambrosio
Intro BeagleBone Black - Massimiliano D'Ambrosio
 
Arduino - Massimiliano D'Ambrosio
Arduino - Massimiliano D'AmbrosioArduino - Massimiliano D'Ambrosio
Arduino - Massimiliano D'Ambrosio
 
Introduzione a GAE - Alessandro Aglietti e Lorenzo Bugiani
Introduzione a GAE - Alessandro Aglietti e Lorenzo BugianiIntroduzione a GAE - Alessandro Aglietti e Lorenzo Bugiani
Introduzione a GAE - Alessandro Aglietti e Lorenzo Bugiani
 
RFID: What & Why - Stefano Coluccini
RFID: What & Why - Stefano ColucciniRFID: What & Why - Stefano Coluccini
RFID: What & Why - Stefano Coluccini
 
GWT - AppDays - (25 aprile 2014, pordenone)
GWT - AppDays - (25 aprile 2014, pordenone)GWT - AppDays - (25 aprile 2014, pordenone)
GWT - AppDays - (25 aprile 2014, pordenone)
 
Presentazione Google App Engine
Presentazione Google App EnginePresentazione Google App Engine
Presentazione Google App Engine
 
Maven from dummies
Maven from dummiesMaven from dummies
Maven from dummies
 
Apps fuel oct2012
Apps fuel oct2012Apps fuel oct2012
Apps fuel oct2012
 
Dev fest android application case study
Dev fest android application   case studyDev fest android application   case study
Dev fest android application case study
 
You tube api overview
You tube api overviewYou tube api overview
You tube api overview
 
AdWordsScripts v1
AdWordsScripts v1AdWordsScripts v1
AdWordsScripts v1
 
Gwt development with errai and forge
Gwt development with errai and forgeGwt development with errai and forge
Gwt development with errai and forge
 
Google tv gdg_devfest_firenze2012
Google tv gdg_devfest_firenze2012Google tv gdg_devfest_firenze2012
Google tv gdg_devfest_firenze2012
 
Dev fest2012 opening
Dev fest2012   openingDev fest2012   opening
Dev fest2012 opening
 
Unconventional webapps with gwt:elemental & html5
Unconventional webapps with gwt:elemental & html5Unconventional webapps with gwt:elemental & html5
Unconventional webapps with gwt:elemental & html5
 
Job opportunities in_google_emea
Job opportunities in_google_emeaJob opportunities in_google_emea
Job opportunities in_google_emea
 

Último

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Último (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Android chat in the cloud

  • 1.
  • 2. Android chat in the cloud RESTful APIs, authentication, push notifications and some additional goodies Alfredo Morresi Developer Relations @ Google
  • 3. Who I am Alfredo Morresi ROLE Developer Relations Program Manager COUNTRY Italy PASSIONS Community, Development, Snowboarding, Tiramisu' REACH ME alfredomorresi@google.com plus.google.com/+AlfredoMorresi @rainbowbreeze
  • 4. Let’s start with the chat demo app Download from https://play.google.com/store/apps/details?id=org.alexismp.cloud.backend
  • 5. In less than 40 minutes?
  • 6. Forget about the backend!
  • 7. Use Google Cloud Platform + Mobile Backend Starter Optional server-side coding: Control your cloud service using Android and iOS client libraries. Cloud Datastore: Store millions of objects in the cloud and manage them from your app. Push Notifications: Send and broadcast objects as messages via Apple Push Notifications and Google Cloud Messaging. Event Driven Programming: Create real-time interactive user experiences using Continuous Queries. User authentication: Authenticate users using Google Accounts and control access on private data. Built to scale: Mobile backend runs on App Engine infrastructure to scale to millions of users within hours.
  • 12. Download Android app source code http://goo.gl/0FLRPp
  • 13. Set some values in the source and you’ve done! Change ● ● ● PROJECT_ID PROJECT_NUMBER WEB_CLIENT_ID
  • 14.
  • 16. Google Cloud Endpoints: generate APIs from annotations https://developers.google.com/appengine/docs/java/endpoints/
  • 17. Explore the backend APIs Explore the APIs: http://<YOUR_PROJECT_ID>.appspot.com/_ah/api/explorer
  • 18. Set Open authentication in the backend
  • 19. Access to RESTful APIs, no authentication Set the Consts.IS_AUTH_ENABLED to false Set the Consts.PROJECT_ID to
  • 21. Access to RESTful APIs, no authentication Google Cloud Endpoints automatically generates the Android code required to access the backend APIs Mobilebackend.Builder builder = new Mobilebackend.Builder( AndroidHttp.newCompatibleTransport(), new GsonFactory(), null); Mobilebackend backend = builder.setRootUrl(Consts.ENDPOINT_ROOT_URL).build();
  • 22. Access to RESTful APIs, no authentication Insert a new CloudEntity in the backend CloudEntity post = new CloudEntity("Guestbook"); post.put("message", "Your message here..."); EntityDto resultEntityDto = backend.endpointV1() .insert(post.getKindName(), post.getEntityDto()).execute(); CloudEntity resultCo = CloudEntity.createCloudEntityFromEntityDto (resultEntityDto); Log.i(Consts.TAG, "insert: inserted: " + resultCo);
  • 23. Step 2 Accessing to the APIs with authentication
  • 24. Authenticated access to the APIs Restrict the API access only to your application(s). ANDROID Client_ID: identifies your app in unique way (package name + SHA1 of signing key of the app) WEB Client_ID: establishes that the client and the server are from the same developer so the standard OAuth2 prompt is avoided (no 3rd party app). It’s a shared token. https://developers.google.com/appengine/docs/java/endpoints/auth
  • 29. Set Android and Web Client IDs in the backend
  • 30. Authenticated access to the APIs Set the Consts.IS_AUTH_ENABLED to true Set the Consts.WEB_CLIENT_ID to Web Client ID
  • 31.
  • 32. The Android client provides credentials! GoogleAccountCredential credential = GoogleAccountCredential.usingAudience( getActivity(), Consts.AUTH_AUDIENCE); if (credential.getSelectedAccountName() == null) { startActivityForResult( credential.newChooseAccountIntent(), REQUEST_ACCOUNT_PICKER); String accountName = data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME); credential.setSelectedAccountName(accountName); https://developers.google. com/appengine/docs/java/endpoints/consume_android#Java_Making_aut henticated_calls
  • 33. Authenticated access to the APIs Inject the credential in the backend manager class // check if credential has account name final GoogleAccountCredential gac = credential == null || credential.getSelectedAccountName() == null ? null : mCredential; // create HttpRequestInitializer HttpRequestInitializer httpRequestInitializer = new HttpRequestInitializer() { @Override public void initialize(HttpRequest request) throws IOException { if (gac != null) { gac.initialize(request); } } };
  • 34. Authenticated access to the APIs Mobilebackend.Builder builder = new Mobilebackend.Builder( AndroidHttp.newCompatibleTransport(), new GsonFactory(), httpRequestInitializer); Mobilebackend backend = builder.setRootUrl(Consts.ENDPOINT_ROOT_URL).build(); … Now the API backend framework automatically authenticates the user and enforces the authorized clientIds whitelist, ultimately by supplying a valid User to the API parameters.
  • 35. Step 3 Add push notifications
  • 36.
  • 37. Google Cloud Messaging for Android http://developer.android.com/google/gcm/index.html
  • 38. Enable GCM in the project
  • 39. Generate a Server API Key
  • 40. Generate a Server API Key
  • 41. Enable GCM in the backend
  • 42. Enable GCM in the client Set the Consts.PROJECT_NUMBER to
  • 43.
  • 44. A look into GCM client code http://developer.android.com/google/gcm/client.html Register your app and store registration ID String regId = getRegIdFromPref(); if (registrationId.isEmpty()) { regid = GoogleCloudMessaging.getInstance(context) .register(PROJECT_ID); storeRegIdToPref(regId); }
  • 45. Create a BroadcastReceiver to receive push messages @Override public void onReceive(Context context, Intent intent) { // Explicitly specify that GcmIntentService will handle the intent ComponentName comp = new ComponentName( context.getPackageName(), GCMIntentService.class.getName()); // Start service, keeping the device awake while it is launching startWakefulService(context, (intent.setComponent(comp))); setResultCode(Activity.RESULT_OK); }
  • 46. Handle the message with a Service protected void onHandleIntent(Intent intent) { Bundle extras = intent.getExtras(); GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this); String msgType = gcm.getMessageType(intent); if (extras.isEmpty()) { // has effect of unparcelling Bundle … } if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE.equals(messageType)) { … } // Release the wake lock provided by the WakefulBroadcastReceiver. GCMBroadcastReceiver.completeWakefulIntent(intent); }
  • 47. And remember to... App registration is a network operation
  • 48. Bonus Step App internal architecture
  • 49. Because API calls are slow... EntityDto resultEntityDto = backend.endpointV1() .insert(post.getKindName(), post.getEntityDto()).execute();
  • 51. CloudBackendASync extends CloudBackend // create a response handler that will receive the result or an error CloudCallbackHandler<List<CloudEntity>> handler = new CloudCallbackHandler<List<CloudEntity>>() { @Override public void onComplete(List<CloudEntity> results) { ... } @Override public void onError(IOException exception) { ... }
  • 52. CloudBackendASync extends CloudBackend // execute the query with the handler mProcessingFragment.getCloudBackend().listByKind( "Guestbook", CloudEntity.PROP_CREATED_AT, Order.DESC, 50, Scope.FUTURE_AND_PAST, handler);
  • 53. Why these two classes? Separate the logic (CloudBackend) from the sync management (CloudBackendAsync) makes the code more testable!
  • 54. Activity lifecycle (you can do better!) // Check to see if we have retained the fragment which handles asynchronous backend calls mProcessingFragment = (CloudBackendFragment) mFragmentManager. findFragmentByTag(PROCESSING_FRAGMENT_TAG); // If not retained (or first time running), create a new one if (mProcessingFragment == null) { mProcessingFragment = new CloudBackendFragment(); mProcessingFragment.setRetainInstance(true); fragmentTransaction.add(mProcessingFragment, PROCESSING_FRAGMENT_TAG); } … // execute the insertion with the handler mProcessingFragment.getCloudBackend().insert(newPost, handler); mMessageTxt.setEnabled(false); mSendBtn.setEnabled(false);
  • 55. Extends the data CloudEntity post = new CloudEntity("Guestbook"); post.put("message", "Your message here..."); post.put("alf_property", "Custom property value here..."); EntityDto resultEntityDto = backend.endpointV1() .insert(post.getKindName(), post.getEntityDto()).execute(); CloudEntity resultCo = CloudEntity.createCloudEntityFromEntityDto(resultEntityDto);
  • 56. Curious about Google dev initiatives and event in Italy? https://developersitalia.blogspot.com