Profile

Cover photo
David G.
Works at Etat de Vaud
145 followers|176,169 views
AboutPosts+1's

Stream

David G.

Help Center  - 
 
Hi there.
I am reading GCM tutorials and I need some explanations about InstanceID and RegistrationIntentService (gcm.play.android.samples.com.gcmquickstart)

In the javadoc I read, RegistrationIntentService of gcmsender app (android samples) , the Intent is launch at each application startup. The following code is then called :

InstanceID instanceID = InstanceID.getInstance(this);
String token = instanceID.getToken(getString(R.string.gcm_defaultSenderId),
GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
...

sendRegistrationToServer(token);

// Subscribe to topic channels
subscribeTopics(token);

It is written "Initially this call goes out to the network to retrieve the token, subsequent calls are local." So I assume each time I request a token, only the first time a network call is made ? (first time I launch the application). If true : why this code is written without a if condition ? Why do I need to request it each time ? Why should I start this Intent at each application startup?

It is written that I have to store a boolean preference if the token has already been sent to my server. It is the reason I think it is necessary to call InstanceID and subscribeTopics at each app start but I don't understand why exactly.
3
Darish Joy's profile photoDavid G.'s profile photo
2 comments
 
So the RegistrationIntent is necessary the first time and on each server token refresh request ?
Add a comment...

David G.

Shared publicly  - 
1
Add a comment...

David G.

Shared publicly  - 
 
 
The newest Raspberry Pi costs just $5, and is available to buy now. It's free with the December issue of +The MagPi, in UK stores today.
Of all the things we do at Raspberry Pi, driving down the cost of computer hardware remains one of the most important. Even in the developed world, a programmable computer is a luxury item for a lot of people, and every extra dollar that we ask someone to spend decreases the chance that they’ll choose …
82 comments on original post
3
Dutoit Cédric's profile photoDavid G.'s profile photo
2 comments
 
Manque le réseau, voir si un dongle wifi irait..

 ·  Translate
Add a comment...

David G.

Shared publicly  - 
 
 
Voilà pourquoi nous devons utiliser le système de mesure impérial. 
 ·  Translate
View original post
2
Dutoit Cédric's profile photo
 
La vérité est ailleurs...
 ·  Translate
Add a comment...

David G.

Shared publicly  - 
 
The Pirate Bay - Away from keyboard. Un film a télécharger et à regarder
 ·  Translate
1
Add a comment...
Have him in circles
145 people
Alexandre Berthoud's profile photo
Pup Code's profile photo
Catalin Cirstoiu's profile photo
Sarah Lee's profile photo
Giampaolo Tranchida's profile photo
Nda Towo's profile photo
Joao Santos's profile photo
Julien Hattab's profile photo
Léa Humberset's profile photo

David G.

Shared publicly  - 
 
Reuters photographer Arnd Wiegmann has been visiting and documenting some of the thousands of military bunkers and fortresses installed across Switzerland, most dating back to Word War II.
3
Add a comment...

David G.

Shared publicly  - 
 
 
Short video tutorial on running Protractor with headless Chrome on Docker.

As a bonus performance race between two Protractors: dockerised and installed directly on the host.

Docker Hub repo: https://hub.docker.com/r/webnicer/protractor-headless/
View original post
1
Add a comment...

David G.

Help Center  - 
 
I want to write an app which can be used on phones and tablets. I want to share the data between the devices it they are setup with the same Google account. Real example : EBook reader, your read a bit on your phone, then, at home, you want to continue on your tablet and have the read position automatically updated. What would you use (cloud data store) to share this data? Dropbox or drive is what I think about but do you know other better possibilities?
1
1
Soy Nerdito's profile photoDiego D's profile photoDavid G.'s profile photoNiek Haarman's profile photo
5 comments
 
Or have a look at Cloud Save. Very simple, no server side coding needed. Realtime updates using GCM are not necessary, just fetch the saved data on app open.
Add a comment...

David G.

Shared publicly  - 
2
Add a comment...

David G.

Shared publicly  - 
 
tracepath 216.81.59.173
1
Dutoit Cédric's profile photo
 
(...privé...)
  5   132 ms    67 ms    33 ms  62-179-118-21.ch-gva01a-ra1.aorta.net [62.179.11
8.21]
  6    68 ms    48 ms    38 ms  84.116.136.205
  7     *       47 ms    37 ms  ch-zrh01b-ra1-ae-9-0.aorta.net [84.116.134.22]
  8   135 ms    41 ms    56 ms  213.46.171.42
  9   141 ms   166 ms   185 ms  xe-3-2-0.atl11.ip4.tinet.net [89.149.182.217]
 10   259 ms   173 ms   153 ms  epik-networks-gw.ip4.tinet.net [77.67.69.158]
 11   154 ms   152 ms   209 ms  po0-3.dsr2.atl.epikip.net [216.81.59.2]
 12   239 ms   191 ms   181 ms  10.26.26.102
 13   195 ms   257 ms   179 ms  Episode.IV [206.214.251.1]
 14   241 ms   245 ms   248 ms  A.NEW.HOPE [206.214.251.6]
 15   194 ms   272 ms   198 ms  It.is.a.period.of.civil.war [206.214.251.9]
 16   291 ms   201 ms   482 ms  Rebel.spaceships [206.214.251.14]
 17   277 ms   437 ms   182 ms  striking.from.a.hidden.base [206.214.251.17]
 18   193 ms   222 ms   195 ms  have.won.their.first.victory [206.214.251.22]
 19   280 ms   193 ms   186 ms  against.the.evil.Galactic.Empire [206.214.251.25
]
 20   203 ms   197 ms   221 ms  During.the.battle [206.214.251.30]
 21   208 ms   228 ms   226 ms  Rebel.spies.managed [206.214.251.33]
 22   267 ms   229 ms   221 ms  to.steal.secret.plans [206.214.251.38]
 23   238 ms   220 ms   196 ms  to.the.Empires.ultimate.weapon [206.214.251.41]

 24   277 ms   346 ms   269 ms  the.DEATH.STAR [206.214.251.46]
 25   203 ms   384 ms   452 ms  an.armored.space.station [206.214.251.49]
 26   326 ms   294 ms   270 ms  with.enough.power.to [206.214.251.54]
 27   248 ms   223 ms   186 ms  destroy.an.entire.planet [206.214.251.57]
 28   237 ms   302 ms   240 ms  Pursued.by.the.Empires [206.214.251.62]
 29   344 ms   243 ms   303 ms  sinister.agents [206.214.251.65]
 30   241 ms   258 ms   259 ms  Princess.Leia.races.home [206.214.251.70]

Trace complete.
Add a comment...
People
Have him in circles
145 people
Alexandre Berthoud's profile photo
Pup Code's profile photo
Catalin Cirstoiu's profile photo
Sarah Lee's profile photo
Giampaolo Tranchida's profile photo
Nda Towo's profile photo
Joao Santos's profile photo
Julien Hattab's profile photo
Léa Humberset's profile photo
Collections David is following
Links
YouTube
Work
Employment
  • Etat de Vaud
    present
Basic Information
Gender
Male
Apps with Google+ Sign-in
  • Macronos
  • SimCity Mobile
David G.'s +1's are the things they like, agree with, or want to recommend.
GTA: Chinatown Wars
market.android.com

LEFT FOR DEAD IN THE WORST PLACE IN AMERICAFollowing his father's murder, Huang Lee has a simple mission: deliver an ancient sword to his Un

Flic: The Wireless Smart Button
www.indiegogo.com

The wireless button that creates a shortcut to your favorite actions on your phone.

Feedly: Blogs, RSS News Reader
market.android.com

All your favorite websites in one place.Instead of having to hunt down for news, feedly aggregates the contents of your favorite sites and d

Java EE 7 et l’API Java pour WebSocket (JSR 356) |
mgreau.com

4 nouvelles spécifications : Java API for WebSocket 1.0 , Java API for JSON Processing 1.0 , Batch Applications 1.0 et Concurrency Utilities

SomaPlayer
chrome.google.com

Listen to SomaFM web radio stations from your browser and scrobble tracks to your Last.fm account.

Skype - free IM & video calls
market.android.com

Say “hello” to friends and family with an instant message, voice or video call on Skype for free. Join the millions of people using Skype to

Splashy Fish
market.android.com

The new amazing Splashy Fish is now available on Android.Tap on your device to make the little bird fish swim. Avoid obstacles to level up,

[Flute] Get Lucky - Daft Punk ft. Pharrel Williams
www.youtube.com

For Flute (the background parts are hidden). Print here: http://shazammusic.com/

Ruby on Rails
www.rubyonrails.org

“Ruby on Rails is a breakthrough in lowering the barriers of entry to programming. Powerful web applications that formerly might have taken

Tasks
market.android.com

Tasks brings the full Google Tasks experience to Android. * Sync with Google Tasks at the core * Sync with Google Tasks is not just another

SwiftKey 3 Keyboard
market.android.com

Unlock your typing potential.* Webby Awards People’s Voice Winner for Innovation, 2012 * * Mobile World Congress Award Winner for Innovation

Andropal
market.android.com

Andropal is a remote controller for the Freecom internet radio : Musicpal. This application replaces the previous market application with th

Dropbox
market.android.com

Dropbox is a free service that lets you bring all your photos, docs, and videos anywhere. After you install Dropbox on your computer, any fi

Moon+ Reader Pro
market.android.com

New designed book reader with powerful controls & full functions, supports epub, pdf, mobi, chm, cbr, cbz, umd, fb2, txt, html, rar, zip or

Chrome
market.android.com

Search and browse fast with Chrome on your Android phone and tablet. Sign in to sync your personalized Chrome experience from your computer

Gmail
market.android.com

The Gmail app: push, sync, conversations, integration, search, and more. The dedicated Gmail application integrated with Contacts and Androi

Google Reader
market.android.com

Follow all your favorite sites, blogs, and more, all in one place. Follow all your favorite sites, blogs, and more, all in one place. See wh

Grand Theft Auto: Vice City
market.android.com

Welcome back to Vice City. Welcome back to the 1980s.From the decade of big hair, excess and pastel suits comes a story of one man's rise to

Albanel Open Office Pare-Feu [HADOPI]
www.youtube.com

Albanel Open Office Pare-Feu [HADOPI]

Critical Strike Portable
market.android.com

Critical Strike Portable - Cross-platform 3D FPS MMO for Android, iOS and Web! "FPS fans, the moment you have been waiting for has finally a