Databases sample using SDK 0.9

by Hans » Sat, 13 Sep 2008 19:46:28 GMT

Sponsored Links
 Hi ppl i found a database manipulation sample using the SDK version m3-
xxx but unfortunately this does not work on SDK 0.9 since some methods
seem to have changed a bit. At some point i managed to get it
compiling but not functional yet. I guess there is something basic
missing which i am not noticing most probably since i am still a very
new and crude android developer :). Therefore is there anyone out
there that has a database sample using the SDK 0.9 pllleeeassssee?

Thanks guys for your help!!


Other Threads

1. Making the Java assert statement work

(I am using Eclipse as my development environment.)

How do I make the Java assert statement work? By "work" I mean that a
failed assertion should either stop program execution or at least log
the failure. Currently, neither happens. I understand there is a run-
time option to enable this (-ea), but I don't know where to specify
it. Changing "Preferences\Java\Installed JREs\Edit JRE\Default VM
Arguments" has no effect, probably because those settings are not used
for the Android execution.

Thanks for any help, and please let me know if there is a document
that I should read to know things like this.

(I am speaking here strictly of the Java assert statement, not of
other assertion facilities such as those in junit.)


2. Getting Hprof dump from application code

In my application , i have an option to capture the hprof dump. I

android.os.Debug.dumpHprofData (String fileName)

Initially i though the hprof data generated by the method above is for
the entire device , which is not so . The hprof data generated is only
for my process.

Now i am trying to generate hprof data for other process as well. I
need to get the Hprof dump for all the running processes from
application code.

from adb shell i tried "kill -10 <pid>" , This command will generate
the hprof file for the corresponding  process in the data/misc folder.

Now the problem is this command is working perfectly from the adb
shell prompt , but i am not able to embed the command to mycode.

My code is like

Runtime.getRuntime().exec("chmod 777 /data/misc")
Runtime.getRunTime().exec("kill -10 <pid>")

No exceptions are thrown , but somehow  it is not working. The same
code above is capturing Hprof dump for my process, when i give my
process ID.

I tried with "android.os.Process.sendSignal (int pid,
android.os.Process.SIGNAL_USR1) ;" also.Getting the same problem.It is
capturing Hprof dump for my process. For other processes it is not

Do we need to have any special permission to kill other process from
our process ? Or is it a built issue ? can you please suggest some
possible way to get Hprof dump for other processes from application


3. How to debug endless loop?

4. How to get dimensions of soft keyboard?

5. An Extremely Simple Question

6. OtterBox Commuter for MotoDroid atau Milestone

7. Repost: +bonus - price dropped WTS: HTC Magic 32A