Re: [android-developers] Re: GUI with monkeyrunner

2012-10-16 Thread Bill Napier
On Tue, Oct 16, 2012 at 12:39 PM, Lew  wrote:
> I don't know about your specific modules, but you don't have to use Python
> to use monkeyrunner.jar; you could write code in Java, too.
>
> Java has GUIs available for it.
>
> Which, since Jython can use Java jars, might give you the ability to use
> Java GUIs within your Python script for monkeyrunner.
> http://wiki.python.org/jython/UserGuide#accessing-java-from-jython

Or if you really want to hurt your head, you can use Java Swing from
python code.  But I don't recommend it.

If you poke around in the monkeyrunner source code you'll see that
there is the start of some UI in there already, so there are examples
of how to build a standalone java app without having to pull in all
the jython stuff.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] How to improve MonkeyRecorder's low refresh rate?

2012-02-22 Thread Bill Napier
The limit here is the speed at which ADB can take screenshots and send the
data over USB, nothing else.

Might want to take a look at how some of the android vnc ports work, as
that may be a more workable solution.

On Sun, Feb 19, 2012 at 8:20 AM, antiAgainst  wrote:

> Hi, all! Recently I'm working on a course project in which I need to show
> Android device's screen on PC dynamically. Besides, I also need to record
> user's operations and replay it on different devices. I looked into Android
> SDK, and found that MonkeyRecorder provided by the monkeyrunner tool
> can fulfill these two requirements. However, there are problems about it.
> Because the MonkeyRecorderFrame is implemented by Java AWT and Swing,
> it seems snapshots from device cannot be refreshed very quickly in
> MonkeyRecorderFrame (extends JFrame). So the PC cannot completely
> synchronizes with the device. How can this situation be improved?
> Need I to rewrite the MonkeyRecorder using some other efficient languages?
> I'd really appriciate if you could give me any advice.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Is it possible to use MonkeyRunner from java

2011-08-22 Thread Bill Napier
We re-factored a bunch of code to take a lot of the MonkeyRunner source and
make it available as a library, specifically for people doing project
similar to what you're doing.  You should probably stop depending on the
monkeyrunner.jar and start depending on chimpchat.jar (the new java library
that encapsulates this functionality).  A new example looks like this:

Map options = new TreeMap();
options.put("backend", "adb");
ChimpChat chimpchat = ChimpChat.getInstance(options);
IChimpDevice device = chimpchat.waitForConnection();

Which is the same snippet as before, but with the updated code.

Bill

On Sat, Aug 20, 2011 at 1:34 PM, Vikram  wrote:

> Dear Bill,
>
> Why would I be getting the following error while trying to compile ?
>
> Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved
> compilation problem:
> Type mismatch: cannot convert from AdbBackend to IMonkeyBackend
>
> AM using what you had quoted to initiate the connection to the device.
>
> CHeers,
> Vikram.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] About com.android.monkeyrunner package

2011-07-26 Thread Bill Napier
What command are you running your script with?

On Tue, Jul 26, 2011 at 4:50 AM, Awdhesh Jha wrote:

> I can't find the package com.android.monkeyrunner. Without it I can't
> work on the monkey device.
> The errors are comming when I run my program which name is monkey.py
>
>
> ===
> *sys-package-mgr*: can't create package cache dir, '/usr/share/java/
> jython-2.2.1.jar/cachedir/packages'
> Traceback (innermost last):
>  File "/home/awdhesh/Programs/Python Programs/monkey.py", line 2,
> in ?
> ImportError: no module named android
>
> ===
>
> ===
> And the program is:
>
> # Imports the monkeyrunner modules used by this program
> from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
> #from com.Simple.Calculator.SimpleCalculatorActivity import *
> device = MonkeyRunner()
> # Connects to the current device, returning a MonkeyDevice object
> device = MonkeyRunner.waitForConnection(30)
>
> # Installs the Android package. Notice that this method returns a
> boolean, so you can test
> # to see if the installation worked.
> device.installPackage('awdhesh/bin/android-sdk-linux_x86/tools/
> monkeyrunner.apk')
>
> # sets a variable with the package's internal name
> package = 'com.Simple.Calculator'
>
> # sets a variable with the name of an Activity in the package
> activity = 'com.Simple.Calculator.SimpleCalculatorActivity'
>
> # sets the name of the component to start
> runComponent = package + '/' + activity
>
> # Runs the component
> device.startActivity(component=runComponent)
>
> # Presses the Menu button
> device.press('KEYCODE_MENU','DOWN_AND_UP')
>
> # Takes a screenshot
> result = device.takeSnapshot()
>
> # Writes the screenshot to a file
> result.writeToFile('res/drawable/shot1.png','png')
>
> ===
> Please send me the solution on my mail
> awdheshkumar@gmail.com
>
> Thanks in advance
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to perfrom long press on screen, and how to get text on screen in monkeyrunner

2011-07-11 Thread Bill Napier
Oh, and there currently is no way to get text from the screen.  It's
something we are working on, but it's not yet ready.

On Mon, Jul 11, 2011 at 3:31 PM, Bill Napier  wrote:

> device.press('KEY_MENU', MonkeyDevice.DOWN_AND_UP) is what I think you
> want.  I think the docs are currently incorrect.
>
> DOWN_AND_UP means to send both the down event and the up event, which
> should simulate a press of the button.
>
>
> On Mon, Jul 11, 2011 at 12:58 AM, frank  wrote:
>
>> Hi All
>>
>>  I am writing scripts on monkeyrunner to test screen verification.
>> I want to get screen text and verifiy the same to perform touch and
>> press action
>> on the screen items.
>>
>> The below command takes only key presses,
>> device.press('KEY_MENU', 'DOWN')
>>
>> Can you anyone help me with some option to perform touch and press on
>> screen.
>> Also to get and verify screen contents like text.
>>
>> regards,
>> Frank
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to perfrom long press on screen, and how to get text on screen in monkeyrunner

2011-07-11 Thread Bill Napier
device.press('KEY_MENU', MonkeyDevice.DOWN_AND_UP) is what I think you want.
 I think the docs are currently incorrect.

DOWN_AND_UP means to send both the down event and the up event, which should
simulate a press of the button.

On Mon, Jul 11, 2011 at 12:58 AM, frank  wrote:

> Hi All
>
>  I am writing scripts on monkeyrunner to test screen verification.
> I want to get screen text and verifiy the same to perform touch and
> press action
> on the screen items.
>
> The below command takes only key presses,
> device.press('KEY_MENU', 'DOWN')
>
> Can you anyone help me with some option to perform touch and press on
> screen.
> Also to get and verify screen contents like text.
>
> regards,
> Frank
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Is it possible to use MonkeyRunner from java

2011-06-27 Thread Bill Napier
MonkeyRunner actually has a small example of doing this in it's own source
code:

http://android.git.kernel.org/?p=platform/sdk.git;a=blob;f=monkeyrunner/src/com/android/monkeyrunner/controller/MonkeyController.java;h=ca3195c15ca45735bd971c9c4f56b9e97fe9b94d;hb=HEAD

IMonkeyBackend adb = new AdbBackend();
IMonkeyDevice device = adb.waitForConnection();

And you can see the IMonkeyDevice source here:
http://android.git.kernel.org/?p=platform/sdk.git;a=blob;f=monkeyrunner/src/com/android/monkeyrunner/core/IMonkeyDevice.java;h=9c06ec49fc291ffe331d20f3472dffb41539024b;hb=HEAD

And see that it has a bunch of methods on it like "takeSnapshot", "touch",
"drag", etc.

Hopefully that's enough to get you started.

Bill

On Fri, Jun 24, 2011 at 7:27 PM, Karthikeyan R wrote:

> Hi Bill,
>
> Thank you so much for sharing the information.
>
> we wanted to create a automation framework in java having MonkeyRunner
> as base.
>
> Could you give me one small sample using java, it will be really
> helpful for us.
>
> To give you a context we wanted to automated the device as a whole
> where we interact with multiple apk's  hope our choice of monkey
> runner is right for that.
>
> Thank you in advance.
>
> Thanks
> --Karthik
>
> On Jun 24, 10:39 am, Bill Napier  wrote:
> > If you mean from Java on the phone (like as part of an application), then
> > the answer is no.
> >
> > If you mean from Java on a computer, then the answer is yes.  You just
> need
> > to make your java project depend on the MonkeyRunner.jar and you can call
> > some of it's internal classes to do what you need.
> >
> > We're in the middle of changing how the code is structured to make this
> even
> > easier, but it's not quite ready yet.
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Jun 22, 2011 at 8:16 PM, Karthik  wrote:
> > > Hi,
> >
> > > Is it possible to use monkeyrunner from java.
> >
> > > If yes please let me know the approach.
> >
> > > Thanks in advance
> >
> > > Thanks
> > > --Karthik
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is it possible to use MonkeyRunner from java

2011-06-24 Thread Bill Napier
If you mean from Java on the phone (like as part of an application), then
the answer is no.

If you mean from Java on a computer, then the answer is yes.  You just need
to make your java project depend on the MonkeyRunner.jar and you can call
some of it's internal classes to do what you need.

We're in the middle of changing how the code is structured to make this even
easier, but it's not quite ready yet.

On Wed, Jun 22, 2011 at 8:16 PM, Karthik  wrote:

> Hi,
>
> Is it possible to use monkeyrunner from java.
>
> If yes please let me know the approach.
>
> Thanks in advance
>
> Thanks
> --Karthik
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Simulate UI Actions on device

2011-06-15 Thread Bill Napier
On Sat, Jun 11, 2011 at 11:25 AM, Mark Murphy wrote:

>
> > If not, then is MonkeyRunner is enough for it?
>
> Only you can answer that.
>
>
If MonkeyRunner doesn't work out well, you can always use the same protocol
that MR uses to talk to the device to implement the features yourself.

http://android.git.kernel.org/?p=platform/development.git;a=blob;f=cmds/monkey/README.NETWORK.txt;h=4e78b6c8b05225900b923da0122a85037949abc0;hb=HEAD

Also note that we're actively working on refactoring the MonkeyRunner code
to expose a java API.  Mainly so you don't have to link in all the python
stuff if you don't need it.

Bill

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Problem with monkeyrunner. java.lang.ClassCastException when use sameAs().

2011-05-24 Thread Bill Napier
your stack trace doesn't match your code:

 if img_1.sameAs(1, img_2):

has the arguments in the wrong order.  It should be:

if img_1.sameAs(img_2, 1)


On Mon, May 23, 2011 at 2:58 AM, Alexander Sukhov wrote:

> Hello,
>
> I build SDK from source code.
> And i want to use the following script:
>
> img=MonkeyRunner.loadImageFromFile(path='bla bla bla')
>
> img_1=device.takeSnapshot()
>
> img_1.sameAs(img, 1)
>
> But this error:
> File "/home/semc/monkey/out/host/linux-x86/sdk/android-
> sdk_eng.semc_linux-x86/tools/test.py", line 23, in 
>if img_1.sameAs(1, img_2):
>at com.android.monkeyrunner.MonkeyImage.sameAs(MonkeyImage.java:138)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 25)
>at java.lang.reflect.Method.invoke(Method.java:597)
>
> java.lang.ClassCastException: java.lang.ClassCastException:
> org.python.core.PySingleton cannot be cast to
> com.android.monkeyrunner.core.IMonkeyImage
>
> Please help!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] monkeyrunner + ADB over TCP

