Is it okay to use “oye” as a way to say hello?

I’ve used “oye” as a way to say “hey”/“hello” but my boyfriend (who is of Mexican decent and Spanish is his first language) told me “oye” is used more as “hey, look at this” or “hey, pay attention to this.”

Only one other time I’ve used “oye” with a Mexican Spanish speaker and they thought I was about to tell them something. But I’ve also used “oye” with other non-Mexican Spanish speakers and they would respond as if I had greeted them.

A little confused

submitted by /u/LightWhitePeaches
[link] [comments]