How can i use GPIO function in android or Linux apps?

hi,i want to connect an OLED screen to Bpi-W2 for status print.is there a way that i can control gpio port in android app or linux?thanks