Accessing GPIO using andriod app

How do I execute “echo 1 > sys/class/gpio/gpio915/value” from my Android app. I have tried
Process p = Runtime.getRuntime().exec(“echo 1 > sys/class/gpio/gpio915/value\n”); But it did not work. might have info to help you. using this I was able to run commands other than “echo” . “echo 1 > sys/class/gpio/gpio915/value” is not getting executed.

Just to confirm, you don’t have a typo in your command?
It’s /sys/class/gpio…, NOT sys/class/gpio…
Missing root ‘/’.

Yes it was a typo here. I have ‘/’ in my code.

How did you determine that it didn’t work or get executed? Do you have any error logs to share? Or is it just your led not lightning up? If so, have you done echo out > /sys/class/gpio/gpioXX/direction?

Hi @Rohit Bandi,

I would like to know if you could finish your app, I am having the same problem and I have not solved yet.

Thank you in advance.