How do I type Macrons on an Android device?
ā, ă, ē, ĕ, ī, ū are all easily typable on an Android device by long-pressing the corresponding vowel. So ĭ, ŏ, ō, ŭ, ȳ and y̆ are missing.
For Samsung, I'll quote a post from here, but only in part because that procedure doesn't seem to work for me:
In your browser, find and copy the letter you need from any site.
Go to Settings > Language and input > Samsung keyboard > Predictive text > Text shortcuts.
Here, you can set keyboard shortcuts for whenever you write a certain word. Add a shortcut with your copied letter, and naturally set the corresponding vowel as the needed input for the shortcut to be shown.