Skip to content Skip to sidebar Skip to footer

Is It Possible To Create A Google Apps Script That Manipulates A File In Android Phone?

I am using JuiceSSH for making SSH connections to my RaspberryPi whenever I want. What I need to do is swap the IP address value into the JuiceSSH configuration file with the IP ad

Solution 1:

Google Apps Script cannot directly access any files except those in your Google Drive.

You may be able to empower a script to indirectly change the JuiseSSH config - if you can...

  1. Figure out where it is.
  2. Set up a web server on your phone to accept incoming POST operations.
    • See this LifeHacker blog.
    • When a valid POST is received, decode the payload and use it to update the local file.
    • There will be security issues with this!
  3. Write your Google Apps Script
    • Monitor your email for a message about a change in your Raspberry PI's IP address.
    • Figure out how to track the phone's IP address!
    • POST the update to your phone.
    • retry periodically until the POST is successful (since the phone's connection is not reliable)

Another approach would be to have a Google Apps Script WebService serve up the current address of the device; then a program on the phone could periodically reach out to the service to find out the address, and update the file.

Of course, if you connected to your Raspberry PI using a name instead of an IP address, you wouldn't have to worry about any of this.

Post a Comment for "Is It Possible To Create A Google Apps Script That Manipulates A File In Android Phone?"