A suspect charged with trying to kill US President Donald Trump took a photo of himself in his hotel room just minutes earlier, authorities say.