using SQLiteOpenHelper outside emulator

by robin bakkerus » Tue, 25 Aug 2009 01:05:38 GMT

Sponsored Links
 Is it possible to use/test the SQLiteOpenHelper outside the emulator
(to speed up development).
The problem is that constructor of the SQLiteOpenHelper needs an
Hence is is possible to mimic the context.


Other Threads

1. AudioRecord works with short but static with byte

Any idea why reading bytes from AudioRecord would cause an error while
reading shorts would not?  The sound comes through great with short
but I get only static with bytes.

Working code with short[]:

int minBufferSize = AudioRecord.getMinBufferSize(this.getSampleRate(),

AudioRecord recordInstance = new AudioRecord
minBufferSize );
bufferedStreamInstance = new BufferedOutputStream(new FileOutputStream
DataOutputStream dataOutputStreamInstance = new DataOutputStream

short[] tempBuffer = new short[minBufferSize ];
while (totalBytesRead < timeToRecord*sampleRate) {
        bufferRead =, 0, minBufferSize );

        for (int idxBuffer = 0; idxBuffer < bufferRead; ++idxBuffer) {

//      Close resourcesrecordInstance.stop();

If I just change these two lines though, I get static:

1) Change:
short[] tempBuffer = new short[minBufferSize];

To this:
byte[] tempBuffer = new byte[minBufferSize];

2) And this:
for (int idxBuffer = 0; idxBuffer < bufferRead; ++idxBuffer) {

To this:
dataOutputStreamInstance.write(tempBuffer, 0, bufferRead);

Anyone else experience this or have suggestions?

2. what is a suitable upper limit for application size?

I've filed a bug report against it, but not sure if its been address in
later releases.

At the time of 1.5 and 1.6, the package installer requires 4x the package
size to be available during an install.

That means, for a 15mb package, the user will need 60mb of free space, or
else the install will fail (adb installs bypass this requirement).  The
error message is also unhelpful: "Installation Failed".

Considering G1's only have 64mb, you're in a rough spot.  We've had a ton of
user complaints with our apps that are around 5.5mb.


3. Updates to the Android SDK

4. WebView cannot resolve URL by name after loading a few webpages in emulator

5. Strange WebView "Web Page Not Available" behavior after application runs for a long time

6. Problem with Password Reset Captcha

7. what is the best practices to keep data between activities deathes/restarts for the whole application session?