Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] Looking for a way to control android with (code-heavy) custom scripts

OP storm3012

12th May 2014, 04:19 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: May 2014
Hi,

First time here. Glad to find a place with so many users and activity. I was hoping I could get some general information about a task I am trying to accomplish.

I am looking for a code-heavy way of controlling an android phone with scripts. For example, can you hook your android up to your PC and then control it virtually as if you were doing everything with your finger using scripts?

In my mind I imagine the code would look something like this (this is fake code):

1. var i = 30px;
2. Touch the screen at coordinates x, y;
3. Scroll to cords x, y minus i;
4. Touch the screen at cords x, y;
5. Swipe to cords x + 80, y;
6. Single click cords x, y;
7. if (cords x, y = rgb(0, 0-255,0) { //aka a shade of green
8. var count = count++ }

I can code in several languages including Java, and am just starting out in this so any help would greatly be appreciated.

Thank you
12th May 2014, 04:38 PM   |  #2  
shimp208's Avatar
Recognized Contributor
Flag Boston
Thanks Meter: 1,655
 
2,296 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Quote:
Originally Posted by storm3012

Hi,

First time here. Glad to find a place with so many users and activity. I was hoping I could get some general information about a task I am trying to accomplish.

I am looking for a code-heavy way of controlling an android phone with scripts. For example, can you hook your android up to your PC and then control it virtually as if you were doing everything with your finger using scripts?

In my mind I imagine the code would look something like this (this is fake code):

1. var i = 30px;
2. Touch the screen at coordinates x, y;
3. Scroll to cords x, y minus i;
4. Touch the screen at cords x, y;
5. Swipe to cords x + 80, y;
6. Single click cords x, y;
7. if (cords x, y = rgb(0, 0-255,0) { //aka a shade of green
8. var count = count++ }

I can code in several languages including Java, and am just starting out in this so any help would greatly be appreciated.

Thank you

After taking a look at what your trying to accomplish I would recommend you take a look at the official Android monkeyrunner API. It's a great starting point for controlling an Android device through external code (Through your computer).
12th May 2014, 04:50 PM   |  #3  
OP Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: May 2014
Quote:
Originally Posted by shimp208

After taking a look at what your trying to accomplish I would recommend you take a look at the official Android monkeyrunner API[/URL]. It's a great starting point for controlling an Android device through external code (Through your computer).

Thank you! I will read through this API and see how it works.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes