[android-developers] JUnit on the emulator without instrumentation

2009-03-24 Thread gudujarlson
I would like to write, run, and debug JUnit tests that test non-GUI code that has dependencies on the Android SDK. Is there a simple way to do that? I'm aware of the instrumentation mechanism, but that seems to be geared towards testing GUI code. It is also unclear how to use the instrumentation

[android-developers] Drop entire database?

2009-03-24 Thread gudujarlson
I have an automated test that creates a SQLite database. In the setup of the test I want to drop the database if it already exists. The problem is that I cannot find a function that deletes/drops a database. That seems like an odd omission. Help?

[android-developers] Re: Drop entire database?

2009-03-24 Thread gudujarlson
on the SQLiteDatabase class? On Mar 24, 11:24 pm, gudujarlson gudujarl...@gmail.com wrote: I have an automated test that creates a SQLite database. In the setup of the test I want to drop the database if it already exists. The problem is that I cannot find a function that deletes/drops a database

[android-developers] Re: JUnit on the emulator without instrumentation

2009-03-25 Thread gudujarlson
Assuming there is no easy way to make use of android.test without instrumentation, has anyone tried to do their own port of JUnit (or similar framework) to the android platform? On Windows Mobile I am using NUnitLite. Does JUnitLite exist? --~--~-~--~~~---~--~~

[android-developers] Re: Drop entire database?

2009-03-25 Thread gudujarlson
The Context class has a suite of functions for creating, opening, and deleting databases at the standard location of databases for your app. The SQLiteDatabase class can be used to access a databases at any absolute path. In that case, you are using an absolute path, so use File to delete

[android-developers] Re: JUnit on the emulator without instrumentation

2009-03-27 Thread gudujarlson
I discovered that at least some of JUnit exists on the emulator. In particular TestCase and Assert exist. However, TestRunner does not appear to exist. I find it odd that only parts of JUnit are present. --~--~-~--~~~---~--~~ You received this message because you

[android-developers] Re: JUnit on the emulator without instrumentation

2009-04-06 Thread gudujarlson
in the published SDK, quite soon you will in fact be able to run these tests directly from Eclipse.  In other words, because this is the supported mechanism, you'll benefit from upcoming improvements tools. Hope this helps. --Andy On Fri, Mar 27, 2009 at 10:15 PM, gudujarlson gudujarl

[android-developers] Re: Drop entire database?

2009-04-06 Thread gudujarlson
Thank you, Sirius, but my question was how to drop the entire database, not just one table. --~--~-~--~~~---~--~~ 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] Re: Poll Screen On/Off state

2009-11-03 Thread gudujarlson
You can't poll screen on/off state.  The best you can do is to register a BroadcastReceiver, and wait for an Intent to come along. Until that first Intent is received, you'll have no idea what the screen state is. Yes, that is how it appears and thus why I posted. It seems like a important

[android-developers] Re: Poll Screen On/Off state

2009-11-03 Thread gudujarlson
Monitor the ACTION_SCREEN_OFF and ACTION_SCREEN_ON Intents, then. If your application starts based on a user action, then you know the screen is on at that point -- you don't need an API for that. That occured to me, but I'm not confident that it would be reliable. I don't like the idea of

[android-developers] Poll Screen On/Off state

2009-11-03 Thread gudujarlson
I have an app that runs in the background indefinitely provided there is work to be done. I want the app to go to sleep if there is no work to be done and the user is idle. The second part has me stumped. On Windows Mobile I was able to poll the power state to determine user idleness. On

[android-developers] Re: Poll Screen On/Off state

2009-11-03 Thread gudujarlson
What does the user being idle have to do with anything here? If there is no work to be done, there is no work to be done, so stop your service and wake it up after some time to see if there is new work to be done. Well, I simplified the situation in an attempt to make my post succinct. The app

[android-developers] CDMA home carrier

2009-12-02 Thread gudujarlson
How does one determine the home carrier on a CDMA phone? By home carrier I mean the carrier that the phone's owner has a contract with, not the owner of the cell site that the phone is communicating with. These are different when the phone is roaming. On a GSM phone I can get the home carrier from

[android-developers] Re: CDMA home carrier

2009-12-02 Thread gudujarlson
What you are referring to is information about the current cell tower, not the home operator. On a GSM phone, you can get the home operator with TelephonyManager.getSimOperator(), but on a CDMA phone it returns a bogus value. On Dec 2, 6:14 pm, Ken H hunt1...@gmail.com wrote: On GSM I use:

[android-developers] Re: CDMA home carrier

2009-12-03 Thread gudujarlson
*should* get you the CDMA version of the System ID, Network ID, and Base Station ID, which will uniquely identify the cell you are current on. Ken On Dec 2, 4:22 pm, gudujarlson gudujarl...@gmail.com wrote: What you are referring to is information about the current cell tower

[android-developers] Re: CDMA home carrier

2009-12-04 Thread gudujarlson
But don't get me started on Android 2.0 and this CDMA stuff. Example: the CdmaCellLocation has two methods (getBaseStationLatitude() getBaseStationLongitude()) which, judging from the name return the LAT/ LON of the site. Great, I'm thinking until I look at the datatype and see that they are

[android-developers] Re: How to build apk from multiple Eclipse projects?

2009-12-16 Thread gudujarlson
It is quite a bummer that Android resources cannot be distributed in a jar. One possible work-around that comes to mind is writing up a simple tool to convert resources to java literals and compiling these into your project. For example: public static final byte myresource[] = {0x45,0x23,0x8F};

[android-developers] Re: How to build apk from multiple Eclipse projects?

2009-12-16 Thread gudujarlson
I have been perplexed by the lack of a library concept since my first look at Android. It seems the Android designers viewed the library concept as unnecessary. In it's place we have activities, services, broadcast receivers, and content providers. However, either I am subborn to new ideas or

[android-developers] HSPA vs HSPA+

2010-11-10 Thread gudujarlson
I don't see a separate constant on android.telephony.TelephonyManager for HSPA+ (Evolved High-Speed Packet Access). Is there no way to differentiate between HSPA+ and HSPA/HSUPA/HSDPA? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post