android

create a indexed column in sqlite

Can I create index on a column in the create table command in sqlite? I tried this command below in sqlite3 in Android shell. It seems to work. sqlite> create table mytest (id integer indexed); sqlite> .schema CREATE TABLE mytest (id integer indexed); But, in sqlite's query language specification, specifying a column to be indexed is...

Android: Where to find the RadioButton Drawable?

Ok, I am trying to create a custom view called CheckedRelativeLayout. It's purpose is the same as a CheckedTextView, to be able to use it in a list of items you want selected or in a Spinner. It's all working fine now, I extended RelativeLayout and implemented Checkable interface. However, I am stuck on a quite simple problem: Where c...

Get Eclipse to recognize the maps api

Hi I'm developing an Android app and trying to incorporate maps into one of my sub-activities. Having followed all of the instructions from Android, my java file will not recognize the "MapActivity" or the import statements to include the needed api. Here is my XML manifest and my class file. <?xml version="1.0" encoding="utf-8"?> ...

Possible to set BroadcastReceiver priority programmatically?

Is it possible to set the priority attribute of a BroadcastReceiver programmatically or can it only be done in XML? Relevant documents include: http://developer.android.com/reference/android/content/BroadcastReceiver.html http://developer.android.com/reference/android/R.styleable.html It doesn't seem so, but I don't fully understand t...

Android Resume Activity

In my app, I start an activity and then on button click, display an http url (using Intent - VIEW_ACTION) So when in the middle of the activity, if the user clicks the button called "Google", it opens up google.com in the browser. When I hit the back button, it comes back to my original activity screen. How can I get my activity to re...

Can I compile an Android App on 2.1 and have support for all versions 1.5 onwards?

I want my Android app to have maximum reach, and hence want to support all versions V1.5 onwards. I find some features lacking in V1.5 that are available in V2.0 or V2.1. Could I compile on V2.1, and then set minSDK for the app to run on 1.5? Plain logic says 2.1 specific features would not work, but let me know your thoughts. Also, wh...

google maps navigation

Hello! I want to develop an gps application that can navigate to some predermined locations in a database. I have created a mapview wich is working just fine, I also have a MyLocationOverlay to show my position and I have a ItemzedOverlay to show the locations to which I want to navigate. This is no problem. the problem is the creation...

Distinguish between screen timeout and power-button-press?

Hi, my app does something when the screen goes black, but I want it to only carry out that task if the screen was turned off "by itself", through a screen timeout - NOT when the user presses the power-button. Is there any way to distinguish between these two events? ACTION_SCREEN_OFF obviously fires in both cases, and I haven't found a...

Reference to Window in Android

How do you get a reference to the window from outside of an Activity or from the context? Is it possible to access the window without having a reference to an activity? ...

Getting really weird long Contact Group names

When looking at the Contact Groups on Google Contacts or in the People application of my HTC Legend phone, I get the groups names ok eg: Friends, Family, VIP, Favorite etc... But in my application I get really wrong names such as "Family" became "System Group: Family" "Friends" became "System Group: Friends" "Favorite" became "Favorite_...

Not sure how to link json 100% in php

Im trying to create an rss feed that my droid app reads but i have some holes that i can figure how to fix the json link page is http://www.mandarich.com/mandarichServer/mlb/indexbaseball.php when reading the json i can see where the icon is missing on some and cant figure out why. mainly only for citys like ney york and chicago(cities w...

Test if Multiple EditTexts are empty

Say I have multiple EditTexts in an application. When I click a Button, I want to test what EditTexts are empty and what EditTexts have content. I also want the id of the EditText whose content is NOT empty. How would I do that? Could someone write the code for the Button click handler. My six EditText's ids are FirstString, SecondString...

Android: API Level on device

How can I find out which API Level my device is using? I checked the firmware version of it. It's 1.6. Does that mean it uses API Level 4? ...

Pressed Listener for a View

Hi, In android, is there such a thing for listening if a View is pressed? In background drawable, i can set assert depends on the view is pressed or not. Is it possible for me to add a Listener for a View when I pressed it? Thank you. ...

Android : Hello, Views > Google Map View Tuorial

Hi, I'm trying to complete the Android MapView tutorial @ www.developer.android.com/resources/tutorials/views/hello-mapview.html I think I've done the entire thing correctly but I'm getting an error message in Eclipse. I'm sure why. The problematic line of code is private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>(...

Updating Activity UI from Different Activity Method?

I have a tab widget where one of the tabs is a chat-type feature. I want to update the chat data at an interval (variable depending on whether the chat tab is active or not). The best approach seemed to be using an AsyncTask in my main TabActivity class, as that would avoid any issues of the chat activity being destroyed while in the ba...

Callback from another thread causes an exception

I'm trying to create a simple multiplayer game. There's a WorkerService which is supposed to handle all network communication and all interaction between this service and my Activities is done with AIDL. I think this is a standard approach - to enable two way interaction I use also an IWorkerCallback interface (also AIDL). The problem i...

[Android] Putting Serializable Classes into SQL?

Here's the situation. I have a bunch of objects that implement Serializable that I want to store in a SQL database. I have two questions Is there a way to serialize the object directly into the database Is that the best way to do it or should I Write the object out to a formatting String and put it in the database that way and then...

Eliminate PhoneWindow$DecorView from embedded intents in an ActivityGroup (TabHost)

I'm trying to simplify my views and get rid of some of the nested layouts, and I noticed while looking at the hierarchyviewer that embedded Activities in a TabHost have a PhoneWindow$DecorView. Is there a way I can get rid of this? An example is here: http://www.vimtips.org/media/hv.png ...

Compass accuracy dilemma

I need to build compass for my application. From reading the documentation it seems there are two reasonable ways of doing this: Sensor.TYPE_ORIENTATION method: This is the easy way of doing it. The problem with this is it is not accurate. When I compare my reading with Snaptic Compass it is about 10-15 degress off which for my purpo...