[android-developers] New android developer having trouble building signed apk

2016-10-05 Thread Bill Perrotta
Running Windows 7 Android studio.

When trying to build a signed apk I get java.lang.OutOfMemoryError: unable 
to create new native thread.


Is it possible to run android studion correctly on 3gb ramm 32 bit 
windows7? Intel  D cpu 3.40 ghz 3.39 GHZ

I have bluestacks running api19 android 4.4.2 because the native emulator 
requires vtx haxm.

I created and coded a project but can't run it or export it to an apk.

I created this variable in windows system when gradle wouldn't 
run _JAVA_OPTIONS Variable value: -Xmx512M.

Very frustrating maybe someone here can help or point me to a good source 
for help.



I apologise if this is the wrong place to post.


Thanks,

Bill Perrotta.


-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/0c1534fc-c4b4-4f20-8e0d-4c491df7e430%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How to instrument Android Dalvik compiler?

2016-08-24 Thread Bill



down votefavorite 


I need to instrument Android 4.3 Dalvik compiler 
 
for 
some purposes.

*What is the goal?*

The goal is to calculate the elapsed execution time used by assignment 
statements in the Android Dalvik VM code.

*What did I do so far?*

I insert the following code between assignment statement(s) in the Android 
Dalvik VM source code:

start = get_time()  end = end_time()
elapsed_time = end-start

*Why the above code does not work?*

The above code does not work for the following reasons:

   1. The get_time() function, more specifically *gettimeofday()* or 
   *clock_gettime()*, has higher resolution than the assignment statement 
   and hence gives negative values.
   2. To solve the negative values above, I end up using a for-loop to loop 
   1 billion times for each code that has assignment statements. However, the 
   Android code becomes extremely slow and does not work.

*What do I need to do to solve the problem?*

I need to instrument the Dalvik compiler to identify the assignment 
instructions and calculate/estimate their execution times at the 
compile-time (not at run-time). Does anyone know how to do that?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/617da8a8-dcd5-4c4c-9191-01c73d1ebec3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android Updates

2016-03-13 Thread Bill N
When is Google going to take android system updates out of carrier hands? I 
have been stuck on 4.4.4 forever and would love to see a few updates? 

Google news needs to take charge on updates and leave carriers with an API 
to put their junk at their leasure. 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/79e0ee5c-4734-4649-8947-5cddb4015cfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Local service, 'hardware' back and AppCompat up buttons

2016-02-04 Thread Bill Morgan

No need to make it so complicated.

Subclass Application, add your objects, getters and setters.




On 2/4/2016 12:51 PM, Kostya Vasilyev wrote:

No need to make it so complicated.

Since you mentioned that your objects aren't parcelable -- we're 
talking about sharing data between various places all within same 
process (VM).


You can just pass them around the way you normally would between 
methods / classes.


To make it cleaned, I'd look into some kind of "event bus" where some 
objects can subscribe to abstract "changes" and others can send these 
"change notifications".


Can be something like JavaRX or an "event bus", for example:

http://greenrobot.org/eventbus/

