The latest Gmail update for Android and iOS addresses this hassle by placing a "Copy code" button directly in the main inbox.