SQLite Source in Android SDK - android

I'm hoping to get coverage of a test I am running that deals with an SQLiteDatabase, and I specifically want to get the coverage of the underlying C code for SQLite when I run this test. However, I don't know where the location of this C code is in the Android SDK. Can anyone tell me?
Thanks.

You should be able to find it in the folder external/sqlite

The code is not in the Android SDK. Sqlite is part of the AOSP. There is a browsable mirror here: https://github.com/android/platform_external_sqlite
EDIT:
Instead of just trying to build SQLite you could build your own emulator image. You can modify platform/external/sqlite/dist/Android.mk to add the gcov flags.

Related

Can we change Android source code using Android NDK..?

I am having a requirement like to add a custom setting to android native settings(like when we go to Home->settings->Display we have Screen timeout,Animation,Auto-rotate screen,Brightness settings available.But i want to add one more setting like auto-screentimeout there.i,e i need to change the source code of android..some thing related to forked android consept)so,Is this possible..?if so can we use NDK for this...
Thanks in advance...
You can download the Android source code and then create your own settings APK. However it will probably only run on the phone you are testing it, and I assume you run into problems when using different Android versions or some modifications by device manufacturers.
Read more http://source.android.com/ on how to get started.
Alternatively you could extract the settings APK from your current phone, decompile it with apktools, and then re-create it again with your changes.
Read more on http://code.google.com/p/android-apktool/
In both ways you need to have root access to install the new APK... and probably a custom recovery to restore from a nandroid backup when your modification crashes!
The Android NDK is for writing application code in C or C++.
What you want is to build your own version of the Android firmware; it is a completely separate issue. Have a look at this for starters.

How does android source code work?

I have download a set of android source code, which has folders such as "bionic, bootable, build, dalvik, development, frameworks, hadware, packages, prebuilt" and so on. When I browse the whole code, wonder how "import android.preference.PreferenceActivity;" works in Settings.java(D:\android-srce\Google-source\packages\apps\Settings\src\com\android\settings\Settings.java). I guess there is a android.jar file somewhere after compilation. But how does Settings.java import PreferenceActivity correctly?? I'm a beginner in Android, please help me.
Sounds like you have downloaded the source code to the Android OS. If you want to build your own ROMS then you need to study about building the OS for a particular hardware platform. This is not trivial.
If you want to build an Android app that runs on an Android device then you want to download the SDK instead - start at Android SDK and follow your nose, buy a book, read the sample code.
There is not a lot of information how to change parts of Android. However, you can read information that is connected with the aosp tag. The first cite is source.android.com After the installation of android build system you can see video from marakana group. You'll find a lot of valuable information there.

How to use Tesseract-android-Tools

I am having the tesseract-android-tools 1.00, please help me to use the interface TessBaseAPI.
I juss want to pass one .jpg image to an android application which is having some text as a part of image. then through this tesseract engine i want to extract those text into editable format..
please help to create this application in android...
Did you ever search in the internet for a manual? There are a lot of hints. Recently someone wrote a small tutorial.
Even it is for Ubuntu, but I think it gives you a clue how to proceed.
If not, your operating system is needed.
I tried compiling the tesseract-android-tools (tat) with Windows and Cygwin and failed. Some other succeeded. Then after I compiled the tat with the MAC OS and Terminal and succeeded, by using the NDK 5b.
So first have a closer look in the internet and then specify your question, so appropriate help can be posted.
Best wishes,
Volker
I recently used tess-two, which is a fork of tesseract android tools. Step-by-step tutorial on how to setup your development environment, and how to use the library with android, is provided at the readme section here - https://github.com/gorjanz/com-vodi-smetka.android

How do I see the core Android classes?

I am trying to look inside a couple of Android core classes to see about overriding some methods. I have looked into getting the Android source code, but the process described on the Android dev site is all about installing and setting up some kind of development environment. This is not necessary to me. I just want to open a class or two in a text editor and look at its contents. Does anyone know if this is possible without going through the multitude of steps described on the Android dev forums?
The easiest way is to use Google Code Search. You just have to try a search like Activity.java android and you can see the source code of that class. It even has an outline inspector:
You can download the entire source with git our just look it up as a reference on the git site. Here is a link to the sdk code:
https://android.googlesource.com/platform/frameworks/base
Another option is to use http://grepcode.com/ and perform a search such as "android ViewGroup". I've really enjoyed the style of using grepcode.

do i need to install sqlite?

Do i need to install sqlite for android or its already installed while installing all the plugin. I was trying to run the application MJAndroid, example in O'Reilly book but i am getting error in the file where the application is trying to extend SQLiteCursor Class.
EDIT
This is the Error Tree.. I am an absolute beginner to android
EDIT2
#CommonsWare thanks for the links. I tried those links and now its giving a new error ie:
The type R is already defined
Screen shot
aanybody pls explain
SQLite is part of the standard Android library; its classes can be found in android.database.sqlite. You don't need to install it.
What is the error you are getting when extending SQLiteCursor?
Look at:
http://www.javakb.com/Uwe/Forum.aspx/java-tools/2404/Eclipse-cannot-find-java-lang-Enum
and:
http://www.eclipsezone.com/eclipse/forums/t108476.html
for advice on your java.lang.Enum import problem. You might also want to take a closer look at the first error, which suggests your build path is messed up.

Categories

Resources