2011-05-16 Thread Bill Napier
Hi,

I've never tried using MonkeyRunner over TCP.  There is a bunch of stuff
inside MonkeyRunner that assumes you're connecting to the device over USB.
 Without changing the MonkeyRunner source code, I'm not sure it's possible
to connect to a device over TCP.  I'll take a look at it and see if I can
add that feature.

Bill

On Mon, May 16, 2011 at 8:34 AM, Tiago Maluta wrote:

> Hi.
>
> I'm using ADB over TCP [1]  to access my device and it's working [2]  but
> when I try to use my monkeyrunner script I got some errors, like:
>
> dev = MonkeyRunner.waitForConnection(20,"192.168.50.14:7001")
> 110516 12:26:31.171:S [MainThread]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice] Adb rejected adb port
> forwarding command: unknown host service
>
> -OR-
>
> dev = MonkeyRunner.waitForConnection(20,"192.168.50.14")
>
> Returns 'NoneType' to dev.  Even when I have only one device attached and
> try waitForConnection() without parameters I got "Adb rejected adb port
> forwarding command: unknown host service"
>
> Somebody has a suggestion how can I proceed to fix that?
>
> Best regards,
>
> --tm
>
>
> [1]
> $ adb devices
> List of devices attached
> 192.168.50.14:7001device
>
> [2]
> $ adb -s 192.168.50.14:7001 shell getprop ro.product.cpu.abi
> armeabi-v7a
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] monkeyrunner with different android versions

2011-04-27 Thread Bill Napier
what phone?

There haven't been any changes to the monkeyrunner stuff on the device in
that timeframe, so I'm not sure what the problem is.

On Wed, Apr 27, 2011 at 7:59 AM, Tiago Maluta wrote:

> Hi.
>
> I tested the same monkeyrunner [1] script on two android versions
> 2.3.3 and 2.2.1 and the last run partially. Some commands like (i.e:
> takeSnapshot()) works with some error messages and other don't (i.e:
> device.drag()) with a _lot_ of error messages. On my test script [2] I
> got:
>
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice] Error getting the
> manager to quit
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]java.net.SocketException:
> Broken pipe
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> java.net.SocketOutputStream.socketWrite0(Native Method)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> java.io.BufferedWriter.flush(BufferedWriter.java:236)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
>
> com.android.monkeyrunner.MonkeyManager.sendMonkeyEventAndGetResponse(MonkeyManager.java:167)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> com.android.monkeyrunner.MonkeyManager.quit(MonkeyManager.java:288)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
>
> com.android.monkeyrunner.adb.AdbMonkeyDevice.dispose(AdbMonkeyDevice.java:77)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> com.android.monkeyrunner.adb.AdbBackend.shutdown(AdbBackend.java:118)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
>
> com.android.monkeyrunner.MonkeyRunnerStarter.run(MonkeyRunnerStarter.java:94)
> 110427 11:34:28.392:S [main]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
>
> com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter.java:203)
>
> I faced other error too:
>
> 110427 11:41:08.783:S [MainThread]
> [com.android.monkeyrunner.adb.AdbMonkeyDevice] Error sending drag
> start event
>
> ---
>
> I know that are some modifications from 2.2.1 to 2.3.3 but what can
> you suggest to use since I need stay on 2.2.1? Am I using wrong
> monkeyrunner version?
>
>
> [1] Android SDK Tools, revision 9
> [2] $ cat test.py
> from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
> device = MonkeyRunner.waitForConnection()
> result = device.takeSnapshot()
> result.writeToFile('snapshot.png','png')
>
>
> Kind regards,
>
> --tm
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Batch Creation in Monkeyrunner

2011-04-26 Thread Bill Napier
We use python's unittest module to run a series of commands like that (very
useful if you're doing stuff like regression tests):

http://docs.python.org/library/unittest.html

On Tue, Apr 26, 2011 at 9:42 AM, Diego Torres Milano wrote:

> Well, in that case you don't need anything but a shell script invoking
> them:
>
> #! /bin/bash
> script1
> script2
> ...
> script10
>
> or, if they are exiting indicating errors
>
> #! /bin/bash
> script1 && \
> script2 && \
> ...
> script10
>
>
> On Apr 26, 7:21 am, Gaytri Batra  wrote:
> > Can you please explain by taking an example for batch creation script.
> > Suppose I am having scripts1-10 . How to call each script after
> completion
> > of previous one.
> >
> > Thanks & Regards,
> > Gayatri
> >
> > On Sat, Apr 23, 2011 at 1:27 AM, Diego Torres Milano  >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > You can create any kind of script you want in monkeyrunner as it is a
> > > python compiler.
> >
> > > On Apr 21, 7:53 am, Gaytri  wrote:
> > > > Hello All,
> >
> > > > I want to create a batch(sequence of multiple scripts) in
> > > > monkeyrunner. I have used this concept in other automation tools like
> > > > QTP. Can anyone please suggest me how to create and then execute
> > > > batches in monkeyrunner.
> >
> > > > Any kind of help will be highly appreciated.
> >
> > > > Thanks & Regards,
> > > > Gayatri
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> Have you read my blog ?
> http://dtmilano.blogspot.com
> android junit tests ui linux cult thin clients
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Long Press on Power Key with MonkeyRunner

2011-04-26 Thread Bill Napier
this worked for me (on Nexus S):

from com.android.monkeyrunner import MonkeyRunner
from com.android.monkeyrunner import MonkeyDevice

dev = MonkeyRunner.waitForConnection()
dev.press('POWER', MonkeyDevice.DOWN)

It brought up the "Phone Options" menu.  I really recommend that you use the
constants inside MonkeyDevice to specify what kind of press you want, as no
guarantee is provided on their values.  If you refer to them as
MonkeyDevice.DOWN_AND_UP, that will always work.

On Tue, Apr 26, 2011 at 2:33 AM, Harrison 冯兴强 wrote:

> Hi,
>
> I am using Monkeyrunner to do some automation testing  on my apps. But it
> didn't seem that this is long press solution on power key. As we know, we
> can get "Phone options" menu with "Silent mode", "Airplane mode", "Power
> off" when we long press hard power key manually. But when i use the
> following statement:
>
> device.press("KEYCODE_POWER","DOWN")
>
> I am not able to get the expected "Phone options" menu, I got the screen
> locked. That's  to say, the same result in using the following statement:
>
> device.press("KEYCODE_POWER","DOWN_AND_UP")
>
> So I can come to conclusion the MonkeyRunner API is not really to get long
> press hard key implemented. And I can see there is method
> performedLongPress
> (KeyEventevent)
>  from android.view.KeyEvent.DispatcherState to handle long press key.
>
> so can we have this in MonkeyRunner API in the incoming release version?
>
> Thanks
>
> Harrison Feng
> *
> *
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: how do I change screen orientation from ADB or equivalent?

2011-04-15 Thread Bill Napier
Then again, I just tried it with the Nexus S and it doesn't work.  It may
work on devices with keyboards like Droid.  Here's how I tested it:

$ adb shell "monkey --port "
$ adb forward tcp: tcp:
$ telnet localhost 
Connected to localhost.
Escape character is '^]'.
flip open
OK
flip close
OK

And nothing happened on my phone.  It may actually work on a device that has
a flip out keyboard (G1 or droid for example), but I don't have one handy.

On Fri, Apr 15, 2011 at 11:24 AM, Bill Napier  wrote:

> It looks like the "flip" command from the protocol that monkeyrunner uses
> may do it for you.  It looks like it never got added to MonkeyDevice to be
> exposed as part of the monkeyrunner API.
>
>
> http://android.git.kernel.org/?p=platform/development.git;a=blob;f=cmds/monkey/README.NETWORK.txt;h=4e78b6c8b05225900b923da0122a85037949abc0;hb=HEAD
>
> On Thu, Apr 14, 2011 at 4:26 AM, lbendlin  wrote:
>
>> Well, the monkey can do it (change orientation, that is)  so you might be
>> able to learn how to do it from the monkey source code.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>



-- 
Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: how do I change screen orientation from ADB or equivalent?

2011-04-15 Thread Bill Napier
It looks like the "flip" command from the protocol that monkeyrunner uses
may do it for you.  It looks like it never got added to MonkeyDevice to be
exposed as part of the monkeyrunner API.

http://android.git.kernel.org/?p=platform/development.git;a=blob;f=cmds/monkey/README.NETWORK.txt;h=4e78b6c8b05225900b923da0122a85037949abc0;hb=HEAD

On Thu, Apr 14, 2011 at 4:26 AM, lbendlin  wrote:

> Well, the monkey can do it (change orientation, that is)  so you might be
> able to learn how to do it from the monkey source code.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: regarding monkey runner Tool

2011-04-15 Thread Bill Napier
Hi,

I'm going to start taking the same support stance the other android devs on
this list take.  I can't answer private questions, but I can respond to
questions posted on the list.

In this case, you can just use the same device object each time:

device = MonkeyRunner.waitForConnection()
img1 = device.takeSnapshot()
img1 = device.takeSnapshot()
img1 = device.takeSnapshot()

I will warn you that this is very slow.  In my tests, the fastest I could
get was around 3FPS.

Bill

On Tue, Apr 12, 2011 at 11:07 PM, abhilash pujari
wrote:

> Hi,
>
> i am working on Monkey Runner. I am taking screenshots of device after
> every time.But to minimize time frame of the functionality of MonkeyRunner
> i want to avoid the device connection call everytime.
>
> # Connects to the current device, returning a MonkeyDevice object
>
> device = MonkeyRunner.waitForConnection()
>
> How to handle this ? can it doable in python or can we do it from android ? 
> if yes how to do it?
>
>
> regards
> Abhilash
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Compare MonkeyImage

2011-04-08 Thread Bill Napier
Hi Peddi,

Here's an example of the usage of loadImageFromFile:

from com.android.monkeyrunner import MonkeyRunner
img = MonkeyRunner.loadImageFromFile(path='/home/napier/logo.png')


Since loadImageFromFile is something that can be done at any time and really
has nothing to do with a device, it didn't make a whole lot of sense to me
to add it as a method on MonkeyDevice.  If you've got a good argument as to
why it should be there, I'll listen to it.

Thanks,

Bill

On Fri, Apr 8, 2011 at 9:23 AM, Peddi Kanumuri wrote:

> Please check this issue @
> http://code.google.com/p/android/issues/detail?id=16049
>
> -Peddi.
>
> On Apr 7, 4:59 pm, Peddi Kanumuri  wrote:
> > Bill,
> >
> > How to build just the monkeyrunner.jar with these changes?
> > We are in need of loadImageFromFile API.
> >
> > -Peddi.
> >
> > On Mar 7, 8:02 pm, Bill Napier  wrote:
> >
> >
> >
> >
> >
> >
> >
> > >https://review.source.android.com//#change,21478
> >
> > > <https://review.source.android.com//#change,21478>Adds support for
> this
> > > change.  If you check the android source out and build monkeyrunner
> from
> > > that, you should be able to read images from the file system.  It will
> also
> > > eventually find its way into an SDK release, but checking it out and
> > > building it youself is the fastest way to get it.
> >
> > > Bill
> >
> > > On Fri, Feb 25, 2011 at 5:52 PM, Andrew W. Hill 
> wrote:
> >
> > > > I know this is an old thread, but I was wondering if MonkeyRunner has
> > > > the capability to read screenshots from the file system yet.  I
> > > > couldn't find any info on it.
> > > > Cheers,
> > > > Andrew
> >
> > > > On Feb 15, 4:11 pm, Bill Napier  wrote:
> > > > > Hi Christopher,
> >
> > > > > Being able to load an image into MonkeyRunner from the filesystem
> > > > > makes a lot of sense, I don't see how I had missed that.  All the
> > > > > test's we've been using MonkeyRunner before only ever wanted to
> > > > > compare to subsequent snapshots (to see what has changed).  This
> looks
> > > > > pretty straight forward feature to add, but may take me a couple
> days
> > > > > to get to it.
> >
> > > > > Bill
> >
> > > > > On Mon, Feb 14, 2011 at 6:14 PM, Christopher M. Judd <
> javaj...@gmail.com>
> > > > wrote:
> >
> > > > > > According to the monkeyrunner documentation, you can compare
> > > > > > screenshot output to known screenshot for regression testing. How
> do
> > > > > > you do this? I see the method sameAs on MonkeyImage but that
> takes a
> > > > > > MonkeyImage presumably one saved on disk for regression testing
> but
> > > > > > there appears to be no way to load one from disk.
> >
> > > > > > --
> > > > > > You received this message because you are subscribed to the
> Google
> > > > > > Groups "Android Developers" group.
> > > > > > To post to this group, send email to
> > > > android-developers@googlegroups.com
> > > > > > To unsubscribe from this group, send email to
> > > > > > android-developers+unsubscr...@googlegroups.com
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/android-developers?hl=en
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Running Monkeyrunner directly on Android tablet

