码迷,mamicode.com
首页 > 其他好文 > 详细

sl4a

时间:2015-02-09 17:39:45      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:

First make sure you have the script launcher add-on, and of course SL4A itself. You’ll probably also want an interpreter (Python, Ruby, etc.) for SL4A installed.

The steps for creating a script task are:

  1. Create a new task
  2. Make sure the action type is VIEW
  3. Go to select the data, choose “Select script”
  4. Pick the script you want
  5. Go to select the activity, choose background or foreground (you probably want background)

Now you can run it using Quick Run, an alarm, etc.

To run it every 5 minutes you have to create a schedule:

  1. Create a new schedule
  2. Go to schedule items
  3. Add a new item
  4. Select the script task as the item’s action
  5. Change the repeat interval to 00:05:00

Now you have a schedule that runs a script every 5 minutes from START to STOP (the time you start the schedule to the time you stop the schedule). For example to run it every 5 minutes between now and 2 hours from now:

  1. Go to Quick Run
  2. Select the schedule as the action
  3. Change the duration to 02:00:00
  4. Press Run

Along the way you can try different scenarios without having to actually run them by using the “Calculate” function.

 

 

http://androidideas.org/taskbomb/tutorials/running-a-script-every-5-minutes/

sl4a

标签:

原文地址:http://www.cnblogs.com/jvava/p/4281803.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!