Potty training problem

My nephew is 6 years old, and he still pees and poops in his pants almost daily. Sometimes he’ll pee multiple times a day. He gets so focused on his tablet, or playing with his toys and will just go in his pants and then sit in it. I’ve tried a diaper when he’s at my house and he rips it off. I’ve also tried setting alarms every hour and making him go sit on the toilet, and he still has accidents. Anybody have any tips or ideas on how to get him fully potty trained? I’m sick of him peeing on my floor and furniture whenever he’s at my house.

Edit: I should of further explained the situation. He has been to a doctor, and there is no medical issue. My sister thinks he might have ADHD, but doctors aren’t sure. It’s also not just the tablet. He could be playing with his cars, and will go pee. He has this issue at everybody’s house not just mine. I’ve had him before just take a relax day at my house and sit on the couch hoping he wouldn’t be too distracted to pee, but he will focus on the littlest thing, and it’s hard to get his attention away from it. Also my sister has three children, and the oldest one has an extreme medical condition where she still has to wear diapers at the age of 12, because she can’t walk, talk, or go to the bathroom. My nephew sees that she still wears diapers, and because of that he has said that he’s allowed to wear diapers, because he’s younger (even though he actually hates diapers or pull ups.) My sister also has always had trouble getting him to go on the toilet since she started potty training him.