Ball Physics/Platform rotation Android

im making an android app and i would like to make the platform rotate (In a 3d way) the way the tablet/phone is rotated
and i want to make a ball go in a random direction and you have to rotate the platform to keep the ball on the platform?

can anyone help me thanks :slight_smile: