• Home
  • About me
  • Curriculum
  • Projects
Facebook Linkedin Twitter

MauroCerbai

Software Engineer

Oggi si è tenuto il Google I/O: la conferenza annuale in cui big G presenta i nuovi prodotti e le nuove funzionalità dei loro servizi.
Saltiamo i preamboli, quali sono questi tre annunci?

1.Smart Action Suggestion for Google Photo
L'app Photo vi proporrà delle azioni a secondo del contesto  della foto. Per esempio condividere la foto con la persona che compare nella foto insieme a voi, oppure colorare una vecchia foto in bianco e nero. Una di queste azioni l'abbiamo tutti fatta spesso ma ora è più facile: convertire una foto in un documento. Google riconoscerà che è un documento e creerà automaticamente per voi un documento pdf.




2.AR Indication in Google Maps
Per semplificarvi la vita come non mai, invece di cercare di capire il nome della strada dalle targhe sempre troppo distanti da voi, Google ha inserito la possibilità di visualizzare le indicazione per il vostro tragitto sovrapposte alle immagini provenienti dalla vostra camera. Il risultato è incredibilmente semplice ed efficace.



3.Automatic Appointment Assistant
Questa la prevedo difficile da spiegare. Praticamente quando voi chiederete al vostro Assistente Google di prenotarvi un appuntamento dal vostro parrucchiere di fiducia in un giorno preciso in una fascia di orario (es. mercoledi dalle 10 alle 12) i servizi di Google si attiveranno e faranno una chiamata al negozio e concorderanno l'appuntamento con la proprietaria. Facile no? Se non fosse che dietro non c'è un call center ma un assistente virtuale robotico (lo stesso del vostro google assistant) che parlerà in maniera naturale ma soprattutto dovrà capire le risposte dell'interlocutore con l'obiettivo di concordare una data ed ora che soddisfi sia le vostre necesssità che quelle del negoziante.
Quest'ultima funzionalità è incredibile, fa impressione scoprire i passi da gigante che hanno fatto il machine learning, il cloud natural processing ed il cloud to speech. Guardate il video su youtube: https://youtu.be/D5VN56jQMWM


Nelle foto vedete il tempo esatto per poterle rivedere da video live disponibile a questo indirizzo: https://www.youtube.com/watch?v=ogfYd705cRs
Share
Tweet
Pin
Share
No commenti



Ma tu lo conosci Kotlin? Vieni a scoprire il linguaggio ad oggetti progettato da JetBrains con due workshop esclusivi organizzati dal GDG Torino!Che tu voglia sviluppare su Android al meglio o scoprire le potenzialità di questo nuovo linguaggio in un contesto inedito, questo è l’evento per te!
Due talk con due speaker d'eccezione: Mercoledì 4 aprile alle 18:30, presso la sede di Leva Engineering in Via Vincenzo Gioberti 18, prenderanno la parola Roberto Orgiu, GDE esperto di sviluppo Android e Roberto Franchini, CTO di Arcade.
https://www.meetup.com/it-IT/GDG-Torino/events/248799142/?eventId=248799142

LIVE ACTION:
Roberto Orgiu:

  • extension function
  • inline
  • reified
  • destructuring declarations
  • dataclass
  • component
  • operator
  • apply, let, with, run

Roberto Franchini:
  • live coding session handling twitter stream & save on OrientDB


Share
Tweet
Pin
Share
No commenti
We both know that programming Android is mostly rewriting a number of times the same things.
Well here we are, save this page on the bookmarks and copy/paste when you need it.

FINDVIEWBYID

 mWeatherTextView = (TextView) findViewById(R.id.tv_weather_data);  

READ JSON DATA

 JSONObject weatherdata = new JSONObject (JSONstring);  
 JSONObject weather = weatherdata.getJSONObject("weather");  
 String condition = weather.getString("condition");  

BUILD URI AND CONVERT TO URL

 Uri builturi = Uri.parse(BASE_URL).buildUpon()  
     .appendQueryParameter(QUERY_PARAM, param)  
     .build();  
 URL url = null;  
 try {  
   url = new URL(builturi.toString());  
 } catch (MalformedURLException e) {  
   e.printStackTrace();  
 }  
 return url;  

EXECUTE ASYNCTASK

 new GithubQueryTask().execute(githubSearchUrl);  


ADD MENU IN TOP BAR

 @Override  
 public boolean onCreateOptionsMenu(Menu menu) {  
   MenuInflater inflater = getMenuInflater();  
   inflater.inflate(R.menu.forecast, menu);  
   return true;  
 } 

 @Override  
 public boolean onOptionsItemSelected(MenuItem item) {  
   if (item.getItemId() == R.id.action_refresh) {  
     mWeatherTextView.setText("");  
     loadWeatherData();  
     return true;  
   }  
   return super.onOptionsItemSelected(item);  
 }  

EXPLICIT INTENT

 Intent intent = new Intent(this, SettingsActivity.class);  
 startActivity(intent);  


INTENT FOR EXTERNAL MAP

 Intent intent = new Intent(Intent.ACTION_VIEW);  
 Uri uri = new Uri.Builder().scheme("geo").path("0,0").query("california").build();  
 intent.setData(uri);  
 if (intent.resolveActivity(getPackageManager()) != null) {  
   startActivity(intent);  
 }  

SHARE INTENT

 Intent shareIntent = ShareCompat.IntentBuilder.from(activity)  
  .setType("text/plain")  
  .setText(shareText)  
  .getIntent();  
 if (shareIntent.resolveActivity(getPackageManager()) != null) {  
  startActivity(shareIntent);  
 }  

ITEM IN THE ACTION BAR

 <item  
   android:id="@+id/action_share"  
   android:title="Share"  
   android:orderInCategory="1"  
   app:showAsAction="ifRoom"/>  

