[android-developers] Re: How to use ActivityGroup?

2009-05-12 Thread Richard Cook
ActivityGroup works just like a normal activity with one key difference - it can have multiple activities embedded into it. You will run the activityGroup with all the normal ways you run an activity, implementing the onCreate, onDestroy, etc... Typically if you have a default activity, you will wa

[android-developers] Re: EMMA Code coverage and JUnit

2009-05-11 Thread Richard Cook
I as well am looking to understand how o build an emma instrumented test. I am unable to find any information on EMMA through SDK or through the web. Maybe the three of us can pool our resources and keep this thread alive to a.) get noticed, b.) get some code coverage. For those catching on: htt

[android-developers] Re: memory leak when closing and restarting appliction several times

2009-04-21 Thread Richard Cook
You need a tearDown() method, and for each activity you start, keep a handle to it.. which depends on which Test package you are using. Looks like you are using a single activity, in which case you can use getActivity() for your current activity. So an example would be: @Override protected void t

[android-developers] Re: How to instrument code to find an OutOfMemory error (in WebView?)

2009-04-21 Thread Richard Cook
Look at ActivityManager, it has access to memory info. I bet you could use that to manage/find memory leaks and other things. Let me know if that helps at all! On Tue, Apr 21, 2009 at 8:57 AM, Richard Cook wrote: > This is a good question, a proper testing method for unit power/mem

[android-developers] Re: How to instrument code to find an OutOfMemory error (in WebView?)

2009-04-21 Thread Richard Cook
This is a good question, a proper testing method for unit power/memory consumption. I believe there is one through instrumentation that allows you to access the free memory (I can't find it right now). But I'd like to know this as well. On Tue, Apr 21, 2009 at 3:18 AM, Mariano Kamp wrote: > Hi,

[android-developers] Re: How to access "shared data/settings" across multiple application? ContentProvider or SharedPreferences?

2009-04-20 Thread Richard Cook
Suppose I have an application that runs functional testing and needs to access the shared preferences. The function test extends InstrumentationTestCase, but getting the shared prefs through the Context() and targetContext() getters provided by the instrumentation doesn't seem to let me be over wri

[android-developers] Re: Android Functional Testing (testing multiple activities)

2009-04-20 Thread Richard Cook
So I've learned a bit more about the Instrumentation, but now I am at a point where it HANGS if I have more than one test case running. I'm running a cross-activity functional test case using InstrumentationTestCase. I have to run handles for the ActivityGroup, currentActivity, and the activityMa