Having this line
Cursor c = db.rawQuery("PRAGMA table_info(?)", new String[] {tableName});
and getting this:
android.database.sqlite.SQLiteException: near "?": syntax error: , while compiling: PRAGMA table_info(?)
Do you know why?
...
I am having an Android view with a Spinner on it.
I call a populateSpinner() method to add some default values to it.
I also have a onItemSelected() event which gets called before the view is completed to print.
I would like to run a code inside this block only when the user changes the selected items, not when I add or the form gets cr...
I have a update view, where I need to preselect the value stored in database for a Spinner.
I was having in mind something like this, but the Adapter has no indexOf method, so I am stuck .
void setSpinner(String value)
{
int pos=getSpinnerField().getAdapter().indexOf(value);
getSpinnerField().setSelection(pos);
...
My ContentValues object has string keys, and I would like to get a String[] result having all the keys in it?
How do I iterate a ContentValues object?
EDIT 1
After getting two responses I came up with this, do you see problems with it?
ArrayList<String> ar = new ArrayList<String>();
ContentValues cv=data;
Set<...
Unlike some others, my Android SDK setup went smoothly on my new Windows 7 Pro 64 bit machine. However, I am currently hung up on installing the android usb drivers. What is the current state of this issue? There has been some discussion of this problem on the web but no consensus is immediately apparent.
...
Hi everybody.
I'm developing an augmented reality application for Android that uses the phone's camera to recognise the arrangement of the coloured squares on each face of a Rubik's Cube.
One thing that I am unsure about is how exactly I would go about detecting and recognising the coloured squares on each face of the cube. If you look...
Here is my layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:id="@+id/LinearLayout01"
android:layout_height="wrap_content">
<Spinner android:text="@+id/AutoCompleteTextView01"
an...
I'm currently having an issue with geolocation in a webview. I have a webapp. I'm currently not using phonegap or any other mobile framework. I've been unsuccessful at getting the built-in html5 geolocation javascript api to work on an application that runs in a webview in an android app. The site works fine otherwise from the chrome bro...
I have this code for update:
public Boolean update() {
try {
data.put(ContactsContract.Groups.SHOULD_SYNC, true);
ContentResolver cr = ctx.getContentResolver();
Uri uri = ContentUris.withAppendedId(ContactsContract.Groups.CONTENT_URI, Long.parseLong(getId()));
int mid = cr.update(uri, data,_ID+"="+getId(), null);
// n...
I'm developing and Android app using the 1.6 sdk. I'm using a TimePicker and I don't want the soft keyboard to come up when you click on the digits in the TimePicker. I only want the TimePicker to be changed using the plus and minus buttons. I've tried using android:focusable="false" and android:focusableInTouchMode="false" hoping those ...
Hi,
If I want to send VCard from any Nokia mobile to Android mobile means after receiving the VCard where it will stored in the Android Mobile either it is stored in the SMS Inbox or some other location.I never used the Android mobile till now, so please any one knows it help me.
...
I'm an android developer trying to use the javax.crypto package to encrypt/decrypt my SQLite database backups when I put them on the SD Card. That way, they can't be read while they're in the publicly accessible file system.
I can encrypt/decrypt the file just fine, but I have no idea how to tell if the user input the right key or the ...
Hi
I developed one simple android application targeting the Mobiles with android 2.0 OS.I want to know whether i can run the same application in android 1.5 .If any body knows it please help me out.
...
I am working on a fairly basic screen layout for my first Android application and running into some issues. My goal is to have a TextView in the top left and top right corner, a large "hello world" TextView in the exact middle of the screen, and then a button at the bottom of the screen. My issue is, to center the "hello world" TextVie...
I would like to do two things within my Android app :
Check if the Google Finance app is installed on the device. Should be pretty straighforward, isn't it ?
If yes, launch an intent to Open up Google Finance, displaying a graph on a particular Stock. So I also need to pass the stock ticker to Google Finance in some way... but is this...
Hi,
I'm creating a class derived from Dialog. The titlebar of the dialog looks really nice, it's a dark grey color that is somewhat transparent. Is there a way to set the color used for the background of the titlebar? The grey is cool, but I would like to set it to some custom color. I don't think this is possible, I think I'd need to s...
I'm working on a Windows 7, 64 bit machine, and just downloaded and installed the Android SDK and am using Eclipse with Android plugin.
I was just going through the "Hello Android" guide here:
Hello, Android
I also did the suggestions on this page: Droid FAQ
Before following the FAQ, the program would compile and run but wouldn't regi...
I'm looking for information about how "addProximityAlert()" exactly works
At what intervals does it check?
What happens if we use more than one addProximmityAlert(, do they work independently(do they check individually)?
...
I have some knowledge about Human computer interaction and some basic knowledge programming scripts (Python) that run from start to finish and automate some tasks I want to do or calculations. In the past I built interfaces in HTML with PHP behind it.
I would like my python scripts to evolve from the command line and build some applicat...
As is disabled on Android, is it possible to upload a photo from library, in Browser somehow? Camera/Photo Library JavaScript API?
Thanks
...