2011-03-18 Thread Bill Napier
no, not from the device directly.  The permissions required to do the stuff
the monkey does is only granted to the user who has logged in via "adb
shell".  Any application on the phone will not have the correct permissions
to do it.

On Thu, Mar 17, 2011 at 2:43 AM, raki  wrote:

> Hi Bill,
>
> Thanks for your reply.
> Could you please tell me if there is a way at least to run a Monkey
> script on the Android device directly?
>
> Thanks,
> Rakesh
>
> On Mar 17, 7:37 am, Bill Napier  wrote:
> > Hi,
> >
> > This won't work.  MonkeyRunner will only work on a host computer, you
> can't
> > run it from the device itself.
> >
> > Bill
> >
> >
> >
> >
> >
> >
> >
> > On Tue, Mar 15, 2011 at 5:15 AM, raki  wrote:
> > > Hi,
> >
> > > I wanted to run a python script directly on an Android device through
> > > Monkeyrunner.
> > > I have installed the following applications on my Android device:
> > > SLA4, Python for Android.
> >
> > > But when I try to run the script through Python interpretter, I get
> > > the error saying "Import Error: No Module named
> > > com.android.monkeyrunner"
> >
> > > Are Monkeyrunner and Monkey tools not included along with the Android
> > > OS ?
> >
> > > Could some one suggest, how to start creating scripts using
> > > Monkeyrunner API ?
> >
> > > Appreciate any help.
> >
> > > Thanks,
> > > Rakesh
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Using Eclipse write monkeyrunner

2011-03-16 Thread Bill Napier
Can you provide the full stack trace from your first mail?  It looks like
part of it got cut off.

@diego - I've filed a bug to look at fixing the unbuffered input issue that
you had to work around.  It would be nice if monkeyrunner could just do this
without resorting to a wrapper script.

On Tue, Mar 15, 2011 at 1:46 AM, c j  wrote:

> in command line used monkeyrunner is ok
> but i need used eclipse can Instantly watch result
> thank you
>
> On 3月15日, 上午10時23分, "A. Elk"  wrote:
> > Although I don't think that monkeyrunner was designed to be used
> fromEclipse.
> >
> > Whenever you run into a problem with monkeyrunner, try it from the
> > command line first.
> >
> > On Mar 13, 9:11 pm, Diego Torres Milano  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Some hints to use monkeyrunner fromeclipsecan be found athttp://
> dtmilano.blogspot.com/2011/03/using-android-monkeyrunner-from-...
> >
> > > On Mar 11, 6:06 am, c j  wrote:
> >
> > > > I needusingmonkeyrunner do some easy auto test but have some
> > > > problem.
> >
> > > >EclipseSDK 3.6.2 (Pydev 1.6.5 + Jython 2.5.2 + Python 2.7.1 +
> > > > monkeyrunner.jar + google-collect-1.0-rc1.jar)
> > > > jdk1.6.0_24
> > > > android-sdk-windows
> >
> > > > i try this example in second line have wrong
> >
> > > >http://developer.android.com/guide/developing/tools/MonkeyRunner.html
> >
> > > > # Imports the monkeyrunner modules used by this program
> > > > from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
> >
> > > > # Connects to the current device, returning a MonkeyDevice object
> > > > device = MonkeyRunner.waitForConnection()
> >
> > > > error msg
> >
> > > >  device = MonkeyRunner.waitForConnection()
> > > > at
> > > >
> com.android.monkeyrunner.MonkeyRunner.waitForConnection(MonkeyRunner.java:
> > > > 74)
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> Source)
> > > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> > > > Source)
> > > > at java.lang.reflect.Method.invoke(Unknown Source)
> > > > java.lang.NullPointerException: java.lang.NullPointerException
> >
> > > > Please tell know where setting wrong.
> > > > thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Running Monkeyrunner directly on Android tablet

2011-03-16 Thread Bill Napier
Hi,

This won't work.  MonkeyRunner will only work on a host computer, you can't
run it from the device itself.

Bill

On Tue, Mar 15, 2011 at 5:15 AM, raki  wrote:

> Hi,
>
> I wanted to run a python script directly on an Android device through
> Monkeyrunner.
> I have installed the following applications on my Android device:
> SLA4, Python for Android.
>
> But when I try to run the script through Python interpretter, I get
> the error saying "Import Error: No Module named
> com.android.monkeyrunner"
>
> Are Monkeyrunner and Monkey tools not included along with the Android
> OS ?
>
> Could some one suggest, how to start creating scripts using
> Monkeyrunner API ?
>
> Appreciate any help.
>
> Thanks,
> Rakesh
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Compare MonkeyImage

2011-03-07 Thread Bill Napier
Yes.  Our tests are written on top of pyunit (which runs inside
monkeyrunner).  We use sameAs and an asset.

For the test cases we are developing, sameAs (with a percentage) is
sufficient.  This allows things like the time in the status bar and any
other possible notifications to get ignored.

If you want to do a more complicated comparison (like being able to handle a
different background color), you could write your own.
 MonkeyImage.getRawPixel (
http://developer.android.com/guide/developing/tools/MonkeyImage.html#getRawPixel)
is provided exactly for that reason.

Bill

On Mon, Mar 7, 2011 at 11:55 AM, aniruddha dhamal
wrote:

> @bill,
> You mentioned that you compare the subsequent snapshots.
> I have questions:
> Do you use *sameAs* method as an assertion method (like Assert in JUnit)
> to verify pass or failure of the testcase?
> How do you say that this percentage have changed with the next screenshot
> so that testcase is passed?
>
> Because that wouldn't make my testcases obsolete even if i change the
> background color.
>
> Thanks a lot for your help.
>
>
>
> On Tue, Feb 15, 2011 at 4:11 PM, Bill Napier  wrote:
>
>> Hi Christopher,
>>
>> Being able to load an image into MonkeyRunner from the filesystem
>> makes a lot of sense, I don't see how I had missed that.  All the
>> test's we've been using MonkeyRunner before only ever wanted to
>> compare to subsequent snapshots (to see what has changed).  This looks
>> pretty straight forward feature to add, but may take me a couple days
>> to get to it.
>>
>> Bill
>>
>> On Mon, Feb 14, 2011 at 6:14 PM, Christopher M. Judd 
>> wrote:
>> > According to the monkeyrunner documentation, you can compare
>> > screenshot output to known screenshot for regression testing. How do
>> > you do this? I see the method sameAs on MonkeyImage but that takes a
>> > MonkeyImage presumably one saved on disk for regression testing but
>> > there appears to be no way to load one from disk.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to
>> android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/android-developers?hl=en
>> >
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Thanks and Regards
>
> Aniruddha Dhamal
> ani123.dha...@gmail.com
>
> " No matter which direction you start
> Its always against the wind coming  back "
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Compare MonkeyImage

2011-03-07 Thread Bill Napier
https://review.source.android.com//#change,21478

<https://review.source.android.com//#change,21478>Adds support for this
change.  If you check the android source out and build monkeyrunner from
that, you should be able to read images from the file system.  It will also
eventually find its way into an SDK release, but checking it out and
building it youself is the fastest way to get it.

Bill

On Fri, Feb 25, 2011 at 5:52 PM, Andrew W. Hill  wrote:

> I know this is an old thread, but I was wondering if MonkeyRunner has
> the capability to read screenshots from the file system yet.  I
> couldn't find any info on it.
> Cheers,
> Andrew
>
> On Feb 15, 4:11 pm, Bill Napier  wrote:
> > Hi Christopher,
> >
> > Being able to load an image into MonkeyRunner from the filesystem
> > makes a lot of sense, I don't see how I had missed that.  All the
> > test's we've been using MonkeyRunner before only ever wanted to
> > compare to subsequent snapshots (to see what has changed).  This looks
> > pretty straight forward feature to add, but may take me a couple days
> > to get to it.
> >
> > Bill
> >
> > On Mon, Feb 14, 2011 at 6:14 PM, Christopher M. Judd 
> wrote:
> >
> >
> >
> > > According to the monkeyrunner documentation, you can compare
> > > screenshot output to known screenshot for regression testing. How do
> > > you do this? I see the method sameAs on MonkeyImage but that takes a
> > > MonkeyImage presumably one saved on disk for regression testing but
> > > there appears to be no way to load one from disk.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] [Monkeyrunner]: How to simulate short press on power button