ASYNCTASKLOADER

(it handles lifecycle)
 @Override  
 public Loader<String[]> onCreateLoader(int id, Bundle args) {  
   return new AsyncTaskLoader<String[]>(this) {  
     String[] weatherData = null; //Cache data  
     @Override protected void onStartLoading() {}//Check cache data and show progress bar then forceLoad()  
     @Override public String[] loadInBackground() {}//Get data from prefences or bundle and do network request  
     @Override public void deliverResult(String[] data) {}//save data in cache  
   };  
 }  

USE PREFERENCEFRAGMENT

SHAREDPREFERENCES

 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);  
 sharedPreferences.getBoolean("show_bass", true);  


LISTEN TO SWYPE ON RECYCLEVIEW

 new ItemTouchHelper(new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {  
   @Override  
   public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {  
     return false;  
   }  
   @Override  
   public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {  
     long id = (long) viewHolder.itemView.getTag();  
     removeGuest(id);  
     mAdapter.swapCursor(getAllGuests());  
   }  
 }).attachToRecyclerView(waitlistRecyclerView);  


Here some interesting images too:



Share
Tweet
Pin
Share
No commenti
Every time I open Android Studio this come to mind is this

IMHO


Observer Pattern? MVC? MVP? MVVM? I don't know
Do Androids (Programmer) Dream of Code Order?

Take a look at this post I found useful. Bye
Share
Tweet
Pin
Share
No commenti

Firebase Analytics is a free app measurement solution that provides insight on app usage and user engagement

The new incredible thing Google pull from a hat. A incredible versatile library to analyze data and user engament. Would you like to try it out? Well listen here.

How to add firebase analytics to an android app

  • Create a project on the firebase console : https://console.firebase.google.com/
  • Enter your app's package name
  • Donwload the json file provided and insert into the "app" folder in your android project

  • Then add this inside dependencies on your root level build.gradle
  • classpath 'com.google.gms:google-services:3.0.0'

  • And this at the bottom of the app level build.gradle
  • apply plugin: 'com.google.gms.google-services'
  • Inside the same file but under "dependencies" you put this
compile 'com.google.firebase:firebase-core:9.2.1'

  • Declare a "FirebaseAnalytics" object on top of your MainActivity and the onCreate initialize it
  • mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Now you have your basic analytics data provided by the default event. You wanna add your own? Easy.

How to add your custom event

You create a bundle and insert all the information you need the event you want to control. Take a look at the FirebaseAnalytics.Param for suggested event.
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, name);
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
That's it.
Share
Tweet
Pin
Share
No commenti

I attended Google I/O 2016 Extended in Milan.
Nice people, nice place (thanks Subito).


 But the news? mmmm I bet they could do better: they didn't show anything on the "conversational" Google Now nor the Google Home but they show up another crazy messaging app. The fourth I think. Hangouts will be kicked back in the line, again...
Come on Google, you can do better than this.


Thanks to Subito for their amazing stuff and hospitality.

Share
Tweet
Pin
Share
No commenti
Older Posts

About me


Smiley face
Computer Science Degree, technology enthusiast, programmer, interested in startup & innovation, curious, precise & organized.

Follow Me

  • Facebook
  • Linkedin
  • Twitter
  • Bitbucket
  • Github

recent posts

Categories

  • dev
  • development
  • software
  • learn
  • learning
  • machine
  • machine learning
  • study
  • android
  • google
  • job
  • scikit
  • sklearn
  • app
  • udacity
  • gdg
  • google play
  • html
  • code
  • electronics
  • linux
  • script
  • uda
  • webgl
  • database
  • gdgmilano
  • help
  • open source
  • programming
  • smartphone
  • torino
  • weekend
  • work
  • workshop
  • 3d
  • firebase
  • gps
  • greatmind
  • hardware
  • location
  • personal computer
  • start up
  • .bashrc
  • GB
  • PS3
  • Vallée des Merveilles
  • action
  • analytics
  • audio
  • avi
  • bayes
  • books
  • bug
  • cpu
  • dinolib
  • docker
  • fake
  • ffmpeg
  • force
  • francaise
  • france
  • francia
  • free
  • gear 360
  • gglass
  • git
  • gitconfig
  • glass
  • hdd
  • hike
  • hiring
  • jenkins
  • joke
  • kde
  • kmix
  • magnetism
  • material
  • materialdesign
  • merge-it
  • messaging
  • microservices
  • mint
  • naive bayes
  • navigation drawer
  • nemo
  • nikola
  • nikolatesla
  • pc
  • ram
  • reading
  • refuge
  • samsung
  • space
  • spain
  • ssd
  • steam
  • tesla
  • unturned
  • valle delle meraviglie
  • veromix
  • versioning
  • windows
  • wizard
  • wolley
  • wolleybuy
  • xvid

Blog Archive

  • ottobre (1)
  • settembre (1)
  • gennaio (1)
  • novembre (1)
  • maggio (1)
  • aprile (1)
  • marzo (3)
  • febbraio (3)
  • gennaio (1)
  • novembre (7)
  • ottobre (4)
  • settembre (3)
  • agosto (1)
  • luglio (1)
  • settembre (1)
  • agosto (1)
  • giugno (2)
  • aprile (2)
  • marzo (1)
  • febbraio (3)
  • gennaio (2)
  • novembre (1)
  • agosto (2)
  • luglio (2)
  • giugno (3)
  • marzo (1)
  • novembre (1)
  • ottobre (1)
  • agosto (1)
  • giugno (1)
  • maggio (2)
  • marzo (2)
  • febbraio (1)
Facebook Linkedin Twitter Bitbucket Github

Created with by ThemeXpose | Distributed By Gooyaabi Templates