Can I use UNIQUE in the query() parameter?

by Ralf » Mon, 13 Apr 2009 13:36:24 GMT

Sponsored Links
 What Mark said, you probably meant DISTINCT.

For reference, the Sqlite3 doc on SELECT is here: 

Also remember that you have the sqlite3 binary either in SDK/tools or
via adb shell. It can be handy to simulate your select manually once
before you code your query.



Other Threads

1. Animating an Updating TextView

Animated TextView Not Updating..

Ok. Here is my problem.. I am a little new to android dev.. I'm having
a hard time understanding 2D graphics..

I was able to make my Layout rotated like iPhone's LandscapeLeft to
LandscapeRight.. It has a TextView that updated with accelerometer
The problem is that after the animation the TextView stops updating..

I have read that this type of animation only moves the view.. and that
everything else is still in it's previous position... Can someone help
me understand. I have attached my project in case somebody wanted to
look at it..

ANY suggestions would be much appreciated.. Thanks..

The project is also in Github

Here is the code..

package org.example.hello;

import android.widget.TextView;

public class Hello extends Activity implements SensorEventListener {
/** Called when the activity is first created. */

Camera camera;
SurfaceView surfaceView;
SurfaceHolder surfaceHolder;
boolean previewing = false;
LayoutInflater controlInflater = null;

TextView numbersView;
TextView numbersView2;

// for orientation change
OrientationEventListener mOrientationEventListener;
int mDeviceOrientation;
public SensorManager sensorManager = null;
float accelerationX;
float accelerationY;

// ///Orientation//////
static final int lanscapeLeft = 2;
static final int lanscapeRight = 1;
int orientation = 2;

View viewControl;

public void onCreate(Bundle savedInstanceState) {

// *******************************************
// full screen mode
// *******************************************
getWindow().setFlags(WindowManager.LayoutParams.FL AG_FULLSCREEN,
// *******************************************
sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);

//sets a floating layer
viewControl = getLayoutInflater().inflate(R.layout.mainview, null);

numbersView = (TextView) findViewById(;
numbersView2 = (TextView) findViewById(;

mOrientationEventListener = new OrientationEventListener(this,
public void onOrientationChanged(int orientation) {
mDeviceOrientation = orientation;

if (mOrientationEventListener.canDetectOrientation()) {

// /////////////////////////ACCELEROMETER SET
// UP/////////////////////////////////////
protected void onResume() {
// Register this class as a listener for the accelerometer sensor
sensorManager.getDefaultSensor(Sensor.TYPE_ACCELER OMETER),


public void onAccuracyChanged(Sensor arg0, int arg1) {
// TODO Auto-generated method stub


public void onSensorChanged(SensorEvent event) {
// TODO Auto-generated method stub
synchronized (this) {
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {

// high-pass filter to eliminate gravity
accelerationX = event.values[0];
accelerationY = event.values[1];
String accValue = String.format("%.1f", accelerationX);
String accValue2 = String.format("%.1f", accelerationY);

if (mDeviceOrientation <= 300 && mDeviceOrientation >= 240) {
if (mDeviceOrientation >= 60 && mDeviceOrientation <= 120) {



public void animateRootViewToLanscapeLeft(View view) {
if (orientation == lanscapeRight) {
Animation spin = AnimationUtils.loadAnimation(
getApplicationContext(), R.anim.tolandscapeleft);
orientation = lanscapeLeft;

public void animateRootViewToLanscapeRight(View view) {
if (orientation == lanscapeLeft) {
Animation spin = AnimationUtils.loadAnimation(
getApplicationContext(), R.anim.tolandscaperight);
orientation = lanscapeRight;



2. StackView example as a non-widget application

I see that there is sample code in the Android SDK for using StackView
as a widget here:

Does anyone know of any samples for using StackView in a non-widget
application (i.e. inside an Activity and populating it with drawables
instead of from Remote resources)?

Thank you very much,


3. Internet not working via adhoc network connection in galaxy ace GT-S5830

4. Removing a specific over lay item

5. How to connect to Internet with Wifi when no Cellular Service is present

6. C2DM server

7. Any good answer to: No subject alternative DNS name matching found