2011-03-07 Thread Bill Napier
Hi,

I tested this on Nexus S and it worked in the way I expected.  If I specify
DOWN_AND_UP, the screen locks and goes to sleep.  If I specify just DOWN, I
get the Phone options.

I tried with the emulator and saw the same behavior you saw, I'm not sure
why.

Let me try and borrow an Xperia from somebody to reproduce there.

On Thu, Mar 3, 2011 at 5:50 PM, aniruddha dhamal wrote:

> Thanks Bill,
>
> But this code for short press on POWER button isn't working. I tried with
> emulator  (Android 1.6, Android 2.1) and also on Xperia device.  I also
> tried with controlling duration of the press but it opens the Phone Options.
> I wanted to simulate lock screen by pressing on POWER Button.
>
> With this command [ *device.press('KEYCODE_POWER', 'down') *] you can
> open the dialogue box which gives the Phone options (Silent Mode, Airplane
> Mode and Power off).
>
> Is there any other way to simulate the lock screen?
>
> Really Appreciate your help.
>
>
> On Thu, Mar 3, 2011 at 4:30 PM, Bill Napier  wrote:
>
>> This worked for me.  It turned off my Nexus S when I tried it.
>>
>> What you were doing was only sending the down part of the DOWN_AND_UP, so
>> it was like you were pressing the POWER button and then never ever taking
>> your finger off of it.
>>
>> If you want even more control over the duration of the press, you can do a
>> DOWN, sleep for a bit, and then do the UP.  DOWN_AND_UP runs the commands
>> with no delay in-between at all (a really short press).
>>
>> - code snipped -
>>
>> from com.android.monkeyrunner import MonkeyRunner as mr
>> from com.android.monkeyrunner import MonkeyDevice
>>
>> device = mr.waitForConnection()
>>
>> device.press("POWER", MonkeyDevice.DOWN_AND_UP)
>>
>>
>> On Mon, Feb 28, 2011 at 11:56 AM, aniruddha dhamal <
>> ani123.dha...@gmail.com> wrote:
>>
>>> I tried to use
>>>
>>> *device.press('KEYCODE_POWER', 'down')*
>>>
>>> but this works for long press on power button.
>>>
>>> Thanks,
>>>
>>>
>>> On Sat, Feb 26, 2011 at 4:01 PM, Andya  wrote:
>>>
>>>> Hello guys,
>>>>
>>>> Any help on how to simulate short key press on Power button using
>>>> MonkeyRunner?
>>>>
>>>> I am using the following code but to no avail
>>>>
>>>> device.press('KEYCODE_POWER','DOWN')
>>>>
>>>> Really appreciate!!!
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Android Developers" group.
>>>> To post to this group, send email to
>>>> android-developers@googlegroups.com
>>>> To unsubscribe from this group, send email to
>>>> android-developers+unsubscr...@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>>
>>>
>>>
>>> --
>>> Thanks and Regards
>>>
>>> Aniruddha Dhamal
>>> ani123.dha...@gmail.com
>>>
>>> " No matter which direction you start
>>> Its always against the wind coming  back "
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>
>
>
> --
> Thanks and Regards
>
> Aniruddha Dhamal
> ani123.dha...@gmail.com
>
> " No matter which direction you start
> Its always against the wind coming  back "
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] [Monkeyrunner]: How to simulate short press on power button

2011-03-03 Thread Bill Napier
This worked for me.  It turned off my Nexus S when I tried it.

What you were doing was only sending the down part of the DOWN_AND_UP, so it
was like you were pressing the POWER button and then never ever taking your
finger off of it.

If you want even more control over the duration of the press, you can do a
DOWN, sleep for a bit, and then do the UP.  DOWN_AND_UP runs the commands
with no delay in-between at all (a really short press).

- code snipped -

from com.android.monkeyrunner import MonkeyRunner as mr
from com.android.monkeyrunner import MonkeyDevice

device = mr.waitForConnection()

device.press("POWER", MonkeyDevice.DOWN_AND_UP)


On Mon, Feb 28, 2011 at 11:56 AM, aniruddha dhamal
wrote:

> I tried to use
>
> *device.press('KEYCODE_POWER', 'down')*
>
> but this works for long press on power button.
>
> Thanks,
>
>
> On Sat, Feb 26, 2011 at 4:01 PM, Andya  wrote:
>
>> Hello guys,
>>
>> Any help on how to simulate short key press on Power button using
>> MonkeyRunner?
>>
>> I am using the following code but to no avail
>>
>> device.press('KEYCODE_POWER','DOWN')
>>
>> Really appreciate!!!
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> Thanks and Regards
>
> Aniruddha Dhamal
> ani123.dha...@gmail.com
>
> " No matter which direction you start
> Its always against the wind coming  back "
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Compare MonkeyImage

2011-02-15 Thread Bill Napier
Hi Christopher,

Being able to load an image into MonkeyRunner from the filesystem
makes a lot of sense, I don't see how I had missed that.  All the
test's we've been using MonkeyRunner before only ever wanted to
compare to subsequent snapshots (to see what has changed).  This looks
pretty straight forward feature to add, but may take me a couple days
to get to it.

Bill

On Mon, Feb 14, 2011 at 6:14 PM, Christopher M. Judd  wrote:
> According to the monkeyrunner documentation, you can compare
> screenshot output to known screenshot for regression testing. How do
> you do this? I see the method sameAs on MonkeyImage but that takes a
> MonkeyImage presumably one saved on disk for regression testing but
> there appears to be no way to load one from disk.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: monkeyrunner fails for emulator: Error starting command: monkey --port 12345

2010-12-09 Thread Bill Napier
Hi,

You can safely ignore that log message.  I know it looks scary, but things
are still working (I got the same message when I just tried, but the rest of
the script ran fine).  In a later build that message will be totally be
gone.

Also, I noticed a slight typo in the docs regarding takeSnapshot.  The
correct code should look like this:


# Takes a screenshot
result = device.takeSnapshot()


Bill

On Thu, Dec 9, 2010 at 12:26 AM, swarup  wrote:

