android-discuss, Can I use UNIQUE in the query() parameter?

Can I use UNIQUE in the query() parameter?

by Bin Chen » Sun, 12 Apr 2009 20:51:58 GMT

Sponsored Links

My contacts contain a lot of duplicated records, I want to use the
traditional SQL clause "UNIQUE" to get the unique records, is it
doable thru the query() method call? Thanks. I tried with the
selectionArgs argument but failed.
Bin
--~--~---------~--~----~------------~-------~--~----~

Can I use UNIQUE in the query() parameter?

by Mark Murphy » Sun, 12 Apr 2009 20:55:05 GMT

I am not aware of a UNIQUE clause in queries in SQL. There is DISTINCT
to get the unique records, and MySQL has a UNIQUE constraint in CREATE
TABLE and ALTER TABLE.
Regardless, you may want to try rawQuery() instead of query() -- I tend
to use that for things that are outside the ordinary.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Android App Developer Books: http://commonsware.com/books.html
--~--~---------~--~----~------------~-------~--~----~

Hi guys:
I am a fresh man in the android and now I am working on a board that
using freescale imx51. We are porting the BSP from IMX51 EVK.
For this board, we change the audio codec from it's original audio
codec SGTL5000 to WM8758, so of course, the EVK audio driver could not work
on our board
We definitely will modify the audio driver for our new audio codec, but
currently we want to bypass this issue and boot the android without audio
feature.
But In fact, when we boot, the system will hang with the
"ANDROID" animation, after check with the logcat, we found the system is
waiting for the media.audio_policy, like this:
*
[20:20:25.974] I/SystemServer( 2041): Audio Service
[20:20:25.983] I/ServiceManager( 2041): Waiting for sevice
media.audio_policy...
[20:20:26.981] I/ServiceManager( 2041): Waiting for sevice
media.audio_policy...
[20:20:27.981] I/ServiceManager( 2041): Waiting for sevice
media.audio_policy...
[20:20:28.981] I/ServiceManager( 2041): Waiting for sevice
media.audio_policy...
[20:20:29.981] I/ServiceManager( 2041): Waiting for sevice
media.audio_policy...
[20:20:30.981] W/AudioSystem( 2041): AudioPolicyService not published,
waiting...
As the audio codec does not loaded successfully, the ALSA could not
found any audio device so the system hang here.
*
Does any one know how to disable the audio feature in the android?
With this question, I have one more question:
How to config to build one minimum Android? (Any configuration file
that we can modify?)
(for example: delete AUDIO feature/delete WIFI/delete Bluetooth/delete
all the google App/etc...)
Any comments is highly appreciated!! Thanks a lot
--

I am trying to find a way to use OpenGL ES 2.0 in a live wallpaper (I
need to use shaders to implement the algorithm.) I have a class that
implements GLSurfaceView.Renderer and runs fine in an activity with a
GLSurfaceView. I searched and found Robert Green's
GLWallpaperService, but the code is based on an old GLSurfaceView and
does not have the method setEGLContextClientVersion, which I need in
order to enable OpenGL ES 2.0.
Has anyone managed to make a live wallpaper with OpenGL ES 2.0? If
so, I would appreciate help in writing the WallpaperService to run a
Renderer that already works in a GLSurfaceView.
--