( I haven't used this, but the principle is the same )

-- K


2016-02-04 21:40 GMT+03:00 Massimo Del Zotto >:


Hello,
In my program I need to pass 'live' Objects from one activity to
another. Those are most likely not parcelable and most likely not
just data. I figured out I could use a local Service to provide a
cross-Activity data sharing. It's just a map from unique ids to
Object. Initial experimentation went great.

However, I am having serious trouble with a difference between the
back and the up button.

The application is set up as follows: there's a MainMenu Activity
which launches the service by means of bindService(...,
BIND_AUTO_CREATE). Other "inner" activities bind by
bindService(..., 0). They unbind on onDestroy, mostly because I'm
lazy.

Now, because of the way I have setup activities, the up and the
back buttons should be equivalent. And indeed they are. Sort of.

When I push the back 'hardware' button I have: onPause, onStop,
onDestroy as expected. Here, I de-register the callback and... at
a certain point I got a huge error by pushing the 'back' button
relating to a leaking window created in my onServiceDisconnect.
Indeed, I show an error dialog when this happens with the only
option being calling finish().

I figured out I needed to keep track of unbinding status. It was
my understanding onServiceDisconnect wouldn't get called when I
unregister... it turns out the 'back' button produces this
sequence of calls: onPause, onServiceDisconnected,
onServiceConnected (MainMenu), onStop, onDestroy.

*Is anyone aware of this difference and why does that happen?* As
a side note, this implies Binders should be passed around (in
MainMenu) with care as they can go stale. Not really a big problem
but something to keep in mind.

I'm trying to devise a solution. For the time being, I'll think
I'll resolve to 'instant service connections' so I bind, do what I
need and unbind right away. I might do that in an AsyncTask in
case... *isn't that an hammer solution?* I totally missed about
this difference in documentation and I'm confused on how to use
services correctly at this point.

Elaborations are welcome.

Massimo


-- 
You received this message because you are subscribed to the Google

Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to android-developers+unsubscr...@googlegroups.com
.
To post to this group, send email to
android-developers@googlegroups.com
.
Visit this group at
https://groups.google.com/group/android-developers.
To view this discussion on the web visit

https://groups.google.com/d/msgid/android-developers/b7a759ba-2013-4669-81c3-28628c12b59a%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google 
Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to android-developers+unsubscr...@googlegroups.com 
.
To post to this group, send email to 
android-developers@googlegroups.com 
.

Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAN7dqjAc8s35WsuAU8BX8%3DR3UWUjWRnpuZkAWa9jb3%2BwpSHo9Q%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Android 
Developers" group.
To unsubscribe from this group and stop receiving 

[android-developers] logcat within AndroidStudio

2014-12-18 Thread Bill Morgan

is there any way to capture the locat info
within AndroidStudio ?

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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Abridged summary of android-developers@googlegroups.com - 47 Messages in 22 Topics

2013-02-20 Thread Bill Lahti
Uhtq
On Feb 20, 2013 2:41 AM, android-developers@googlegroups.com wrote:

   Today's Topic Summary

 Group: http://groups.google.com/group/android-developers/topics

 How to do sketch by programmatically in Android? [1 Update]
 Android Canvas development [4 Updates]
 Refund [1 Update]
 about jni lib***.so question [1 Update]
 MediaPlayer suddenly stopped working in Android 4.2 [3 Updates]
 How use my app's notifications instead of calendar app's? [2 Updates]
 gradle and libs [6 Updates]
 How to update ADT on Eclipse BUNDLE from google android developer..? [3
Updates]
 Application not Visible on emulator Screeen [5 Updates]
 Are NPOT textures compressed to ETC format supported on SGX540 GPUs? [2
Updates]
 IP address [4 Updates]
 AudioRecord sample rate + Touch Sounds + HDMI [1 Update]
 Testing onSaveInstanceState/onRestoreInstanceState [1 Update]
 android app icon does not appear in airwatch [2 Updates]
 Multiple HTTP requests [2 Updates]
 Alternative SQLite [1 Update]
 Debugger to run Android Applications [2 Updates]
 Different sets of widgets for pre-3.0 and post-3.0 devices? [2 Updates]
 DialogPreference - Background remove [1 Update]
 Getting the current theme background-color [1 Update]
 Expansion File [1 Update]
 Spinner [1 Update]
  How to do sketch by programmatically in Android?
 Meena Rengarajan meenasoft...@gmail.com Feb 19 09:55PM -0800

 Hi,
 Anyone worked on Sketcher- Lite app in Android. I have tried alot and
 googled so. I dont find any sources or links regarding Sketching in
android
 ...more
  Android Canvas development
 janvi jagruthi.bha...@gmail.com Feb 19 06:40AM -0800

 Hello all

 Iam new to canvas android development.I want to develop an android app
 using canvas,but how to give support to diiferent devices(hdpi,ldpi,mdpi)
 is bothering me alot.
 ...more
 bob b...@coolfone.comze.com Feb 19 07:08AM -0800

 I would just put your stuff in drawable-nodpi to start with. That way
 nothing will get scaled unless you explicitly make it scaled.



 On Tuesday, February 19, 2013 8:40:29 AM UTC-6, janvi ...more
 janvi jagruthi.bha...@gmail.com Feb 19 07:47PM -0800

 Ya thanks for your reply...

 But my doubt is suppose we are drawing a rectangle to screen resolution
of
 480*800 using the following code


 public class DrawView extends View {
 ...more
 Stephen Lebed srle...@gmail.com Feb 19 09:53PM -0800

 I highly recommend this book Beginning Android Games by Mario Zechner.
 He explains things very well and if you're new to Android, this is the
 book to get, even if your not planning on writing ...more
  Refund
 Stephen Lebed srle...@gmail.com Feb 19 09:51PM -0800

 My apps are paid apps and I don't use in-app purchasing at all. I don't
 think there is a way to disable an app if I refund a customers money. At
 least the way things are set up now. ...more
  about jni lib***.so question
 Chuz Lin shmcc...@gmail.com Feb 19 07:31PM -0800

 Hi,all
 I had build an android sdk,I wanted to modify a apk which under the
 path /system/app,but I am fail. When I added a jni interface to apk,I
 don`t know why it worked well with Eclipse ...more
  MediaPlayer suddenly stopped working in Android 4.2
 Brill Pappin br...@pappin.ca Feb 19 02:18PM -0800

 So, for all of you paying attention to this thread or having a similar
 issues with MediaPlayer.

 It appears that the MediaPlayer is picky about what directly the files
are
 stored in.
 ...more
 Mark Murphy mmur...@commonsware.com Feb 19 05:46PM -0500

 If you can create a sample project that reproduces the error, post it
 and your description as an issue on http://b.android.com. If you think
 of it, reply on this thread with the issue link.


 -- ...more
 Brill Pappin br...@pappin.ca Feb 19 06:19PM -0800

 I can try that. I should have some time away from the crunch later in the
 month :)

 To really reproduce exactly what I was doing, I'll need to be able to
 download an mp3 to the external memory, ...more
  How use my app's notifications instead of calendar app's?
 don rhummy donrhu...@yahoo.com Feb 19 02:43PM -0800

 I'm making a calendar app and I want the system to use my app's
notifications for event reminders instead of the default calendar app's (so
when a user clicks the notification it will open my app ...more
 TreKing treking...@gmail.com Feb 19 07:08PM -0600

  notifications for event reminders instead of the default calendar app's
(so
  when a user clicks the notification it will open my app instead and I
can
  do custom notifications in 4.x). ...more
  gradle and libs
 Daniel Rindt daniel.ri...@gmail.com Feb 19 02:52AM -0800

 Hello,

 my android lib makes use of some other libs which reside in /libs as
usual
 in android projects. My gradle file looks like this:

 buildscript {
 repositories {
 mavenCentral() ...more
 bob b...@coolfone.comze.com Feb 19 07:13AM -0800

 You say lib in one place and libs in another. Make sure you pick one
 name and use it everywhere.



 On Tuesday, February 19, 2013 4:52:54 AM UTC-6, Daniel Rindt wrote:
 ...more
 

[android-developers] Re: ListView content thread sync cases

2013-01-27 Thread Bill Michaelson
My confusion has been due to the lack of appreciation that in spite of the 
fact that the server-obtained updates run asynchronously in a Thread 
started by the Service, the initial Service logic is part of the main 
thread which is shared with the Activities.

I had coded the Handler in one of the Activities.  I am moving the Handler 
into the Service.  This is the logical place for the code that fields 
asynchronous updates obtained from the remote location that must be 
interwoven into the functioning of the UI.  The placement satisfies two 
criteria:

   - It is started and ready to operate regardless of the state of the UI.
   - It lives in the UI thread so that no synchronization locking needs to 
   occur,
   
I simply need to provide a mechanism that enables the handler to determine 
which data structures are present and ready for update in the Activities at 
any given time.  This is accomplished by setting/resetting pointers to the 
Activies in onCreate/onDestroy. The communications thread simply needs to 
queue work to it.
Make sense?

On Friday, January 25, 2013 9:18:23 AM UTC-5, Bill Michaelson wrote:

 I have a Service that runs a distinct Thread to update a list based on 
 external events.  This list is simultaneously used to back ListViews in 
 associated Activities.  The Activities may also update the list based on UI 
 events.

 I need to provide appropriate synchronization.  I have coded a provision 
 to send update events from the Service to the Activity(ies) via Message 
 thru Handler.  Thus, I believe I can assure that the actual updates to the 
 data in the list occur in the UI thread which should work properly when the 
 Activity is running.

 But when the Activity is not running for whatever reason (not started, 
 destroyed, etc.), I need to have the Service update the list directly.  
 This is not a problem either; the Activity can find the revised list 
 content to create the ListView when it (re)starts.

 But my problem is that I want to find a reasonable mechanism for all 
 dynamic states, especially during transition, or in other words:

- signal to the Service that the Activity is running and should be 
used to process an update
   - in such case assure that the update completes (i.e. that the 
   Activity is not destroyed after the Message is passed, but before it is 
   processed)
- otherwise signal that the Service must process the update in the 
absence of the Activity
   - in such case assure that the Activity does not start and attempt 
   to build a ListView prior to list content update completion by the 
 Service

 I suspect this pattern of synchronization has been accomplished by 
 others.  Advice appreciated.




-- 
-- 
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] ListView content thread sync cases

2013-01-25 Thread Bill Michaelson
I have a Service that runs a distinct Thread to update a list based on 
external events.  This list is simultaneously used to back ListViews in 
associated Activities.  The Activities may also update the list based on UI 
events.

I need to provide appropriate synchronization.  I have coded a provision to 
send update events from the Service to the Activity(ies) via Message thru 
Handler.  Thus, I believe I can assure that the actual updates to the data 
in the list occur in the UI thread which should work properly when the 
Activity is running.

But when the Activity is not running for whatever reason (not started, 
destroyed, etc.), I need to have the Service update the list directly.  
This is not a problem either; the Activity can find the revised list 
content to create the ListView when it (re)starts.

But my problem is that I want to find a reasonable mechanism for all 
dynamic states, especially during transition, or in other words:

   - signal to the Service that the Activity is running and should be used 
   to process an update
  - in such case assure that the update completes (i.e. that the 
  Activity is not destroyed after the Message is passed, but before it is 
  processed)
   - otherwise signal that the Service must process the update in the 
   absence of the Activity
  - in such case assure that the Activity does not start and attempt to 
  build a ListView prior to list content update completion by the Service
   
I suspect this pattern of synchronization has been accomplished by others.  
Advice appreciated.


-- 
-- 
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] Selectively suppress error messages - Disable msg: 2114 in Android

2013-01-24 Thread Bill K


Does anyone know if we can selectively suppress SMS error messages sent by 
the carrier ?

We have an app that auto replies to users. Only on the Sprint network we 
get a text msg: 2114 when the app auto replies to a phone call with a SMS 
message.

This thread describes our issue in detail: *
http://community.sprint.com/baw/thread/82947*http://community.sprint.com/baw/thread/82947

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

Re: [android-developers] Using APK Signature to detect .apk tampering (Attn: Dianne??)

2013-01-15 Thread Bill Tschumy
On Jan 15, 2013, at 1:22 PM, bob b...@coolfone.comze.com wrote:

 How does your anti-piracy mechanism deal with people who just copy the APK 
 around but don't actually modify it?
 
 
 
 This seems like it would be the most common case anyhow.
 

We also use Google Plays LVL so the ability to run the app is tied to your 
Google Play account having made the purchase.  To circumvent that you would 
need to modify the app or (I guess) install a hack in your system that 
intercepts the LVL call and automatically approves it.

-- 
Bill Tschumy
Otherwise -- Longmont, CO
http://www.otherwise.com



-- 
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: why couldn't create webservice using android?

2013-01-10 Thread Bill Michaelson
Google: android thermostatat.

Et cetera

-- 
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] Boot sequence and application coordination

2012-10-19 Thread Bill Michaelson
I recently modified an application such that a component Service is now 
started upon device boot via RECEIVE_BOOT_COMPLETED.  But when the service 
started, I encountered a problem with sqlite opening - a failure that was 
critical to the application.  Upon examining adb logcat output, I noticed 
messages that announced phases of fsck operating, and implying that fsck 
did not complete until after my sqlite open failure.  I assumed that the 
underlying file was inaccessible because my app started too early relative 
to fsck.  Based on this hunch, I inserted a 5 second Thread.sleep() into 
the start sequence.  This seems to have solved the problem.

But I am unsatisfied for two reasons:

1) My fix is non-deterministic.  There is no guarantee that 5 seconds will 
always be adequate, or theoretically, that any arbitrary delay is 
sufficient.
2) I have not absolutely determined a causal relationship between the fsck 
and the open failure.

Ideally, I will delay start until precisely the moment that the OS and 
supporting processes are adequately prepared.

So I seek advice from a more imaginative, knowledgeable or experienced 
developer.

TIA

-- 
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: Boot sequence and application coordination

2012-10-19 Thread Bill Michaelson


To answer my own question, I think I'm looking for code like that below.

public void waitForExternalStorage()
{

while(Environment.getExternalStorageState().equals(Environment.MEDIA_CHECKING))
{
try { Thread.sleep(1000L); }
catch(InterruptedException e) { e.printStackTrace(); }
}
}


Alternately, I can wait for a broadcast of Intent.ACTION_MEDIA_MOUNTED.

Have I got the right?  And is there anything else I should be wary of in 
this start-at-boot scenario?

On Friday, October 19, 2012 1:13:43 PM UTC-4, Bill Michaelson wrote:

 I recently modified an application such that a component Service is now 
 started upon device boot via RECEIVE_BOOT_COMPLETED.  But when the service 
 started, I encountered a problem with sqlite opening - a failure that was 
 critical to the application.  Upon examining adb logcat output, I noticed 
 messages that announced phases of fsck operating, and implying that fsck 
 did not complete until after my sqlite open failure.  I assumed that the 
 underlying file was inaccessible because my app started too early relative 
 to fsck.  Based on this hunch, I inserted a 5 second Thread.sleep() into 
 the start sequence.  This seems to have solved the problem.

 But I am unsatisfied for two reasons:

 1) My fix is non-deterministic.  There is no guarantee that 5 seconds will 
 always be adequate, or theoretically, that any arbitrary delay is 
 sufficient.
 2) I have not absolutely determined a causal relationship between the fsck 
 and the open failure.

 Ideally, I will delay start until precisely the moment that the OS and 
 supporting processes are adequately prepared.

 So I seek advice from a more imaginative, knowledgeable or experienced 
 developer.

 TIA



-- 
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: GUI with monkeyrunner

2012-10-16 Thread Bill Napier
On Tue, Oct 16, 2012 at 12:39 PM, Lew lewbl...@gmail.com 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


[android-developers] International Hack-A-Thon!

2012-09-10 Thread Bill Mote


Our sister group across the pond is holding an International Hack-a-Thon. 
 http://www.dutchaug.org/events/74969932/

 

I know Johan, the organizer, and I'm certain he'll hold an amazing event. 
 The have substantial prizes for winners!  (Trips to London, Tablets, etc.)

 

Even if you can't participate please help him spread the word.  The event 
is quickly approaching and he'd love to see a few more participants.

 

Bill Mote

-- 
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] Android Fu: TwitterCreeper (Requirements Doc Released)

2012-08-30 Thread Bill Mote
Just because you missed last night's coding challenge doesn't mean you 
still can't have fun with it!

The full requirements presentation can be found here:

https://docs.google.com/presentation/d/15z-_tq3tRnXLlIqcZR6DXQvIkWcWONH6hBuKjcwnQl4/edit#slide=id.p

The next coding challenge is scheduled for the 5th Wednesday in October 
which also happens to be Halloween!  We'll have to see if we can come up 
with something spooky :)

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

[android-developers] Android Fu Coding Challenge this Wendesday night!

2012-08-27 Thread Bill Mote


It is time!  The 3rd 5th Wednesday is upon us.  Come out and join us 
Wednesday night for dinner, drinks and coding.


This will be a completely unique set of requirements that requires no 
former knowledge of the previous events to complete.  The requirements will 
be held secret until the start of the event at which time you will have 2 
hours to code a solution.  The requirements will be broken into novice, 
intermediate advanced and guru levels enabling success to be achieved by 
all!


I will secure a location today.  Stayed 
tuned: http://www.meetup.com/cincy-android/events/74720062/


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

[android-developers] Re: SystemClock.elapsedRealtime() drifts by up to ~1 second when the phone is in sleep mode

2012-07-27 Thread Bill Steinberger
Leo, I am seeing this same behavior and stuggling to find a solution.  Have 
you worked it out yet?
I've tried implementing it in a Runnable and using SystemPreferences to 
store the times onPause, then retrieve them onResume  and seen this issue. 
 Then I moved the SystemClock.elapsedRealtime() to a service, thinking if I 
kept the timer running while the screen was blank that might be better.  I 
started testing that last night on a device and it looks like it has the 
same issue.

On Saturday, June 23, 2012 12:58:35 PM UTC-4, Leo Alekseyev wrote:

 I am writing an app that relies on precise clock synchronization between 
 devices.  I can sync up the clocks using NTP with good precision, and they 
 stay in sync as long as the phones are plugged in.  However, if either 
 phone becomes disconnected from power and goes through a few sleep/wake 
 cycles (e.g. by pressing the power button or letting it time out), the 
 clocks will be out of sync by 0.3 - 0.7 seconds, whereas I need millisecond 
 precision.

 My understanding was that *S*ystemClock.elapsedRealtime() should be 
 immune to sleep / deep sleep states. What might be going on, and is it 
 possible to fix this behavior? In my test code, I simply have a loop inside 
 a thread that constantly looks at elapsedRealtime and updates UI if 
 necessary. My test devices are HTC Hero with CM7 / Gingerbread, and Nexus S 
 4G with ICS.*

 --l
 *

-- 
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: Accessing Android Transceiver Info.

2012-07-20 Thread Bill Takats
Definitely NOT underwater.  I am looking at an APP to essentially bounce
sonic waves through/off materials -- probably in the 20 - 5000 Hz range.

On Fri, Jul 20, 2012 at 1:42 PM, bob b...@coolfone.comze.com wrote:

 Do you want underwater sonar or above water sonar (like what bats use)?

 On Thursday, July 19, 2012 10:16:36 PM UTC-5, Be Tox wrote:

 Does anyone know how to access the transceiver information (MIB?) on
 an Android phone in order to create a Sonar type App?

 Kind Regards, Be Tox

  --
 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




-- 
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] Re: Accessing Android Transceiver Info.

2012-07-20 Thread Bill Takats
I was/am planning to simply use the speaker and mic for sound doppler
spectral analysis of solid non-dense objects.  Being an Engineer, I would
imagine that real time capturing of the reflected sonic waves might be an
issue when compared to the initial sent ping signals.  Hence, in a
nut-shell, my problem -- real-time!.  I still need to work out the
frequencies and corresponding amplitudes for different object densities.  I
am obviously in the feasibility stage of development.

Someone suggested to me that Android devices (and most real-time cell/pda
devices) might contain an embedded MIB Module (Management Information Base)
*http://en.wikipedia.org/wiki/Management_information_base*.  If this is the
case, then it could be a simpler matter of extracting the information from
the MIB-module and doing the spectral analysis at that point.  ie, it would
look real-time.

I am looking for what might be proprietary information (schematics, etc) of
the guts of the Android or even iPhone, etc to see exactly how the
transmitted and received signals are handled and digested, even for simple
voice calls.  This whole issue might be a lot simpler than I think, but it
usually never is.

Thanks for any and all comments and suggestions
.

On Fri, Jul 20, 2012 at 3:14 PM, bob b...@coolfone.comze.com wrote:

 Are you planning to use sound waves or electromagnetic waves?  For sound
 waves, I would expect you would use audio playback and the microphone, and
 not a transceiver.


 If you're using electromagnetic waves, that's radar… ish.




 On Friday, July 20, 2012 12:54:56 PM UTC-5, Be Tox wrote:

 Definitely NOT underwater.  I am looking at an APP to essentially bounce
 sonic waves through/off materials -- probably in the 20 - 5000 Hz range.

 On Fri, Jul 20, 2012 at 1:42 PM, bob b...@coolfone.comze.com wrote:

 Do you want underwater sonar or above water sonar (like what bats use)?

 On Thursday, July 19, 2012 10:16:36 PM UTC-5, Be Tox wrote:

 Does anyone know how to access the transceiver information (MIB?) on
 an Android phone in order to create a Sonar type App?

 Kind Regards, Be Tox

  --
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en




 --
 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




-- 
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

[android-developers] PhoneGap Presentation

2012-07-15 Thread Bill Mote


I am *very* pleased to announce Bill Steele as this month's guest speaker. 
 Bill will be presenting on PhoneGap at the Cincinnati Android Developers 
Group Monthly Presentation  Discussion: 
http://www.meetup.com/cincy-android/events/70053092/


I have attended a couple of the PhoneGap meetings hosted by Bill through 
our sister meetup.com group All Things Mobile.  Most recently Bill 
participated in a head-to-head, cross-platform coding challenge in which 
the participants were asked to build a simple tip calculator.  Bill carried 
the torch for both Windows Phone and iOS.


Bill is a Senior Trainer at Max Technical Training in Mason, Ohio and a 
successful Entrepreneur having started VirtualHUD.


Bill Mote

-- 
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] Android vs. Everyone: Live! July 12!

2012-07-09 Thread Bill Mote
At last month's It's really time to get serious about PhoneGap meeting, 
hosted by our sister group All Things Mobile, I threw down the gauntlet: 
build a tip calculator in your respective platform to induce dialog about 
its merits.

They have willing participants for iOS, Windows Mobile and PhoneGap. I will 
be carrying the mantle for Android.

This should create some interesting compare and contrast discussion. Come 
help represent the green! Viva-la-Android!

Details At:
http://www.meetup.com/cincy-android/events/71138762/

Bill Mote

-- 
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] Kaia!!! Android Fu Coding Challenge Tonight!

2012-05-30 Thread Bill Mote


http://www.meetup.com/cincy-android/events/55126262/

Kaia, commonly used in Western Martial Arts as Kihap (aka Hi-yah!), is a 
focused release of energy (paraphrasing): http://en.wikipedia.org/wiki/Kihap

 

Tonight is your night to focus and release your inner-Android! (
http://www.youtube.com/watch?v=-OpPwcM_NJw, you're welcome)

 

The presentation and challenge are complete.  The facility is prepared for 
our group.  Tonight should be a great success!  See you at 6:15!

 

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

[android-developers] Alarm BroadcastReceiver fog

2012-05-19 Thread Bill Michaelson
I've placed the stub of some new logic into a Service that will rely
on AlarmManager to periodically goose the service.  I've been using
adb shell dumpsys alarm and logcat to trace it, and it seems that I
have been able to set the alarm and I see evidence that the alarm is
tripped.  But I don't see evidence that the event is delivered to my
BroadcastReceiver.  I suspect that I am not properly registering the
receiver or I am misusing Context.  I would appreciate an extra set of
experienced eyes.

In the startup logic of my service is the code which instantiates an
inner class (Alarm) which serves as the BroadcastReceiver and also
provides the utility function to set the alarm...

  if (!pulse.isAlive()) {
 pulse.start();
 alarm = new Alarm();
 String acs = Alarm.class.toString();
 IntentFilter ifilt = new IntentFilter(acs);
 registerReceiver(alarm,ifilt);
 alarm.setAlarm((Coordinator)this,15000); // in 15 secs
 Log.d(TAG,ALARM SH BE SET -*_*_*_*_* -
+acs);
  }

The logcat confirms execution (the Service class is called
Coordinator)...

D/CoordMT (  322): ALARM SH BE SET -*_*_*_*_* - class
net.from.apprise.Coordinator$Alarm

Correspondingly, the dumpsys alarm output shows creation of the alarm
after invocation:

  Realtime wakeup (now=1337434262327):
  RTC_WAKEUP #0: Alarm{4503cc48 type 0 net.from.apprise}
type=0 when=1337434275855 repeatInterval=0 count=0
operation=PendingIntent{45049198: PendingIntentRecord{45000eb0
net.from.apprise broadcastIntent}}

and after the elapsed period, it also shows the alarm history count
incremented as expected (from 2 to 3 in this case)...

  Alarm Stats:
  android
   ... stuff omitted ...
  net.from.apprise
52ms running, 3 wakeups
3 alarms: flg=0x4 cmp=net.from.apprise/.Coordinator$Alarm

But I don't see expected trace meesage from the BroadcastReceiver...

   public class Alarm extends BroadcastReceiver {
  @Override
  public void onReceive(Context context, Intent intent) {
 Log.d(TAG,BING1 ** -
);
 PowerManager pm =
 
(PowerManager)context.getSystemService(Context.POWER_SERVICE);
 PowerManager.WakeLock wl =
pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,YOUR TAG);
 wl.acquire();
 Log.d(TAG,BING2 ** -
);
 wl.release();
  }
  public void setAlarm(Context context,long msFuture) {
 AlarmManager am =
 
(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
 Intent i = new Intent(context,Alarm.class);
 PendingIntent pi = PendingIntent.getBroadcast(context,0,i,0);
 am.set(AlarmManager.RTC_WAKEUP,
System.currentTimeMillis()+msFuture,pi);
  }
   }

The Service containing the Alarm object is definitely running when the
alarm is tripped, and I have no reason to believe that the Alarm
object has been freed.  I would appreciate some tips for diagnose, or
if there is an obvious error, a blatant clue!  Thanks for your
attention.

-- 
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: Alarm BroadcastReceiver fog

2012-05-19 Thread Bill Michaelson
Bingo.  My fog enveloped the precise use of Intents, as you
undoubtedly inferred.  The alarm is being caught in the receiver now.
I thank you for your very direct, clear identification of the problem
and the equally clear solution,

Further to the broader scope of the application:

The application has been functioning properly.  One of its functions
is to periodically sleep for periods which are determined by multiple
factors such as detected activity level of peers or use by the local
user.  I want to allow the user to leave the Service running at all
times for the purpose of maintaining local data currency obtained from
peers via a server and alerting the user occasionally, who
periodically runs a companion Activity.  But when the sleep intervals
are large, it is obviously unwise to hold a WakeLock.  Thus I have
turned to AlarmManager - basically to goose the Service after it has
allowed the phone to shutdown for awhile.  That's what I'm
experimenting with.

The user has the option of shutting down the service completely or
leaving it running indefinitely.  When it is running, it shows an icon
in the notification bar.  I suppose I could rely on AlarmManager to
restart the Service after all pauses, but that raises more questions.
For one, would the notification icon remain?  Also, would it be
advantageous in the event that my Service is in a period of short
duration pauses such as 5 seconds?  From the opposite perspective, is
there any serious negative consequence to leaving a Service running
during phone sleep and simply goosing it with an alarm as I'm
proposing?

Thanks again.

On May 19, 10:35 am, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, May 19, 2012 at 10:14 AM, Bill Michaelson

 wmmichael...@gmail.com wrote:
  In the startup logic of my service is the code which instantiates an
  inner class (Alarm) which serves as the BroadcastReceiver and also
  provides the utility function to set the alarm...

       if (!pulse.isAlive()) {
          pulse.start();
          alarm = new Alarm();
          String acs = Alarm.class.toString();
          IntentFilter ifilt = new IntentFilter(acs);
          registerReceiver(alarm,ifilt);
          alarm.setAlarm((Coordinator)this,15000); // in 15 secs
          Log.d(TAG,ALARM SH BE SET -*_*_*_*_* -
  +acs);
       }

 The primary point behind AlarmManager is to run code when nothing else
 of your code is running. Why are you using both AlarmManager *and*
 what appears to be a long-running service?

 Note that your BroadcastReceiver is being registered with an
 IntentFilter that uses an action string.

  But I don't see expected trace meesage from the BroadcastReceiver...

 Because you are not broadcasting an Intent that will be picked up by
 that IntentFilter.

          Intent i = new Intent(context,Alarm.class);

 This broadcast does not use an action string. It uses a component.
 This would be a fine choice if your BroadcastReceiver were registered
 in the manifest, but yours is not.

 If you want to send a broadcast to an IntentFilter that uses an action
 string, your Intent that you are broadcasting must use the same action
 string (e.g., new Intent(this.is.my.action.string)), not a
 component.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.6
 Available!

-- 
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] Faster Image Processing on Android

2012-03-27 Thread Bill Morgan
On Sat, 24 Mar 2012 07:58:16 -0700 (PDT)
Christopher Wade christopher.w...@btinternet.com wrote:

take a look at the BufferedImage class.

 I am using getPixel and setPixel on the bitmap to do this. This is
 unfortunately incredibly slow.

-- 
Bill Morgan b...@bmorgan.com

-- 
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: source of Runkeeper api

2012-03-20 Thread Bill Day
I am RunKeeper's Platform Evangelist for the Health Graph API.

There's technical and partner information on the Health Graph and how to 
start using it (it's free to use, btw) from the presentations and links 
here:
http://blog.healthgraph.com/about/

I would be very happy to answer any questions you may have after.  Thanks 
for your interest,
Bill Day
Twitter:  @billday
Email:   bill@runkeeper


On Friday, March 16, 2012 4:32:42 PM UTC-5, putzz12 wrote:

 well im interesed on know the source of that api. 
 i may pay something for that

-- 
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] OnTouchListener with multiple views problem

2012-03-20 Thread Bill Lahti
I have worked with some code that was in the API 8 Android Launcher. I have 
found that it is a pretty good framework for drag-drop.
For more about the sample apps I built, see my answer on StackOverflow: 
http://stackoverflow.com/questions/9661536/dragging-and-dropping-a-button-from-one-linear-layout-to-another-linear-layout/9683018

Bill

On Tuesday, March 20, 2012 2:28:00 PM UTC-4, metro wrote:

 Hi
 I've seen it all... :)
 They are all talking about dragdrop functionality implemented since 
 Honeycomb 
 (Api level 11) 
 Any other example please? 
 Thanks!


 On Tuesday, March 20, 2012 6:43:02 PM UTC+2, MagouyaWare wrote:

 http://lmgtfy.com/?q=android+drag+and+drop+view+example

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Tue, Mar 20, 2012 at 10:39 AM, metro rotems...@gmail.com wrote:

 hi
 thanks for your answer.
 I've tried this, but I found my problem (still isn't solved).
 I have multiple imageviews over a framelayout (also tried with 
 relativelayout)
 their place over the screen is determined by Padding (dynamically) so 
 the last Imageview added has the biggest z-index

 The problem is, I can't choose the smaller z-index views because the 
 last one is over them.

 I believe this is not the dragdrop best practice.

 Do you have some kind of example to give me?

 Thanks !

 On Monday, March 19, 2012 8:32:49 PM UTC+2, MagouyaWare wrote:

 firstView.setOnTouchListener(**null)?

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/**magouyawarehttp://sites.google.com/site/magouyaware


 On Sat, Mar 17, 2012 at 2:39 PM, metro rotems...@gmail.com wrote:

 Hi,
 I have a problem I can't solve.
 I've dynamically  configured multiple views with the same
 OnTouchListener
 After I finish moving one view (ACTION_UP and return false), and
 trying to touch and move other view, the OnTouch method is called with
 the same first view as parameter, and that view is jumping to where
 my finger is
 How can I tell android I've finished with this view when the ACTION_UP
 is called?

 Thanks a lot!

 --
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://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] 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 antiagai...@gmail.com 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

[android-developers] Re: What percentage of users lack the ability to install from outside the Droid marketplace ?

2012-01-09 Thread Bill K
On Jan 2, 10:47 pm, Michael Banzon mich...@banzon.dk wrote:
 What are you trying to bake into the APK? The only time I've seen
 this solution is on apps that integrated deeply with a single system
 on a closed network.

I'm creating a two party app that allows employers create and update
employee task lists via a website.   The website sends an installation
link to the employee via SMS and email.
After the employee downloads and installs the app apache validates the
employees phone number.   Upon phone number validation the customized
task list is sent back to the employees app.

I was going to do a direct .apk download from apache but will probably
have the app on the marketplace as to avoid the non-trusted
installation issue.




 It it possible that this is a great convenience to the users - but
 take into account the inconvenience of setting up and allowing
 non-trusted apps on a device. Most Android devices I've seen in my
 region allow this. Many users have the technical skills required to
 do this. But most people will never to it - because it has words like
 not trusted and insecure attached to it.









 On Fri, Dec 30, 2011 at 10:34 PM, Bill K b...@backofficedesigns.com wrote:
  Does anyone know What percentage of users lack the ability to install
  from outside the Droid marketplace ?

  My app polls my website and requires customization prior to
  downloading.  The important point here is my app needs to be
  customized prior to installation - not after.  Therefore selling the
  app in the marketplace will not work.  If I had a private URL in the
  Droid marketplace that allowed my users to install a trusted app -
  that would work - but thats not going to happen. Therefore it looks
  like I'm going to sell it outside of the marketplace.

  Here are some pros and cons I've come up with.

  Pros / Droid marketplace installation :

  1. Seller keeps 100% of revenue
  2. 100% of users have the ability to install

  Cons / Droid marketplace installation :

  1. 30% of revenue goes to google
  2. Users need to log into the droid marketplace with thier google
  account. Users not logged in may not complete the sign in process.

  Pros / non - marketplace installation :

  1. Users don't have to be logged into their google account to install

  Cons / Droid marketplace installation:

  1. Some users cannot install apps from non trusted locations.

  I welcome feedback and debunking of my observations.

  --
  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

 --
 Michael Banzonhttp://michaelbanzon.com/

-- 
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] calling order of activities

2012-01-08 Thread Bill

0
down vote
favorite
share [fb]
share [tw]
i am writing a simple application which can press a previous/next
button to switch from one page to another.

I have a main activity and listen to a button. if it is press, then
trigger activity 2 to show page 2. when page 2 finish, it return to
main activity again, which will trigger activity 3 to show page 3.
when page 3 finish, it return to main activity again.

however, i found that it always show page 3 first and then page 2.
why? any hints are highly appreciated. Please also suggest if you have
other ways to do it. Thanks a lot.

=== simplified version ===

main.java

public class main extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mainscr);

Button submitButton = (Button) findViewById(R.id.submit);

submitButton.setOnClickListener(new View.OnClickListener() {

public void onClick(View view) {
  start_act2();
  start_act3();
}
});
}

private void start_act2() {
Intent i = new Intent(this, act2.class);
startActivity(i);
}

private void start_act3() {
Intent i = new Intent(this, act3.class);
startActivity(i);
}

}


act2.java (page 2)
===
public class act2 extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.act2scr);

previousButton_act2.setOnClickListener(new View.OnClickListener()
{
public void onClick(View view) {
setResult(RESULT_OK);
finish();
}
});
nextButton_act2.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
setResult(RESULT_OK);
finish();
}
});
}
}


act3.java (page3)
===

public class act3 extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.act3scr);

previousButton_act3.setOnClickListener(new View.OnClickListener()
{
public void onClick(View view) {
setResult(RESULT_OK);
finish();
}
});
nextButton_act3.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
setResult(RESULT_OK);
finish();
}
});
}
}

-- 
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] What percentage of users lack the ability to install from outside the Droid marketplace ?

2012-01-02 Thread Bill K
Does anyone know What percentage of users lack the ability to install
from outside the Droid marketplace ?

My app polls my website and requires customization prior to
downloading.  The important point here is my app needs to be
customized prior to installation - not after.  Therefore selling the
app in the marketplace will not work.  If I had a private URL in the
Droid marketplace that allowed my users to install a trusted app -
that would work - but thats not going to happen. Therefore it looks
like I'm going to sell it outside of the marketplace.

Here are some pros and cons I've come up with.

Pros / Droid marketplace installation :

1. Seller keeps 100% of revenue
2. 100% of users have the ability to install

Cons / Droid marketplace installation :

1. 30% of revenue goes to google
2. Users need to log into the droid marketplace with thier google
account. Users not logged in may not complete the sign in process.


Pros / non - marketplace installation :

1. Users don't have to be logged into their google account to install


Cons / Droid marketplace installation:

1. Some users cannot install apps from non trusted locations.

I welcome feedback and debunking of my observations.

-- 
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] Compass not working on some 2.2 devices

2011-12-28 Thread Bill Tschumy
We recently released an Android port of an iPhone app. The app relies on the 
digital compass for some features. This has been working well on most devices, 
but there are a few where the compass is not working. It seems the device is 
not feeding us any onSensorChanged() messages after we register to receive them.

I think all the problems are with devices running Android 2.2

They users claim that other apps that make use of the compass work just fine 
for them.

We start the compass using:

if ( magnetometer != null  accelerometer != null )
{
if ( compassOn )
{
sensorManager.registerListener( this, accelerometer, (int) (100 
/ kSensorUpdateFrequencyFast) );
sensorManager.registerListener( this, magnetometer, (int) (100 
/ kSensorUpdateFrequencyFast) );
}
else
{
sensorManager.registerListener( this, accelerometer, (int) (100 
/ kSensorUpdateFrequencySlow) );
sensorManager.registerListener( this, magnetometer, (int) (100 
/ kSensorUpdateFrequencySlow) );
}
}

Where the magnetometer and accelerometer are initialized at program startup 
using:

sensorManager = (SensorManager) getSystemService( SENSOR_SERVICE );
accelerometer = sensorManager.getDefaultSensor( Sensor.TYPE_ACCELEROMETER );
magnetometer = sensorManager.getDefaultSensor( Sensor.TYPE_MAGNETIC_FIELD );


We do get a valid (non-null) accelerometer and magnetometer sensors returned 
from these calls.

So does anyone have any thoughts on why the compass code might not be working 
on those 2.2 devices?

I see that even the Compass example in the example code with the Android SDK 
still used the deprecated ORIENTATION sensor for getting compass values.  Is 
this what should be used on 2.2?
-- 
Bill Tschumy
Otherwise -- Longmont, CO
http://www.otherwise.com



-- 
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] Compass not working on some 2.2 devices

2011-12-28 Thread Bill Tschumy
I did figure this out.  Turns out that in 2.2 you can't use sensor rates other 
than the standard SENSOR_DELAY_UI, SENSOR_DELAY_NORMAL, etc.  The documentation 
claims you can also specify the number of microseconds between notifications, 
but they are lying.

Once I used the standard constants it started working on 2.2


On Dec 28, 2011, at 9:38 AM, Bill Tschumy wrote:

 We recently released an Android port of an iPhone app. The app relies on the 
 digital compass for some features. This has been working well on most 
 devices, but there are a few where the compass is not working. It seems the 
 device is not feeding us any onSensorChanged() messages after we register to 
 receive them.
 
 I think all the problems are with devices running Android 2.2
 
 They users claim that other apps that make use of the compass work just fine 
 for them.
 
 We start the compass using:
 
if ( magnetometer != null  accelerometer != null )
{
if ( compassOn )
{
sensorManager.registerListener( this, accelerometer, (int) 
 (100 / kSensorUpdateFrequencyFast) );
sensorManager.registerListener( this, magnetometer, (int) (100 
 / kSensorUpdateFrequencyFast) );
}
else
{
sensorManager.registerListener( this, accelerometer, (int) 
 (100 / kSensorUpdateFrequencySlow) );
sensorManager.registerListener( this, magnetometer, (int) (100 
 / kSensorUpdateFrequencySlow) );
}
}
 
 Where the magnetometer and accelerometer are initialized at program startup 
 using:
 
sensorManager = (SensorManager) getSystemService( SENSOR_SERVICE );
accelerometer = sensorManager.getDefaultSensor( Sensor.TYPE_ACCELEROMETER 
 );
magnetometer = sensorManager.getDefaultSensor( Sensor.TYPE_MAGNETIC_FIELD 
 );
 
 
 We do get a valid (non-null) accelerometer and magnetometer sensors returned 
 from these calls.
 
 So does anyone have any thoughts on why the compass code might not be working 
 on those 2.2 devices?
 
 I see that even the Compass example in the example code with the Android SDK 
 still used the deprecated ORIENTATION sensor for getting compass values.  Is 
 this what should be used on 2.2?
 -- 
 Bill Tschumy
 Otherwise -- Longmont, CO
 http://www.otherwise.com
 
 
 
 -- 
 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

-- 
Bill Tschumy
Otherwise -- Longmont, CO
http://www.otherwise.com



-- 
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] EGL/OpenGL ES Frame Rate Stuttering

2011-08-29 Thread Bill Roeske
TL;DR:

Even when doing no drawing at all, it seems impossible to maintain a
60Hz update rate on an OpenGL ES rendering thread on an Android
device. Mysterious spikes frequently crop up (demonstrated in the code
at the bottom of this post), and every effort that I've made to figure
out why or how has lead to a dead end. Timing in more complicated
examples with a custom rendering thread has consistently shown
eglSwapBuffers() to be the culprit, frequently coming in over
17ms-32ms. Help?

More details:

This is particularly damning because the rendering requirements for
our project is screen-aligned elements smoothly scrolling horizontally
at a fixed, high rate of speed from one side of the screen to the
other. In other words, a platforming game. The frequent drops from
60Hz result in noticeable popping and lurching, both with and without
time-based movement. Rendering at 30Hz isn't an option because of the
high rate of scrolling speed, which is a non-negotiable part of the
design.

Our project is Java-based to maximize compatibility and uses OpenGL ES
2.0. We only dip down into the NDK for OpenGL ES 2.0 rendering on API
7-8 devices and ETC1 support on API 7 devices. In both it and the test
code given below, I have verified no allocations/GC events except for
the log print and automatic threads beyond my control.

I've recreated the problem in a single file that uses stock Android
classes and no NDK. The code below can be pasted into a new Android
project created in Eclipse and should pretty much work out-of-the-box
so long as you choose API level 8 or above.

The test has been reproduced on a variety of devices with a range of
GPUs and OS versions:
* Galaxy Tab 10.1 running Android 3.1
* Nexus S running Android 2.3.4
* Galaxy S II running Android 2.3.3
* XPERIA Play running Android 2.3.2
* Droid Incredible running Android 2.2
* Galaxy S running Android 2.1-update1 (when dropping API requirements
down to level 7)

Sample output (gathered from under 1 second of run time):
Spike: 0.017554
Spike: 0.017767
Spike: 0.018017
Spike: 0.016855
Spike: 0.016759
Spike: 0.016669
Spike: 0.024925
Spike: 0.017083999
Spike: 0.032984
Spike: 0.026052998
Spike: 0.017372

I've been chasing this one for a while and have about hit a brick
wall. If a fix isn't available, then at least an explanation about why
this happens and advice on how this has been overcome in projects with
similar requirements would be greatly appreciated.

Thanks,
Bill Roeske
Kittehface Software
--

package com.test.spikeglsurfview;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout;

/**
 * A simple Activity that demonstrates frequent frame rate dips from
60Hz,
 * even when doing no rendering at all.
 *
 * This class targets API level 8 and is meant to be drop-in
compatible with a
 * fresh auto-generated Android project in Eclipse.
 *
 * This example uses stock Android classes whenever possible.
 *
 * @author Bill Roeske
 */
public class SpikeActivity extends Activity
{
@Override
public void onCreate( Bundle savedInstanceState )
{
super.onCreate( savedInstanceState );

// Make the activity fill the screen.
requestWindowFeature( Window.FEATURE_NO_TITLE );
getWindow().setFlags( 
WindowManager.LayoutParams.FLAG_FULLSCREEN,
  
WindowManager.LayoutParams.FLAG_FULLSCREEN );

// Get a reference to the default layout.
final LayoutInflater factory = getLayoutInflater();
final LinearLayout layout =
(LinearLayout)factory.inflate( R.layout.main, null );

// Clear the layout to remove the default Hello World 
TextView.
layout.removeAllViews();

// Create a GLSurfaceView and add it to the layout.
GLSurfaceView glView = new GLSurfaceView( 
getApplicationContext() );
layout.addView( glView );

// Configure the GLSurfaceView for OpenGL ES 2.0 rendering with 
the
test renderer.
glView.setEGLContextClientVersion( 2 );
glView.setRenderer( new SpikeRenderer() );

// Apply the modified layout to this activity's UI.
setContentView( layout );
}
}

class SpikeRenderer implements GLSurfaceView.Renderer
{
@Override
public void onDrawFrame( GL10 gl )
{
// Update base time values.
final long  timeCurrentNS = System.nanoTime();
final long  timeDeltaNS = timeCurrentNS - timePreviousNS;
timePreviousNS = timeCurrentNS

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:

MapString, String options = new TreeMapString, String();
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 smartd...@gmail.com 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] Android Location Update every 30 seconds

2011-08-10 Thread Bill Gatliff
Example 5: User is on a telecon with a Bluetooth earpiece.  In-call,
but phone is probably sitting on a desk.

On Wed, Aug 10, 2011 at 11:03 AM, Appaholics raghavs...@appaholics.in wrote:
 I can't really help you with your main problem but you might want to watch
 out for this. The phone can and cannot be in use even when the accelerometer
 is moving fast or not moving. Example 1: The user is walking with the phone
 in his pocket. Creates a sizable amount of movement but phone is not really
 in use. Example 2: The user is walking while texting. Sizable amount of
 movement plus activity. Example 3: Device is on the table and not in use. No
 movement plus no activity. Example 4: User is sitting and texting. Not s lot
 of movement but has activity.
 You might want to rethink your app now.
 Thanks
 On Wed, Aug 10, 2011 at 9:21 PM, Hank hwang...@gmail.com wrote:

 If I determine the phone is active by reading the accelerometer, I
 want to update the location of the phone every 30 seconds. If after a
 while, I determine it's not moving, I stop the location updates.

 Is it better to leave a LocationListener on during that time, or is it
 better to register a LocationListener every 30 seconds, get an update,
 and unregister?

 For both methods, I would timeout after a while if I can't get a
 location update. I want to know which method is better in terms of
 both getting consistent updates and battery life.

 And I'm trying to get updates through GPS satellites, not network,
 even though I know network is faster and less battery consuming, but I
 need to get it through satellites. Please keep that in mind.

 --
 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


 --
 
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete control)
 http://www.raghavsood.com/
 https://market.android.com/developer?pub=Appaholics
 http://www.appaholics.in/

 --
 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



-- 
Bill Gatliff
b...@billgatliff.com

-- 
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: Standalone Java applications?

2011-08-08 Thread Bill Gatliff
Chris:

On Sun, Aug 7, 2011 at 9:40 PM, Chris crehb...@gmail.com wrote:
 Will you emulate swing?  If so, I'll buy you a beer.

Although I would love to emulate swing someday, my motivation right
now is to deal with headless applications.

Enjoy the beer.  :)


b.g.
-- 
Bill Gatliff
b...@billgatliff.com

-- 
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] Standalone Java applications?

2011-08-08 Thread Bill Gatliff
Nikolay:

On Sun, Aug 7, 2011 at 9:49 PM, Nikolay Elenkov
nikolay.elen...@gmail.com wrote:
 Assuming by 'standalone application' you mean a Java program
 with a main method, there is an dalvikvm command. If your
 class is in a dex file, you should be able to run it from the command
 line.

 Cf. # dalvikvm -help

That's exactly what I was looking for.  Thanks!

For the record (from the dalvik docs, which I didn't find until after
you had answered my question):

$ javac Foo.java
$ dx --dex --output=foo.jar Foo.class
$ adb push foo.jar /sdcard
$ adb shell dalvikvm -cp /sdcard/foo.jar Foo

Note that the generic SDK emulator doesn't seem to have a useful
/sdcard, so I use /data in the above.


b.g.
-- 
Bill Gatliff
b...@billgatliff.com

-- 
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] Standalone Java applications?

2011-08-07 Thread Bill Gatliff
Guys:


I am aware that under carefully-controlled circumstances, we can use
the NDK toolchain to produce standalone ASM/C/C++ applications for a
compatible Android target.

What if I want to do a standalone application written in Java for an
Android target?  It seems like I should be able to do this using the
SDK, and I have managed to compile a simple, do-nothing Java class
using the SDK.  (This wasn't a surprise to me).  I'm still looking at
what exactly I would transfer to the target, and then how I would
launch it.

I'm just wondering if I'm wasting my time before going any further on this.


Thanks!


b.g.
-- 
Bill Gatliff
b...@billgatliff.com

-- 
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 awdheshkumar@gmail.comwrote:

 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
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 franklin.f2...@gmail.com 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
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 nap...@android.com 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 franklin.f2...@gmail.com 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 dba.kart...@gmail.comwrote:

 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 nap...@android.com 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 dba.kart...@gmail.com 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 dba.kart...@gmail.com 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 mmur...@commonsware.comwrote:


  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 testsem...@gmail.comwrote:

 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 module
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 tiago.mal...@gmail.comwrote:

 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

[android-developers] Re: eCarrel: tech eBook reader and bookstore for Android 3.0 tablets

2011-05-11 Thread Bill Michaelson
I was about to try it, but it wants read/write access to personal
contacts.

On May 10, 9:35 pm, jacek jacek.ambroz...@gmail.com wrote:
 Just shipped today, a new eReading solution mostly for developers,
 with bookstore filled by all the latest and greatest O'Reilly titles.
 You will find lots of recent titles very highly relevant to what we do
 in Android programming,
 including books on HTML5, SQLite, JavaScript, etc. etc.
 One book, Mining the Social Web is GitHub integrated; soon there
 will be more

 https://market.android.com/details?id=com.ambrosoft.searchlib

 You can preview all the books before buying at a discount.
 After you buy a book, you will be able to download EPUB for your
 archival purposes
 eCarrel is specialized for non-fiction, scientific or technical text.
 Superb search engine and social networking built-in.

 This is only a beta so please be patient -- bugs are quite likely,
 as you can expect.
 I'd love to get your positive feedback and ideas for improvement.

-- 
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] FOTA-like updates for non-phone devices?

2011-05-04 Thread Bill Gatliff
Guys:


Are there any docs available which suggest approaches for FOTA-like
updates to non-phone Android devices?

In a nutshell, I'm looking at deploying Android as the operating
system for a device that isn't a phone.  I'm trying to figure out what
the best way might be to do in-the-field updates of the device,
particularly ones that don't require end-user intervention.  Updates
of both APKs and the core system files are considered.

I understand the basics behind all of the above, I'm just wondering if
there is existing infrastructure within the Android framework (or
elsewhere) that I should be taking advantage of.  I have experience
with this stuff on non-Android platforms.


Thanks!


b.g.
-- 
Bill Gatliff
b...@billgatliff.com

-- 
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 tiago.mal...@gmail.comwrote:

 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] 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 冯兴强 feng.harri...@gmail.comwrote:

 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
 performedLongPresshttp://androidappdocs.appspot.com/reference/android/view/KeyEvent.DispatcherState.html#performedLongPress%28android.view.KeyEvent%29
 (KeyEventhttp://androidappdocs.appspot.com/reference/android/view/KeyEvent.htmlevent)
  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: 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 dtmil...@gmail.comwrote:

 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 gaytri.ba...@gmail.com 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 dtmil...@gmail.com
 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 gaytri.ba...@gmail.com 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

[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
abhilashpuj...@gmail.comwrote:

 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: 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 l...@bendlin.us 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

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 nap...@android.com 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 l...@bendlin.us 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: 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 peddi.kanum...@gmail.comwrote:

 Please check this issue @
 http://code.google.com/p/android/issues/detail?id=16049

 -Peddi.

 On Apr 7, 4:59 pm, Peddi Kanumuri peddi.kanum...@gmail.com 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 nap...@android.com wrote:
 
 
 
 
 
 
 
  https://review.source.android.com//#change,21478
 
   https://review.source.android.com//#change,21478Adds 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 kj6...@gmail.com
 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 nap...@android.com 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

[android-developers] Email To field not displaying

2011-03-24 Thread Bill Lee
I have the following code which when testing in the emulator takes me
correctly to being able to send an email. However, the TO field isn't
displaying the email(in this case t...@email.com). Is there something
that I am missing Thanks.


public boolean onTouch(View v, MotionEvent event) {
if(event.getAction() == MotionEvent.ACTION_DOWN)
{

Intent displayIntent = new 
Intent(Intent.ACTION_SEND);
String[] extra = new String[ 
]{t...@email.com};
displayIntent. 
putExtra(Intent.EXTRA_EMAIL, extra);

displayIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
Subject);
displayIntent.setType(text/plain);
//
_this.startActivity(displayIntent);
}
return true;
}

-- 
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 rakeshkart...@gmail.com 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 nap...@android.com 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 rakeshkart...@gmail.com 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] 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 rakeshkart...@gmail.com 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] 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 techandroid@gmail.com 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 lancaster.dambust...@gmail.com 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 dtmil...@gmail.com 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 techandroid@gmail.com 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] [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 ani123.dha...@gmail.comwrote:

 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 nap...@android.com 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 ani123.dha...@gmail.com 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] Re: Compare MonkeyImage

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

https://review.source.android.com//#change,21478Adds 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 kj6...@gmail.com 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 nap...@android.com 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

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
ani123.dha...@gmail.comwrote:

 @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 nap...@android.com 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




 --
 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] [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
ani123.dha...@gmail.comwrote:

 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 ani123.dha...@gmail.com 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] Garbage collector hangs OpenGL on HTC Evo

2011-02-18 Thread Bill Tschumy
Wanted to respond to my own post and say that it appears the issue has been 
resolved.  The phone I was using was purchased on Craig's List for development 
purposes.  It turns out the phone was rooted and had God knows what installed 
on it.  I spent all afternoon learning how to unroot the phone and restore it 
back to a Factory state.  After doing so, the app now runs just fine with 
none of the GC/OpenGL hangs.

I learned a very important lesson about buying development equipment.  Know its 
history.


On Feb 16, 2011, at 9:07 AM, Bill Tschumy wrote:

 I've been battling a hang (deadlock) in OpenGL for the past week.  I've 
 finally realized that the system hangs after the garbage collector runs.  
 Here is an example from LogCat:
 
 02-16 08:49:32.609: INFO/ActivityManager(98): Displayed activity 
 com.southernstars.skysafari/.SkySafariActivity: 2219 ms (total 2219 ms)
 02-16 08:49:37.369: DEBUG/dalvikvm(1863): GC_FOR_MALLOC freed 4144 objects / 
 387544 bytes in 46ms
 02-16 08:49:37.389: ERROR/Adreno200-ES20(1863): gsl_device_waittimestamp 
 failed in rb_timestamp_wait_on_timestamp
 02-16 08:49:38.516: WARN/SharedBufferStack(1863): 
 waitForCondition(LockCondition) timed out (identity=157, status=0). CPU may 
 be pegged. trying again.
 ...
 ...
 
 Anytime the LogCat shows a GC_FOR_MALLOC or a GC_EXTERNAL_ALLOC, the app 
 hangs with OpenGL in this LockCondition.  It appears that GC_EXPLICT, for the 
 most part, does not cause a problem (maybe these are smaller allocs, I don't 
 know).
 
 Searching the internet, it seems that people are reporting things like this 
 on the HTC phones.  Usually they say the problem is very sporadic and hard to 
 reproduce.  I can reproduce it easily by simply putting a System.gc() call 
 into my application flow or by doing something that allocates a chunk of 
 memory forcing the GC to run.
 
 I have this problem on an HTC Evo.  My development partner has a different 
 phone and is not seeing this.
 
 I'm totally at a loss what to do next.  Has anyone seen anything like this or 
 have a plausible explanation for what is going on?  Is there any way it could 
 be something unusual we are doing in the app?  Or is it just a bug in the HTC 
 system or drivers?
 
 Thanks for any help.
 
 -- 
 Bill Tschumy
 Otherwise -- Longmont, CO
 http://www.otherwise.com
 
 
 
 -- 
 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

-- 
Bill Tschumy
Otherwise -- Longmont, CO
http://www.otherwise.com



-- 
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] Garbage collector hangs OpenGL on HTC Evo

2011-02-18 Thread Bill Tschumy
I posted a message a while ago saying that my mysterious problems went away 
after unrooting the phone and restoring it to factory conditions.  Turns out 
that was premature.  

After playing with the app for a bit I finally got a hang.  What is strange is 
that now I once again get the hangs soon (sometimes immediately) after starting 
the app.  Rebooting the phone doesn't help.  As weird as it sounds, it seems 
that after running the app for awhile on a fresh phone, the problem gets 
worse.

Other information that may or may not be relevant.  The bulk of the app is 
written in C/C++.  There are a substantial number of JNI methods (maybe 120) 
that serve as the glue between the Java and C++ code.  The vast bulk of the C++ 
code as runs on the iPhone so I'm pretty sure it is not causing the grief.  Is 
it even possible that some memory smash in the C code could cause a problem 
where OpenGL would deadlock after garbage collection?

Thanks for any help anyone can provide.

Bill


On Feb 16, 2011, at 9:07 AM, Bill Tschumy wrote:

 I've been battling a hang (deadlock) in OpenGL for the past week.  I've 
 finally realized that the system hangs after the garbage collector runs.  
 Here is an example from LogCat:
 
 02-16 08:49:32.609: INFO/ActivityManager(98): Displayed activity 
 com.southernstars.skysafari/.SkySafariActivity: 2219 ms (total 2219 ms)
 02-16 08:49:37.369: DEBUG/dalvikvm(1863): GC_FOR_MALLOC freed 4144 objects / 
 387544 bytes in 46ms
 02-16 08:49:37.389: ERROR/Adreno200-ES20(1863): gsl_device_waittimestamp 
 failed in rb_timestamp_wait_on_timestamp
 02-16 08:49:38.516: WARN/SharedBufferStack(1863): 
 waitForCondition(LockCondition) timed out (identity=157, status=0). CPU may 
 be pegged. trying again.
 ...
 ...
 
 Anytime the LogCat shows a GC_FOR_MALLOC or a GC_EXTERNAL_ALLOC, the app 
 hangs with OpenGL in this LockCondition.  It appears that GC_EXPLICT, for the 
 most part, does not cause a problem (maybe these are smaller allocs, I don't 
 know).
 
 Searching the internet, it seems that people are reporting things like this 
 on the HTC phones.  Usually they say the problem is very sporadic and hard to 
 reproduce.  I can reproduce it easily by simply putting a System.gc() call 
 into my application flow or by doing something that allocates a chunk of 
 memory forcing the GC to run.
 
 I have this problem on an HTC Evo.  My development partner has a different 
 phone and is not seeing this.
 
 I'm totally at a loss what to do next.  Has anyone seen anything like this or 
 have a plausible explanation for what is going on?  Is there any way it could 
 be something unusual we are doing in the app?  Or is it just a bug in the HTC 
 system or drivers?
 
 Thanks for any help.
 
 -- 
 Bill Tschumy
 Otherwise -- Longmont, CO
 http://www.otherwise.com
 
 
 
 -- 
 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

-- 
Bill Tschumy
Otherwise -- Longmont, CO
http://www.otherwise.com



-- 
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] Garbage collector hangs OpenGL on HTC Evo

2011-02-16 Thread Bill Tschumy
I've been battling a hang (deadlock) in OpenGL for the past week.  I've finally 
realized that the system hangs after the garbage collector runs.  Here is an 
example from LogCat:

02-16 08:49:32.609: INFO/ActivityManager(98): Displayed activity 
com.southernstars.skysafari/.SkySafariActivity: 2219 ms (total 2219 ms)
02-16 08:49:37.369: DEBUG/dalvikvm(1863): GC_FOR_MALLOC freed 4144 objects / 
387544 bytes in 46ms
02-16 08:49:37.389: ERROR/Adreno200-ES20(1863): gsl_device_waittimestamp failed 
in rb_timestamp_wait_on_timestamp
02-16 08:49:38.516: WARN/SharedBufferStack(1863): 
waitForCondition(LockCondition) timed out (identity=157, status=0). CPU may be 
pegged. trying again.
...
...

Anytime the LogCat shows a GC_FOR_MALLOC or a GC_EXTERNAL_ALLOC, the app hangs 
with OpenGL in this LockCondition.  It appears that GC_EXPLICT, for the most 
part, does not cause a problem (maybe these are smaller allocs, I don't know).

Searching the internet, it seems that people are reporting things like this on 
the HTC phones.  Usually they say the problem is very sporadic and hard to 
reproduce.  I can reproduce it easily by simply putting a System.gc() call into 
my application flow or by doing something that allocates a chunk of memory 
forcing the GC to run.

I have this problem on an HTC Evo.  My development partner has a different 
phone and is not seeing this.

I'm totally at a loss what to do next.  Has anyone seen anything like this or 
have a plausible explanation for what is going on?  Is there any way it could 
be something unusual we are doing in the app?  Or is it just a bug in the HTC 
system or drivers?

Thanks for any help.

-- 
Bill Tschumy
Otherwise -- Longmont, CO
http://www.otherwise.com



-- 
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 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


[android-developers] Re: No option to download the API documentation in the Android SDK and AVD Manager

2011-02-11 Thread Bill Carter

The SDK Manager shows that I do have the Honeycomb documentation
installed, and
I see it in the $SDK/docs directory, but running Helios Eclipse I get
no tips when I hover my
mouse over any of the Android classes. Is there a setting I am
missing?

  On Sat, Jan 29, 2011 at 12:53 AM, Xavier Ducrohet x...@android.com wrote:

  In the image I clearly see the Documentation for Honeycomb Preview
  package being availabe, so I'm not sure what you are asking.

  Download it, find it in $SDK/docs and do whatever you want with it.

  Note that we always have only a single docs package which contains
  docs for all version. (In the reference section you can filter out
  which API level you want to see.)


-- 
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] npapi plugin for android

2010-12-21 Thread bill dr
hi,

I am trying to write an npapi plugin for android browser.
i found that the android 2.2 sdk supply only the pluginstub interface for
that purpose.
has anyone any idea about the manner that we could implement that interface.
is there any example to clarify that issue.

Please help me, all clues are welcome.

-- 
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] NPAPI plugins

2010-12-13 Thread bill dr
Hi,

I am planning to developp an NPAPI plugin for android browser.
the first thing that I want to know is: does android 2.2 web browser
supports NPAPI plugins.
if yes, how can I enable this support (where to put the plugin's .so ...) if
not what kind of plugin should I write for Android 2.2 web applications.

thanks for your 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

[android-developers] Re: Problem of debug build.

2010-12-10 Thread Bill Haake
Me too.

MyEclipse Enterprise Workbench 8.6.1 (Eclipse Base 3.5.2)
Android SDK Tools, revision 8
Android SDK Platform-tools, revision 1
ADT and DDMS  8.0.1v201012062107-8221,
Motorola Droid Sholes 2.2.1


-- 
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 me.s...@gmail.com 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 me.s...@gmail.com 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.comandroid-developers%2bunsubscr...@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] Initial HTTP request slow over WiFi on Motorola Droid (sholes)

2010-12-06 Thread Bill Haake
Hi-

We've built an Android application that accesses data services using
HTTP requests and we have noticed that the initial HTTP requests over
a WiFi connection usually take much longer (up to 1000 times longer)
than subsequent requests. This doesn't happen on 3G.

We have spent a fair bit of time collecting data and so far we seem to
have identified a fairly specific set of circumstances where this
occurs.

Here are some observations:

1) When we create a new HTTP client, the first request takes anywhere
from 20 milliseconds to 2 milliseconds (yes 20 seconds!),
subsequent requests with the same client usually take about 20
milliseconds. The average for the first request is 5500 milliseconds
or so.

2) Occurs only on some WiFi access points, not all of them and not on
3G. We have a relatively new access point in the office (linksys
WAP4011N) that is the worst offender, the problem does not occur with
my older access point (belkin F5D7230) at home.

3) We've  observed the problem with three different Motorola Droid
Sholes phones all running 2.2. We've looked at Droid X, Droid Eris,
Samsung Galaxy Tab and have not seen this issue in any of them.

4) It's not DNS, we've snooped the traffic and the DNS requests come
back right away. If we use the IP number instead of the DNS name for
the server, we still see the problem and snooping shows no DNS
requests are made.

5) It's not the server, we've tried using 5 different servers
including www.google.com and we see the issue on all of them.
Interestingly, the longest delays seem to occur on the servers that
respond the quickest.

So my questions:

1) Anyone else noticed this behavior?

2) Anyone have any ideas what is going on?

3) Anyone have a fix? :-)


I've poked around a little in the API hoping to find something to tune
in the WiFi hardware, but I haven't found anything there.


I have a small test app that illustrates the problem and if anyone is
interested, I'll post 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] Re: What Tablet would you get

2010-12-06 Thread Bill Morgan

On 12/3/2010 6:09 PM, Phil Endecott wrote: Giving a

crapo resistive cheaptab would be an insult.  So buy a NOOKcolor.  Or
an iPad :-)

(Anyone here played with the new Nook yet?  I think I need to get one.)

Had one for about a week now. Seems solid. BN just
made their SDK available today.

People over at XDA got it rooted this week:
http://forum.xda-developers.com/


--
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: Application to Application (remote) communication

2010-11-11 Thread Bill
Hi Mark:
Thanks.  I suspected it would have to go heavy on the internet/web
side of things.

Appreciate your help  insight!

Thanks,
Bill

On Nov 9, 3:05 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Nov 8, 2010 at 5:58 PM, Bill wewin...@gmail.com wrote:
  I want to create anapplicationthat can be interactive with another
  Android device that could be across the room or across the country.
  For example, imagine playing Tic-Tac-Toe; but I'm the X's on my phone
  and the O's are my brother on his Android phone.  I think it can be
  done viaapplicationspecific messaging.  Looking to see if it is
  possible, and, if so, how to send a message from oneapplicationto
  another on another device.

 There is nothing built into Android for this. However, you have full
 access to the Internet, and so you can do whatever you want: XMPP, Web
 services, queues like Amazon SQS, etc.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android App Developer Books:http://commonsware.com/books

-- 
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] Application to Application (remote) communication

2010-11-09 Thread Bill
I want to create an application that can be interactive with another
Android device that could be across the room or across the country.
For example, imagine playing Tic-Tac-Toe; but I'm the X's on my phone
and the O's are my brother on his Android phone.  I think it can be
done via application specific messaging.  Looking to see if it is
possible, and, if so, how to send a message from one application to
another on another device.

Thanks,
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


[android-developers] RE: PathShape not closing paths correctly

2010-10-21 Thread Bill Rebey
I've solved this myself.  I was using addArc(...)  to add arcs to my path.

Apparently  the correct  call to use is arcTo(...).  It works perfectly
now.

Hopefully  someone else can get some benefit  from  it.

-Original Message-
From: BRebey [mailto:b...@rebey.com] 
Sent: Monday, October 18, 2010 2:01 PM
To: Android Developers
Subject: PathShape not closing paths correctly

I'm having trouble getting paths to close correctly.  The problem
appears to be  consistent from API 8 (Android  2.2)  back through API
4  (Android 1.6).  Emulators exhibit  the problem, as does my 2.2
phone.

It seems that Android doesn't  think that a  path is closed, even
though the path starts (via path.moveTo(...)) and ends (via
path.lineTo(...))  at exactly  the same coordinates.

If I call path.closePath() to  ensure that the path is closed, an
errant line segment is drawn,  which indicates to me that the path is
confused about being open/closed, or about which point is the
beginning/ending point in the path.

A very short but complete application  is included below that
demonstrates the problem.

Any help  with what is wrong  would be appreciated.

**An image of the results is here:**
http://rebeyenterprises.com/BadPath.png

The failing code:
-
**(testShape.java, in src/pkgs/testShape)**

package pkgs.testShape;
import android.app.Activity;
import android.content.Context;
import android.graphics.*;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.*;
import android.os.Bundle;
import android.view.View;
import android.widget.AbsoluteLayout;
import android.widget.TextView;

@SuppressWarnings({deprecation})  // AbsoluteLayout is deprecated;
this quiets warnings
public class Sandbox extends Activity
{
// For convenience - just to use the shorter Class name
private class Params extends AbsoluteLayout.LayoutParams{Params (int
ia,int ib,int ic,int id)
{super(ia,ib,ic,id);}}

private class TestShapeView extends View
{
ShapeDrawable mDrawable;
public TestShapeView (Context context, Paint.Style style,
boolean
bClose)
{
super(context);
Path path = new Path();
path.moveTo(50, 0);
path.lineTo(50,25);
// Rect: l,
t, r, b,
path.addArc(new RectF(  0,   0,  50,  50),   0,
90);// Angles:
Start, Sweep
path.lineTo(25,75);
path.addArc(new RectF( 25,  50,  75, 100), 180,
-90);
path.lineTo(75,100);
path.addArc(new RectF( 50,  50, 100, 100),  90,
-90);
path.lineTo(100,25);
path.addArc(new RectF( 50,   0, 100,  50),   0,
-90);
path.lineTo(50,0);  // Closes the path - right
back where we started
if (bClose)
path.close();   // Souldn't be necessary -
path is closed anyway
mDrawable=new ShapeDrawable(new PathShape(path, 110,
110));  // 110,
110  = H, W

mDrawable.getPaint().setColor(Color.rgb(0xFF,0xFF,0xFF));
mDrawable.getPaint().setStyle(style);
mDrawable.setBounds(0, 0, 110, 110);// Left,
Top, Right, Bottom -
Location  size
}
protected void onDraw(Canvas
canvas){mDrawable.draw(canvas);}
}
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
AbsoluteLayout layout = new AbsoluteLayout(this);   //
Params are:
W,H,X,Y;
TextView t;
layout.addView(new TestShapeView(this, Paint.Style.FILL,
true ),
   new Params (110, 110,   0,
10));
t=new TextView(this);t.setText(Closed-FILL);
layout.addView(t,new Params (200, 30,   0,   120));
layout.addView(new TestShapeView(this, Paint.Style.STROKE,
true ),
   new Params (110, 110, 200,
10));
t=new TextView(this);t.setText(Closed-STROKE);
layout.addView(t,new Params (200, 30, 200,   120));
layout.addView(new TestShapeView(this, Paint.Style.FILL,
false),
   new Params (110, 110,   0, 170));
t=new TextView(this);t.setText(NOT Closed-FILL);
layout.addView(t,new Params (200, 30,   0,   290));
layout.addView(new TestShapeView(this, Paint.Style.STROKE,
false),
   new Params (110, 110, 200, 170));
t=new TextView(this);t.setText(NOT Closed-STROKE);
layout.addView(t,new Params (200, 30, 200,   290));

[android-developers] Catching button behavior

2010-10-21 Thread Bill C
I need to specify the full button images for both the up and down
positions.  My impression is that the most probable choice is to use
an custom button based on the ImageView and specify the image for up
and down positions.  I am using the OnTouchEvent method to capture the
ACTION_DOWN, but I'm not getting the ACTION_UP event.

Is there a better choice for creating a button that controls the full
button image, catches the Down/Up and can subdivide the down time into
time slices?  If not, how do I catch the up event.

My application expects a screen touch on the button and not a
keyboard action.

Thx,
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


[android-developers] How to zoom in/out image with webkit

2010-09-10 Thread Ghetto Bill Gates
I have an app where its a website wrapped with webview/webkit but when
I load images via linkes, you can use basic functions to zoom in/out.
I thought this was standard throughout  using Android?

http://pastie.org/1144392

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] Cant get basic HTML5 stuff to work

2010-09-07 Thread Ghetto Bill Gates
I made a video of my app, the part where I am having trouble started
at 30 seconds.

http://www.screentoaster.com/watch/stUElTQ0BJRFtXQ1VUUl5RX1JQ/html5

This is my code http://pastie.org/1144392

This is a html5 site using webview/webkit wrapper.

1.  The problem I am having is that when I click a link to load the
comics, there is no sign of loading, is there any built in loader or
progress bar I can use, otherwise people think the app has frozen.
When the links load I then can click them to load the picture but I
have the same problem, it can be a big file picture and people will
think the app is frozen.

2.  Last problem is that I cant zoom in and out of any picture that is
loaded?

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] TabHost Splash Screens

2010-07-29 Thread Bill
I have a TabHost activity that starts my application. I tried adding a
splash screen and it successfully loads the first time the application
is launched. The splash activity goes away and the tab activity is
displayed. If you exit the application and start it again, the splash
activity is not displayed. The application goes right into the tab
activity.

If you look at the Logcat, the Thread for the splash activity seems to
die but the tab activity seems to be suspended. Once you go back into
the application, the tab activity is just refreshed.

Anyone else seen this? Does anyone have sample code on how to resolve
this?

-- 
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] Static header in ListView

2010-06-12 Thread Bill Lumberg
I have a ListView with several columns and I need a header row at the
very top that labels each of these columns that *does not* scroll with
the rest of the ListView. I am using addHeaderView right now, but I've
ran into 2 problems:

1) The header scrolls. I need it outside of scrolling so that it's
always floating on top.

2) Each column in the header isn't lining up with the columns in the
listview. I can make the header columns and data columns all line up
perfectly if they're all in one big TableLayout, but how would I get
the header to be outside of the scrollview yet also stay uniform and
inline with the data columns?


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


Re: [android-developers] Static header in ListView

2010-06-12 Thread Bill Lumberg
Thanks Mark.  If I have to set the widths for each column, how do I
ensure that it expands to fit every screen size perfectly?


On Sat, Jun 12, 2010 at 2:50 PM, Mark Murphy mmur...@commonsware.com wrote:
 On 06/12/2010 04:38 PM, Bill Lumberg wrote:
 I have a ListView with several columns and I need a header row at the
 very top that labels each of these columns that *does not* scroll with
 the rest of the ListView. I am using addHeaderView right now, but I've
 ran into 2 problems:

 1) The header scrolls. I need it outside of scrolling so that it's
 always floating on top.

 Put the header outside the ListView.

 2) Each column in the header isn't lining up with the columns in the
 listview. I can make the header columns and data columns all line up
 perfectly if they're all in one big TableLayout, but how would I get
 the header to be outside of the scrollview yet also stay uniform and
 inline with the data columns?

 You'll need to set the sizes of every one of your columns -- in other
 words, use dimension resources instead of wrap_content for the width. If
 you use a RelativeLayout for the header and a RelativeLayout for the
 rows, you can then use those same dimensions and layout_marginLeft to
 have everything consistently line up.

 Or, use GridView.

 Or, write a MultiColumnListView.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 2.1 Available!

 --
 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] Static header in ListView

2010-06-12 Thread Bill Lumberg
So by 'dimension resources' you mean getting the screen size, dividing
by number of columns to get width of each?


On Sat, Jun 12, 2010 at 3:01 PM, Mark Murphy mmur...@commonsware.com wrote:
 On 06/12/2010 04:56 PM, Bill Lumberg wrote:
 Thanks Mark.  If I have to set the widths for each column, how do I
 ensure that it expands to fit every screen size perfectly?

 Perfectly? You'd need to write a MultiColumnListView, which does not
 strike me as being a ton o' fun.

 You can use dimension resources to get you part of the way there, at
 least. And if you can designate one column as absorbing any slop
 (extra pixels beyond your calculated values), you might get something
 that looks OK.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 2.1 Available!

 --
 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] Static header in ListView

2010-06-12 Thread Bill Lumberg
Thanks again.

On Sat, Jun 12, 2010 at 3:10 PM, Mark Murphy mmur...@commonsware.com wrote:
 On 06/12/2010 05:08 PM, Bill Lumberg wrote:
 So by 'dimension resources' you mean getting the screen size, dividing
 by number of columns to get width of each?

 No, I meant dimension resources:

 http://developer.android.com/guide/topics/resources/more-resources.html#Dimension

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 2.1 Available!

 --
 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] Slow Eclipse on OS X

2010-06-12 Thread Bill Lumberg
I am running Eclipse Galileo on an Intel Mac and after using it for a
bit, it becomes very slow.  By slow I mean switching between tabs and
scrolling through source becomes nearly unusable.  I have to close
Eclipse and re-open it, and that usually only solves the problem for a
short time.

Has anyone else ran into this and discovered a way to fix it?

Thank you.

-- 
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] VideoView continues to play?

2010-06-09 Thread Bill
Hi,

I have a ListView with information about videos. Once a row is
selected, I use a ViewFlipper to show the VideoView. If I go back to
the listview (I have a button), the videoview keeps playing. How can I
stop the video and hide the videoview when I go back to the listview?

Thanks,
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


[android-developers] TabHost Loads Listview that loads a ListView?

2010-06-07 Thread Bill
I have a project where I am using a TabHost (4 tabs). On the 1st three
tabs I use a ViewFlipper to go between a ListView and a View with
content. On the last tab however, I need to load a ListView that will
have multiple different kids of views. For instance, the 1st row will
load another ListView when clicked. The second row will load a View
with content when clicked, etc.

So far, I have everything working except when I click the row in the
4th tab, I am not sure how to load the other ListView. Use a
ViewFlipper?

Any help would be great

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


[android-developers] Activity Exit Animation

2010-04-12 Thread Bill
I've been using overridePendingTransition to animate Dialog Themed
activities' on creation... I would like to use animations when those
dialogs exit (as in back pressed or work finished).

According to the documentation overridePendingTransition can work when
finish() is called, but I've tried overriding it and it doesn't work.
Any thoughts on what I'm missing?

-- 
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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: SPP bluetooth

2010-04-02 Thread Bill Michaelson
There is an app called KeyPro which does this, but last I knew, it did
not support the ctl key, which is problematic for some apps (like
Connectbot).  You might contact the developer about latest status.

On Apr 2, 1:26 am, brilliant winger stw...@gmail.com wrote:
 I would like to use SPP bluetooth keyboard(not HID profile.) on my
 android.
 but android 2.1 is not supported SPP bluetooth.

 Um Someone communicated the SPP device using android RFCOMM.
 Is this possible?

-- 
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

To unsubscribe, reply using remove me as the subject.


[android-developers] Full-screen virtual keyboard?

2010-03-26 Thread Bill Gatliff
Guys:

I have a need for a virtual keyboard with maximally-large keys.
Ideally, the keyboard would expand to cover the whole screen, and the
semi-transparent keys would allow me to see the widget with the input
focus underneath.

Is such a thing possible?  Can anyone point me in a direction?  I
don't mind looking at and writing code.

Thanks!

b.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Help! about sign .apk

2010-03-22 Thread Bill Hsu
My package name does begin with com.android.

But why when uploading apk, it says:

The package name of your apk may not begin with any of the following
values: [com.android., com.google., android., com.example.]


-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: External keyboard

2010-03-17 Thread Bill Michaelson


On Mar 11, 8:53 pm, Mark Murphy mmur...@commonsware.com wrote:

 Assuming you pull off the improbable and find a way to, at the SDK
 level, convert your Bluetooth keyboard into something that responds like
 an input method editor,

That's already been done, not by me, but by a developer that sells
such a package.  The application is called KeyPro.  See

http://www.mymobilegear.com/download/Files/KeyPro_Android_User_Manual.pdf

I have suggested that he implement the CTL- functionality, and I
looked at KeyEvent to point him the right direction...

 just map your CTRL keys to be
 KEYCODE_DPAD_CENTER or whatever ConnectBot is looking for.

...but I didn't realize that KEYCODE_DPAD_CENTER is what it is, or
otherwise overlooked it.  It does indeed appear to be what we want.  I
will relay this info.  Thank you.

I wonder how many apps besides connectbot use DPAD_CENTER as a ctl-
key.  Anybody have info?

-- 
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: External keyboard

2010-03-11 Thread Bill Michaelson
Nobody knows anything at all about this?  Or maybe it's not an
interesting problem?

On Mar 7, 3:51 pm, Bill Michaelson wmmichael...@gmail.com wrote:
 I'd like to use an external keyboard.  I have a Freedom Pro Bluetooth
 keyboard that can send keystroke info to Android applications.  I am
 supposing that I can use InputMethodManager and associated framework
 to accomplish this, but I'm unsure whether it will be effective and
 useful.

 In particular, I would like to use the connectbot application, and it
 would be extremely useful to receive keystrokes for ctl-c, ctl-d,
 etc.  That application currently uses a hack approach involving the
 trackball to input ctl-keys.

 In my very superficial review of the Input Method Framework, I think I
 see that one could generate KeyEvent objects to send to the
 applications.  But these are apparently raw key events, and the data
 domain of what can be sent does not seem to include regular-old byte
 values or sequences like 0x03 (for ctl-c as an example), but rather,
 physical keypresses.  I'm inferring that applications like connectbot
 don't see byte streams like a tty device and that what I want to
 accomplish is logically impossible because they use the device at too
 low a layer.

 Am I barking up the wrong tree?

-- 
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: Unit Test Build Problems

2010-03-09 Thread Bill
Yes

On Mar 9, 5:16 am, James Wang jameswangc...@gmail.com wrote:
 First, r u sure your Android project is runnable?
 Second, r u sure you have add instrument permission in
 AndroidManifest.xml?

-- 
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] Common Classpath Variable Breaks Junit

2010-03-09 Thread Bill
I set up my Android project and various java projects to use a common
directory (set via classpath) for external Jar Files. Now my unit
tests can't run because dalvik says it can't resolve or find classes,
even though some of the classes are defined in the test project
itself !

Does anybody have ideas? This wasn't happening when each project
referenced its own local copy of the 3rd party jar 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] Unit Test Build Problems

2010-03-08 Thread Bill
I just switched the way my Android project is being built and non of
my unit tests work any more...I get errors like

WARN/dalvikvm(575): VFY: unable to resolve static field X in .
WARN/dalvikvm(575): VFY: unable to find class referenced in signature

These errors only come from my Unit Tests, where classes defined in it
can't even see other classes defined in the unit test.

Before each project had it's own directory with copies of the 3rd
party jar files. I've read around that Dex does weird things with
references but haven't been able to figure out how to fix this
problem. Is there a better way to do this? I would love to see an
example of a large Android workspace where there are multiple
projects, jar references, etc...

Is it possible to fix this with an Order/Export tweak ?

The project is structured like this:

* Eclipse Workspace (PROJECT_HOME classpath variable)
* lib
  o 3rd-party jars
  o android.jar
* Java Project A
  o Looks in PROJECT_HOME
* Java Project B
  o Looks in PROJECT_HOME
  o Depends on project A
* Android Project
  o Depends on A  B
  o Looks in PROJECT_HOME
* Android Test Project
  o Depends on A , B, Android Project
  o Looks in PROJECT_HOME

-- 
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] External keyboard

2010-03-07 Thread Bill Michaelson
I'd like to use an external keyboard.  I have a Freedom Pro Bluetooth
keyboard that can send keystroke info to Android applications.  I am
supposing that I can use InputMethodManager and associated framework
to accomplish this, but I'm unsure whether it will be effective and
useful.

In particular, I would like to use the connectbot application, and it
would be extremely useful to receive keystrokes for ctl-c, ctl-d,
etc.  That application currently uses a hack approach involving the
trackball to input ctl-keys.

In my very superficial review of the Input Method Framework, I think I
see that one could generate KeyEvent objects to send to the
applications.  But these are apparently raw key events, and the data
domain of what can be sent does not seem to include regular-old byte
values or sequences like 0x03 (for ctl-c as an example), but rather,
physical keypresses.  I'm inferring that applications like connectbot
don't see byte streams like a tty device and that what I want to
accomplish is logically impossible because they use the device at too
low a layer.

Am I barking up the wrong tree?

-- 
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


  1   2   >