> the same issue also seen on ADP1.
> I tried tunning monkeyrunner on ADP1, and got the exact the same
> error.
>
> Looks like not emulator problem, might be a ADB code issue.
>
> did anyone face similar issue?
>
>
>
> On Dec 9, 1:02 pm, swarup  wrote:
> > Hi,
> > I am trying to run 'monkeyrunner' tool for emulator and I end up with
> > the below error:
> > 
> > 101209 13:12:11.321:I [main] [com.android.monkeyrunner.MonkeyManager]
> > Monkey Command: wake.
> > 101209 13:12:14.345:S [pool-1-thread-1]
> > [com.android.monkeyrunner.adb.AdbMonkeyDevice] Error starting command:
> > monkey --port 12345
> > 101209 13:12:14.345:S [pool-1-thread-1]
> >
> [com.android.monkeyrunner.adb.AdbMonkeyDevice]com.android.ddmlib.ShellComma
> ndUnresponsiveException
> > 101209 13:12:14.345:S [pool-1-thread-1]
> > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:408)
> > 101209 13:12:14.345:S [pool-1-thread-1]
> > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > com.android.ddmlib.Device.executeShellCommand(Device.java:276)
> > 101209 13:12:14.345:S [pool-1-thread-1]
> > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > com.android.monkeyrunner.adb.AdbMonkeyDevice
> > $1.run(AdbMonkeyDevice.java:89)
> > 101209 13:12:14.345:S [pool-1-thread-1]
> > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
> > 417)
> > 101209 13:12:14.345:S [pool-1-thread-1]
> > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> > 101209 13:12:14.345:S [pool-1-thread-1]
> > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > java.util.concurrent.FutureTask.run(FutureTask.java:123)
> > 101209 13:12:14.345:S [pool-1-thread-1]
> > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > java.util.concurrent.ThreadPoolExecutor
> > $Worker.runTask(ThreadPoolExecutor.java:651)
> > 101209 13:12:14.345:S [pool-1-thread-1]
> > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > java.util.concurrent.ThreadPoolExecutor
> > $Worker.run(ThreadPoolExecutor.java:676)
> > 101209 13:12:14.345:S [pool-1-thread-1]
> > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > java.lang.Thread.run(Thread.java:595)
> > ...
> > ...
> > ...
> > 
> >
> > I am having the following environment:
> > 
> > OS : Ubuntu 10.04
> > Jython : 2.2.1
> > Android SDK : 2.3 (GingerBread)
> > Device : Emulator
> > 
> >
> > The target app for monkeyrunner is one of my DummyApp. Here is the
> > jython script I am using (its same one mentioned athttp://
> d.android.com/guide/developing/tools/monkeyrunner_concepts.html)
> > 
> > from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
> >
> > device = MonkeyRunner.waitForConnection()
> > device.installPackage('/home/swarup/DummyApp.apk')
> > device.startActivity(component='com.collabera.swarup.DummyActivity')
> > device.press('KEYCODE_MENU','DOWN_AND_UP')
> > result = device.takeSnapShot()
> > result.writeToFile('myproject/shot1.png','png')
> > 
> >
> > Running only 'monkey' command works fine, but monkeyrunner fails. Any
> > clue in this regard would be a great help.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Is it possible to run ADB shell command from inside an Android app

2009-01-29 Thread Bill Napier

There are a couple problems here.

1. The phone doesn't have the adb command installed on it and doesn't
need it.  adb shell is only to be able to run shell commands from a
computer on the phone.
2. Permission denied is the default (confusing and buggy) error code
returned when you try and execute a command that doesn't exist.

If you just want a shell run, try /system/bin/sh as the executable to run.

b

On Thu, Jan 29, 2009 at 11:33 AM, Anshul  wrote:
>
> I am trying to run an ADB shell command from inside an android app
> using the JAVA's Runtime.getRunTime.exec API. I am getting an error
> "ERROR/ProcessManager(1041): Error running adb: Permission denied".
> Wanted to check if there is any permission that I need to request to
> get it working or that running the adb shell command would not be
> allowed from with in the Android app.
>
> I am able to execute other linux commands like 'ls' from the android
> app though.
>
> Thanks,
> -Anshul
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to retrive device log

2008-12-21 Thread Bill Napier

http://code.google.com/android/reference/adb.html#forwardports

You can use adb to do some amount of port forwarding, but I'm not sure
if it works in the direction you're looking for.

You can also use 'adb logcat' to retrieve the system log on the phone.
 And if you keep it running you can get your logging messages there.

b

On Sun, Dec 21, 2008 at 2:39 PM, Mark Nuetzmann
 wrote:
>
> bump
>
> On Dec 19, 9:12 am, Mark  wrote:
>> I am also interested in this.  I would like to know if there is a way
>> to have my application send UPD messages to my laptop/desktop when
>> connected through the USB cable.  I have done this with great success
>> in my Windows Mobile applications.  I have a UDP server running on my
>> laptop that receives the messages and writes the data out to a file.
>> I then have a log file previewer application that has filtering and
>> display logic that allows me to view, filter, copy messages (works
>> great for debugging my apps).
>>
>> thanks,
>> Mark
>>
>> On Dec 19, 8:28 am, Raj  wrote:
>>
>> > Hello All,
>>
>> > I am developint a small application in which I have to show the device
>> > log into the screen. If any one has the solution or any helpful link
>> > then please reply..
>>
>> > Your Friend
>> > Raj
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Locking Down Root Access - Same Sh.., Different Vendor

2008-12-21 Thread Bill Napier

Can you please continue this discussion on android-discuss where it belongs?

But it is nice to know that I'm now cool...  I appreciate that.  :)

On Sun, Dec 21, 2008 at 3:18 PM, mashpl...@gmail.com
 wrote:
>
> The phone mindset is wrong, consumers are not like they were in the
> 80's, now the average user is quickly growing into a "terminal window"
> and root access.  The kid's are into mashing everything just look at
> the sites they make on facebook.  Not only are they comfortable with
> terminal windows and root access but they can code.
>
> Phones for dummy's is old school.  It for a time when nerds were
> uncool and users were computer illiterate.  The world has changed but
> the telecom mindset has not
>
> - V
>
> On Dec 21, 5:50 pm, Al Sutton  wrote:
>> I'd prefer to see more Android 'phones in the hands of users than to see
>> every Android phone have a developer mode.
>>
>> The G1 is a consumer device and should be designed as such (including
>> things like minimising/eliminating the possibility for users to brick
>> the device by using a home-brew firmware). The DP1 is the dev 'phone
>> which you can brick to your hearts content if you so wish.
>>
>> Yes it's annoying that the DP1 was only announced after many of us had
>> bought G1s, yes it would be nice to have a G1 that we could use like a
>> DP1, but that's not the main purpose the G1 is designed to serve.
>>
>> Al.
>>
>>
>>
>> mashpl...@gmail.com wrote:
>> > Hi Thanks for responding, sorry for posting in the wrong place but
>> > this is the group that's impacted.  I think the open community can
>> > respond possibly using a open source license that does not allow
>> > "TIVO" style hardware lock-down.  In addition Google can provide
>> > certification programs that require device manufacturers to
>> > demonstrate open implementations of Android in order to use the
>> > Android logo.   Last Google could market their "unlocked" developer
>> > phone for general use.
>>
>> > ps.  is your book available yet?  I just looked at your website, good
>> > luck with your business model.
>>
>> > On Dec 21, 10:37 am, Mark Murphy  wrote:
>>
>> >> First, this sort of topic belongs on [android-discuss], since this list
>> >> is for assistance on application development.
>>
>> >> mashpl...@gmail.com wrote:
>>
>> >>> Please do not allow the carriers to lock the phones down.
>>
>> >> Android is licensed under the Apache License 2.0. Hardware manufacturers
>> >> and carriers can do what they wish within the confines of that license.
>>
>> >> If you want to complain about locked-down phones, complain to carriers
>> >> and device makers. Hope that some innovative device makers make devices
>> >> that are not locked down, and that the market rewards them for it.
>>
>> >> --
>> >> Mark Murphy (a Commons Guy)http://commonsware.com
>> >> _The Busy Coder's Guide to Android Development_ Version 1.9 Published!
>>
>> --
>> ==
>> Funky Android Limited is registered in England & Wales with the
>> company number  6741909. The registered head office is Kemp House,
>> 152-160 City Road, London,  EC1V 2NX, UK.
>>
>> The views expressed in this email are those of the author and not
>> necessarily those of Funky Android Limited, it's associates, or it's
>> subsidiaries.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Thought's On Android CupCake?

