Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,814,481 Members 54,287 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
storm3012
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 2
Join Date: May 2014
Default [Q] Looking for a way to control android with (code-heavy) custom scripts

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
 
shimp208
Old
#2  
shimp208's Avatar
Recognized Contributor
Thanks Meter 1,547
Posts: 2,238
Join Date: Jan 2011
Location: Boston

 
DONATE TO ME
Quote:
Originally Posted by storm3012 View Post
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).
 
storm3012
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 2
Join Date: May 2014
Quote:
Originally Posted by shimp208 View Post
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.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes