[英]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. 我随时使用JuiceSSH来建立与RaspberryPi的SSH连接。 What I need to do is swap the IP address value into the JuiceSSH configuration file with the IP address that will be sent by RaspberryPi in case of IP address change. 我需要做的是将IP地址值交换到JuiceSSH配置文件中,并在IP地址更改的情况下将RaspberryPi发送该IP地址。 I am thinking about using a google apps script in which I can get the new IP address value from the e-mail. 我正在考虑使用Google Apps脚本,从中可以从电子邮件中获取新的IP地址值。 But I don't know where the JuiceSSH app holds the configurations. 但是我不知道JuiceSSH应用程序在哪里保存配置。 And I do not also know whether I can manipulate any file into an android phone using a google apps script. 而且我也不知道我是否可以使用Google Apps脚本将任何文件操作到Android手机中。
Google Apps Script cannot directly access any files except those in your Google Drive. 除Google云端硬盘中的文件外,Google Apps脚本无法直接访问其他文件。
You may be able to empower a script to indirectly change the JuiseSSH config - if you can... 您可能可以授权脚本来间接更改JuiseSSH配置-如果可以的话...
Another approach would be to have a Google Apps Script WebService serve up the current address of the device; 另一种方法是让Google Apps脚本Web服务提供设备的当前地址。 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. 当然,如果使用名称而不是IP地址连接到Raspberry PI,则无需担心任何这些。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.