android

AutoCompleteTextView not displaying result even when the ArrayAdapter is updated

I'm trying to get an AutoCompleteTextView(ACTV) to display results I'm a getting from a network resource. I have set the completion-treshold to 2 and I can see that the request is fired when I enter to characters. The result I am getting is the correct one. Lets say I write "ca", and I get the result "car" as an autocompletion. I have a...

adding the style attribute via code

hello I was wondering how to assign a style via code in adroid. suppose I have a TextView created with the following snippet: TextView myText = new TextView(this); how do I assign the class xxx so that myText will be styled like an hard coded TextView like this: <TextView style="@style/xxx" /> thanks ...

Using GData and the Google Analytics on Android

I am wondering what my options are for using GData and specifically the analytics api on android to build a small widget. After searching around for a while I couldnt come up with any libraries with decent examples. Are there any dedicated libraries with some decent examples / doco to do this sort of thing? I would like to target 1.5 bu...

How to set the left background of an TextView

Hi, I have a text view. I would like to add a 'vertical line' on the left side of the TextView to act as a separator. Is there a way to do that? Thank you. ...

How to override filter in android's ArrayAdapter?

I have an ArrayAdapter wrapped around an ArrayList of custom objects. I'd like to write a custom filter for that adapter so that when I call getListAdapter().getFilter().filter("abc") the list will get filtered by an arbitrary transformation of "abc". I thought I would just try to override ArrayAdapter.getFilter(), but that requires I ...

Android Speed based on accelerometer values

Hi. I need to obtain the velocity of an android device, based on the accelerometer values. I made a code that allows me to get the accelerometer values, and then I calculate the velocity, using the formula: v = v0 + at. (vector calculation) My problem is that my velocity only increases and never decreases. I think the problem is that t...

Spinner cannot load an integer array?

I have an application, which has a Spinner that I want populated with some numbers (4,8,12,16). I created an integer-array object in strings.xml with the items mentioned above, set the entries of the Spinner to the integer-array, and when I run the app I get: 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): java.lang.NullPointerExcept...

How to ensure/determine that a post is coming from an specific application running on an iPhone/iTouch?

Building an iPhone OS application that will allow users to anonymously post information to a web application (in my particular case it will be a Rails based site) ... and I want to ensure that I only accept posts that originate from a specific application running on an iPhone/iTouch. How is this best accomplished? (btw, if your answer ...

Can I develop for Android in something other than Java?

Besides making an HTML5 app (which may very well be the answer to this question), are there any other languages I can develop in for android besides Java? ...

Storing a secret key on Android

My Android application uses a secret key to generate a token for authentication purposes. Is there a more secure way to store this than just putting this in the data store? I think for the iPhone, we store it in the keychain. I am aware of android.accounts.AccountManager, but this seems to give other applications potentially the ability ...

In a Android GridView, how can I assign a background image to a row, instead of a singular cell?

Is that possible via straight XML, or do I have to subclass the GridView class? If the latter, where do I start? ...

sleep/wait in android apps

Hi, I had an activity which calls a thread for 10times one after another. However, if the network is slow or too much information loaded, force close will occur. Will adding sleep in each thread help to solve this problem? or is there any other ways to solve it? public void run() { if(thread_op.equalsIgnoreCase("xml")){ ...

Can I develop Android on Mac?

I want to develop applications on Android. Can the SDK be installed on Mac? ...

android: How to set a listener that fires when my ViewFlipper shows a new child

Hi Android gurus, I have a ViewFlipper for which I want a listener to fire when the child displayed is changed. I have set an OnFocusChangeListener to the ViewFlipper but it never fires when I flip from child 0 to child 1 or vice-versa. The ViewFlipper contains two RelativeLayouts and I have tried setting OnFocusChangeListeners for th...

Can I use Data URLs in Android 2.1's Webkit-based browser?

Hi all, I am writing a tutorial about the HTML5 Canvas for mobile and did some basic tests. While I can call the getDataURL() Method on an iPhone's HTML5 Canvas Element, it does not seem to return the data URL on Android 2.1 (Google Nexus One) and it's webkit-based default browser. Here is the sample: var dataURL = canvas.toDataURL();...

RTP Client Application on Android Mobile Device

Hey folks,i am developing a RTP client on an Android device which can play streaming videos from a server. I am confused regarding how should i start about? i am thinking of developing a web app, using HTML,CSS and Javascript, which can later be wrapped in Android.is this approach correct? does javascript support real time media player?...

problem in displaying list using array adapters

Hi, I am trying to display the list of songs using array adapters. But the problem is i couldnt display the list and only empty screen with preset background is showing up. Here's the code...All the thee are seperate classes... Plz help me... public class SongsAdapter extends ArrayAdapter<SongsList>{ private Context context; TextView tv...

CheckBox and the ContextMenu

I have a ListView with a ContextMenu, it has one CheckBox (the CheckBox has android:focusable="false") and one TextView per row, but you can hide the TextView in the preferences menu. After doing that, the CheckBox wasn't registering the ContextMenu, so of course, why not registerForContextMenu(cb) and unregisterForContextMenu(getListV...

contacts interception

Dear, is there any posibilty to intercept the contact. if user add,delete and update any contact system notify that changes occur in the contact. thanks ...

How to enable a preference in my android application when other preference is disabled ?

Hi, I have used PreferenceActivity to have preference in my android application. I want one preference say "pref 2" to be enabled when other preference say "pref 1" is NOT checked and "pref 2" to be disabled when "pref 1" is checked. i.e. exactly opposite of the android:dependancy attribute. How can I do that? ...