2008-12-21 Thread Bill Napier

I can't even keep track of the number of times I've wiped the data on
my phone.  Sometimes its gotta be done to test things.  It usually
takes me maybe 10-15 minutes to re-install all my apps and re-setup
all my settings.  IMHO, not that big a deal.  All my contact
info/calendar/etc. sync from gmail so I don't even worry about those,
they just magically appear.

b

On Sun, Dec 21, 2008 at 1:31 PM, nkijak  wrote:
>
> I second the root access.  All us T-Mobile G1 suckers are out cold for
> now.  My trackball stopped scrolling to the right and T-Mobile is
> sending me a new one but all my data and apps will be lost because
> they're all written to internal memory.
>
> I'm a little sad that the Google folks didn't see this as a huge issue
> as the iPhone has syncing with iTunes and it's no problem to upgrade/
> switch/replace between iPhone/touch hardware.  What's the recommended
> way for Android users?
>
> On Dec 20, 1:31 am, "Peter Fisher"  wrote:
>> I wish it had multi touch support the browser would be so much better if
>> they did. =(
>>
>> Also there should be an option to allow root access to the device for
>> developers...
>>
>> On Fri, Dec 19, 2008 at 2:08 PM, TmobileG1Fans wrote:
>>
>>
>>
>> > What do you mean there is another SD slot? There is only 1 :) + 64mb
>> > internal mem.
>>
>> > On Dec 19, 2:56 pm, "Xavier Mathews"  wrote:
>> > > I thought there was another sd slot?
>>
>> > > On 12/19/2008, Mark K  wrote:
>>
>> > > >   Looks good, will have camcorder support which is huge! It needed to
>> > > > support recording video, since all the other 'smart phone' platforms
>> > > > do also. Hopefully it will be an easy upgrade for the G1.
>>
>> > > >  Mark
>>
>> > > > On Dec 19, 9:37 am, TmobileG1Fans  wrote:
>> > > >> I think it's going to be awesome OS update but then again I wish apps
>> > > >> still would be installable from SD card and not OS, i mean this os is
>> > > >> going to take more space and most people are already using 80% of
>> > > >> their internal card.
>>
>> > > >> Hope they will address that issue:
>>
>> > > >> Info about
>> > > >> CupCake:
>> >http://www.livecrunch.com/2008/12/19/android-cupcake-release-updates-...
>>
>> > > --
>> > > Xavier A. Mathews
>> > > Student/Browser Specialist/Developer/Web-Master
>> > > Client Based Tech Support Specialist
>> > > Hazel Crest Illinois
>> > > xavieruni...@gmail.com¥xavieruni...@hotmail.com¥truestar...@yahoo.com
>> > > "Fear of a name, only increases fear of the thing itself."
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: upgrade emulator firmware

2008-12-21 Thread Bill Napier

The questions your asking would probably be better asked on
android-platform, where they discuss these kinds of things.

But the reason you can't mount it is probably that your system doesn't
have the yaffs2 kernel module loaded.

b

On Sun, Dec 21, 2008 at 4:17 AM, fry  wrote:
>
> I think I can try to modify tools/lib/images/system.img file to
> achieve this - the simple way I see is to mount it on my local system
> in write mode, put modified files to it, unmount and boot emulator
> with modified image. Will this way work at least in theory?
>
> On practice, I even can't mount it:
>
> sudo mount -o loop,offset=32256 -t yaffs2 system.img ./tmp/
> mount: unknown filesystem type 'yaffs2'
>
>
> On Dec 21, 2:14 pm, fry  wrote:
>> Hello,
>>
>> I'm trying to upgrade firmware in emulator or some parts inside it. I
>> have root shell, I can replace any libraries/binaries in the /system
>> directory, but after I reboot all my changes are reverted back.
>>
>> How can I switch this off? For example, if I compile some of
>> opensource part of android platform (specific library), how can I push
>> it to the emulator and test it?
>>
>> I also tried to appy rc30 update for G1 to the emulator - following
>> thishttp://www.intomobile.com/2008/11/10/force-android-rc-30-update-on-yo...
>> or 
>> thishttp://www.intomobile.com/2008/11/03/force-a-software-update-on-your-...
>> instructions (there are may available with the same info)
>> I can copy update.zip to the root of the emulated sd card, but the 2nd
>> step is "Turn it back on while holding down the "Power" (End Call) and
>> "Home" buttons". As I understand, this is special phone startup method
>> which enables update process - I can't do the same with the emulator
>> because I start it just with the command "emulator" which means usual
>> start - probably it might have special command line parameter and
>> achieve the same result as with G1 phone "power+home" combination.
>>
>> Thank's
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Where, exactly, are Context data files?

2008-12-20 Thread Bill Napier

You can also have write access to the SD card directly, so you could
save your stuff for your app there, if you're willing to handle the
case when the SD card may be not be plugged in.

Also, 802.11n is backwards compatible with 802.11g.  Just make sure
you're not running your router in 802.11n only mode and your phone
should connect fine with it.

b

On Sat, Dec 20, 2008 at 12:08 AM, Keith Wiley  wrote:
>
> Well, okay.  Besides which, it looks like I was wrong about getting
> files off the phone from the computer.  It only mounts the sd card and
> the app data isn't on that card in the first place.
>
> ...so how do I transfer data saved by my app off the phone?  Do I have
> to actually send the data by email instead of directly downloading it
> over usb?  That requires me to have an 802.11g router set up (I
> usually use 802.11n), besides which, it seems terribly inefficient to
> be sending data all over the world by email just to move it six inches
> to my computer.
>
> What's the best way to handle this?
>
> Thanks.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Reset to factory settings programatically

2008-12-17 Thread Bill Napier

I would assume you would also need android.permission.MASTER_CLEAR.
And then it looks like this is the magic from that file:

ICheckinService service =
  71
ICheckinService.Stub.asInterface(ServiceManager.getService("checkin"));
  72 if (service != null) {
  73 try {
  74 // This RPC should never return
  75 service.masterClear();
  76 } catch (android.os.RemoteException e) {
  77 // Intentionally blank - there's nothing
we can do here
  78 Log.w("MasterClear", "Unable to invoke
ICheckinService.masterClear()");
  79 }
  80 } else {
  81 Log.w("MasterClear", "Unable to locate
ICheckinService");
  82 }

On Wed, Dec 17, 2008 at 5:40 PM, John Spurlock  wrote:
>
> I'm curious about this myself.  Looking at the source code for the
> Settings app yields a few clues...
>
> http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=blob;f=src/com/android/settings/MasterClear.java;h=38ad6081850061000fd84f9c1febf97a23d51a0d;hb=HEAD
>
> Hope that helps,
> - John
>
> On Dec 14, 9:16 pm, Siva G  wrote:
>> Hi All,
>>
>> Is there a way toresetthe android phone programatically? I mean is
>> there any API to do this?
>>
>> Thanks,
>> Siva G
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Google Docs and Reader

2008-12-15 Thread Bill Napier

Just because I'm curious, why Reader?  I've use Reader quite a bit in
the browser to catch up blogs and stuff and am very happy with how it
works.  I can't see what a "native" Android App for Reader would add.

b

On Mon, Dec 15, 2008 at 8:50 PM, Chris B.  wrote:
>
> I'm not sure if this has been previously mentioned but I think Google
> should be (frantically) working on Google Docs and Reader Apps!
>
> The Picasa one released today needs to have been the first of a long
> stream of addon applications that Google needs to release ASAP.
> Google Docs and Google Reader and very high on that list.  (Plus
> adding Google docs would shut up everyone who slams Android on not
> being able to handle doc files!).
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: error on my Mac 10.4 Power book: cannot execute binary file

2008-12-13 Thread Bill Napier

Are either of the mac users running on an old powerbook?  Like the
PowerPC (non-intel) powerbooks?  The Android SDK is only works on
Intel-based mac's.  (I would love to see universal binaries for the
mac stuff as well so I can use my PPC mac...)

b

On Mon, Nov 24, 2008 at 9:11 AM, elviani.huse...@googlemail.com
 wrote:
>
> Hi, I am new to android, and I just install the android on the eclipse
> and trying to run my first Hello Android program and I have exactly
> the same problem. 'adb version' failed! and Failed to parse the output
> of 'adb version'.
> I am working on the Mac osx enviroment.
> Have you manage to solve the problem?
> Thank you.
>
>
> Elviani.
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Anyone else seeing problems with the browser & Google Sites?

2008-12-10 Thread Bill Napier

Have you tried accessing it on Wifi vs. cell data?  Could also be a
t-mobile data issue.

On Wed, Dec 10, 2008 at 10:52 AM, Al Sutton <[EMAIL PROTECTED]> wrote:
>
> I suppose the question now is is this an Android bug or a Google sites bug?
>
> Al.
>
> Al Sutton wrote:
>> Mark Murphy wrote:
>>
>>> Al Sutton wrote:
>>>
>>>
 Go to http://sites.google.com/site/piggybanksoftwarehomepage/dowloads


>>> Are you sure you don't have any examples with shorter URLs?
>>>
>>> ;-)
>>>
>>>
>>>
>>
>> *http://tinyurl.com/5hnbz5 could be a bit easier on the fingers :).
>> *
>>
 On my system the desktop browser gives me the save as dialogue box, the
 android browser 404?


