Cas touched on a very important aspect--that of the tonic not being the starting or ending point of a song.
that's fine. there are lots of songs like that.
The key/ trick with such songs, is to HAVE THE TONIC INTERNALIZED IN YOUR MIND-
This is the other method I use..
You can't really tell what key a song is in by hearing 1 note, but once you hear 2 or 3 notes, you can do a run-through of the scale in your head to arrive at the tonic, sometimes you can go straight from the note to its tonic. Again this takes time to actually proactively humming the common progressions in your head--on key..
those people who change keys while singing might have a problem to do this 
I would also advise you to take some time to internalize not only the tonic, but also other tones.
You do not have to do them in order (ie, 1,2,3 etc)..
you could for instance do 1, 7, 4, 6 etc..or follow 1,6, 2,5.
Once you can identify the sounds of these, you will be able to find the key very quickly even if you are playing at a specific key & some1 starts a song in an unrelated key. This is because the mind associates certain sounds with certain "resolves/ resolvations"..
I hope this makes sense.
Of course everything heavily depends on you knowing the scales.