>>> I get a save-as on the desktop and I get a "Web page not available" on
>>> the G1. Feels like some browser sniffing gone awry.
>>>
>>>
>>>
>>
>>
>>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: intent-filter for addContact and editContact ?

2008-12-04 Thread Bill Napier

I would start looking here:

http://code.google.com/android/reference/android/content/ContentResolver.html#registerContentObserver(android.net.Uri,
boolean, android.database.ContentObserver)

with ContentObserver.registerContentObserver which sounds like it
should do what you want.  I haven't used the function yet, so you may
have to mess with it.  Please report back you results so others can
know the answer too.  Thanks!

Bill

On Thu, Dec 4, 2008 at 6:11 AM, jaspher <[EMAIL PROTECTED]> wrote:
>
> hello
>
> I'm looking for a intent-filter which can start my BroadcastReciver
> when somebody adds a new contact or edit a contact. Unfortunately I
> couldn't finde something like that. Does it exist?
> If not how can I get a Notification when somebody added a new contact
> or something like that?
> thanks in advance
>
> jaspher
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: intent-filter for addContact and editContact ?

2008-12-04 Thread Bill Napier

I would start looking here:

http://code.google.com/android/reference/android/content/ContentResolver.html#registerContentObserver(android.net.Uri,
boolean, android.database.ContentObserver)

with ContentObserver.registerContentObserver which sounds like it
should do what you want.  I haven't used the function yet, so you may
have to mess with it.  Please report back you results so others can
know the answer too.  Thanks!

Bill

On Thu, Dec 4, 2008 at 6:11 AM, jaspher <[EMAIL PROTECTED]> wrote:
>
> hello
>
> I'm looking for a intent-filter which can start my BroadcastReciver
> when somebody adds a new contact or edit a contact. Unfortunately I
> couldn't finde something like that. Does it exist?
> If not how can I get a Notification when somebody added a new contact
> or something like that?
> thanks in advance
>
> jaspher
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sending email

2008-12-04 Thread Bill Napier

Searching this forum for the term "send email" gave me this mail:

http://groups.google.com/group/android-developers/browse_thread/thread/88bb36c676e3217b/c1d0be41174b4999?lnk=gst&q=sending+email#c1d0be41174b4999

Which has some example code that you could use.

On Thu, Dec 4, 2008 at 10:51 AM, dilu <[EMAIL PROTECTED]> wrote:
>
> Hi
> i want to develop an aplication which can send email .so can any one
> provide me sample code or any link that is useful.I got one site
> davanum srinivas blog,but tht code is too old and full code is not
> available right now,they have removed it from site.So provide me some
> link.
>
> Thankss
> dilu
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is it possible to add a custom link in the "Share Picture Via" dialog?

2008-11-25 Thread Bill Napier

If you look at how the MMS App handles this:

http://android.git.kernel.org/?p=platform/packages/apps/Mms.git;a=blob;f=src/com/android/mms/ui/ComposeMessageActivity.java;h=b4a00709c596b5da5cefc1486924aab6bbbf63fe;hb=HEAD#l2162

This is what they do:

Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM);

My guess is that
intent.getStringExtra(android.content.Intent.EXTRA_STREAM) returns
null because the value stored for that key isn't a string but a URI.

I want to do the same thing in an app I'm working on, but I won't have
a chance to work on it until tomorrow. :(  But I'm glad that you're
working through all the issues now so it should be easier for me
tomorrow.  :)

Bill

On Tue, Nov 25, 2008 at 12:46 AM, Freddy <[EMAIL PROTECTED]> wrote:
>
> Thank you for your response.  This worked great.  Do you know how I
> can extract the jpg data from the Intent?  Looking at the intent in
> the debugger I don't see any data.  Here's my code:
>
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>setContentView(R.layout.main);
>
>Intent intent = getIntent();
>String type = intent.getType
> ();  // return image/
> jpg ... that's good
>String stream = intent.getStringExtra
> (android.content.Intent.EXTRA_STREAM);  // returns null ... ouch
>String text = intent.getStringExtra
> (android.content.Intent.EXTRA_TEXT);  // return null
>Bundle extras = getIntent().getExtras();
>if(extras != null)
>{
>String test = extras.getString(what goes here);  // need docs
> for ACTION_SEND??
>}
>
>
> The docs 
> http://code.google.com/android/reference/android/content/Intent.html#ACTION_SEND
> say the data should be in the EXTRA_STREAM but it's null.  Any ideas?
> I assume it might be stuffed in the bundle somewhere but I'm not sure
> how to figure out which named string to use in the extras.getString()
> call to find it.  Is there some docs I'm overlooking or maybe
> something I can see in the debugger?
>
> Thanks.
>
> On Nov 24, 12:38 am, Bill Napier <[EMAIL PROTECTED]> wrote:
>> Yes.  Register an intent-filter for your activity that captures:
>>
>> action: android.intent.action.SEND
>> category: android.intent.category.DEFAULT
>> mimeType: image/*
>>
>> If you look at the AndroidManifest.xml for the Mms application in the
>> git repo you can see an example of it.
>>
>> b
>>
>>
>>
>> On Sat, Nov 22, 2008 at 10:11 PM, Freddy <[EMAIL PROTECTED]> wrote:
>>
>> > After taking a picture on the G1 the user is prompted with Save | Set
>> > As | Share | Delete.  If Share is selected then they're taken to a
>> > "Share Picture Via" dialog.  Currently the options Google mail and
>> > Messaging are in the dialog.  I want to add a link to my program which
>> > can share the photo with a different service
>>
>> > Is it possible to add a custom link in the "Share Picture via" dialog?
>>
>> > Thanks!- Hide quoted text -
>>
>> - Show quoted text -
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is it possible to add a custom link in the "Share Picture Via" dialog?

2008-11-24 Thread Bill Napier

Yes.  Register an intent-filter for your activity that captures:

action: android.intent.action.SEND
category: android.intent.category.DEFAULT
mimeType: image/*

If you look at the AndroidManifest.xml for the Mms application in the
git repo you can see an example of it.

b

On Sat, Nov 22, 2008 at 10:11 PM, Freddy <[EMAIL PROTECTED]> wrote:
>
> After taking a picture on the G1 the user is prompted with Save | Set
> As | Share | Delete.  If Share is selected then they're taken to a
> "Share Picture Via" dialog.  Currently the options Google mail and
> Messaging are in the dialog.  I want to add a link to my program which
> can share the photo with a different service
>
> Is it possible to add a custom link in the "Share Picture via" dialog?
>
> Thanks!
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---