android

EditText filter run slowly when filter data

My ListView have more than 3000 rows. And when I typing on EditText to filter data in my ListView it run slowly. Look at my code here final TextWatcher textChecker = new TextWatcher() { public void afterTextChanged(Editable s) {} public void beforeTextChanged(CharSequence s, int start, int count, int after) ...

Detect rotation of Android phone in the browser with javascript

I know that in Safari on an iPhone you can detect the screens orientation and change of orientation by listening for the onorientationchange event and querying window.orientation for the angle. Is this possible in the browser on Android phones? Update To be clear, I am asking whether the rotation of an android device can be detected b...

uSTL or STLPort for Android?

I'm working with the Android NDK, and since it does not currently support the STL, I was wondering if there are any brilliant people out there who have had success with this, or know which is better suited for the Android platform: uSTL or STLPort. Thanks! EDIT: Looks like another option may be CrystaX .NET. From their website: ....

Server-side AAC audio with Android

As I understand it, Android will only play AAC format audio if it's encoded as MPEG-4 or 3GPP. I'm able to play AAC audio encoded as M4A when it's local to the app, but it fails when obtaining it from a server. The following works, as the m4a file is held locally in the res/raw directory. MediaPlayer mp = MediaPlayer.create(this, R.ra...

R.java file doesn't contain ids for res/raw/<audio files> in Git code

I have placed some audio files in res/raw folder. In eclipse its creating the R.java file correctly and everything works fine. But after committing the code in Git and creating the iso image, the generated R.java file doesn't have id created for files in raw directory and it gives compilation error wherever I'm referring to those resourc...

Exposing that your app is installed to the android browser

Hi all, I am trying to find a way to detect in the android browser whether my application has been installed. Use case: I have a web page that a user can reach via their android web browser. If the application is installed it would show "Tips & tricks". If it is not installed, it would show promotional material and a link to download...

Android WebView Cookie Problem

I have a server that sends my android app a session cookie to be used for authenticated communication. I am trying to load a WebView with a URL pointing to that same server and I'm trying to pass in the session cookie for authentication. I am observing that it works intermittently but I have no idea why. I use the same session coo...

Setting up OS X for Android development. OR Are *nix environments intentionally prohibitive?

I'm trying to start doing Android development on OS X (trying is the key here). I've read all the fun stuff at http://developer.android.com/sdk/index.html. I get the basics, install the JDK, Eclipse, the Android SDK, the Eclipse plugin and ADT. That's a lot to do but I get the point of each step, so, OK, fine. Then there are a millio...

How to get a callback when a Spinner popup dialog is dismissed?

I have an Android Spinner and I'd like to get a callback when the user selects something from its popup dialog. It seems like setOnItemClickListener() or setOnItemSelectedListener() would be the right method to use, but neither get invoked when I select one of the items in the spinner. Is there a correct way to do this? UPDATE Per co...

Issue in reading data from Socket

Hi, I am facing some problem during reading data from socket If there is some null data in socket stream so the DataInputStream would not read the full data and the so at the receiving end there is exception for parsing data. What is the right way to read the data from socket so there is no loss of data at any time ? Thanks in advan...

Android Dynamically Created Button: setOnClickListener doesn't work!

onClick never fires! Why not? Please help. for(int i = 0; i < 12; i++) { String title = "Button" + i; Button sliderButton = new Button(this); sliderButton.setText(title); glideMenuTray.addView(sliderButton,100,40); sliderButton.setOnClickListener(new View.OnClickListener() { ...

Android: Application force closes when I try to implement a scrollview

I have a simple android application, but when I try to implement a scrollview in the xml of the layout the application force closes each time I try to run it on the emulator. Here is the xml: <?xml version="1.0" encoding="UTF-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical...

Does android have a numeric keypad?

Is there a way in android to invoke a numeric only keypad, i.e. a virtual keypad that contains only the numbers 0 to 9 and a "." sign? ...

Apply Custom ListView For a CursorAdapter

I am building a custom listview used to list contacts from the contact cursor into a list with two text view for the phone number and name of the contact as well as a place for the images. I am getting a nullpoint error when i try to setText for my TextView Even though i checked the variable to see if they contained a string I have no i...

Android: Market design philosophy?

I am assuming that the Android Market app source code is closed but I have a few questions regarding this: Why didn't they follow the tabbed UI design which is normally followed? (Is it only because they had more activities to display?) How would I go about designing an app like this? I first set up the gallery view and attach an onCli...

How to make an external library like the Mapping API on Google Android

Hi all, I am looking to create an external library for Android that essentially provides an Activity that others can inherit from and the base Activity takes care of all the basic visual user interface stuff. So, it would be like the Mapping APIs that Google provides. Ideally it would be included in the manifest file in a manner similar ...

Android Endless Adapter

Im using the endless adapter http://github.com/commonsguy/cwac-endless however whenever i return false (because i dont have anymore data to append) , as stated here http://github.com/commonsguy/cwac-endless/blob/master/README.markdown in appendinbackground, my activity crashes and in Logcat i get a message saying indexoutofbounds etc. ...

How do I install my android app on my HTC Magic?

Hello everyone, I am interested in developing an app for my HTC Magic (Android) phone. Using instructions on android's developer site, I installed eclipse with the right plugins, got created the AVD and wrote my first Hello World app which ran in the AVD. I would now like to install that Hello World app on my HTC Magic, but I can't seem ...

Android Defer to Camera

Is there a way, from within my own application, to open up the default camera app and use that to get a picture/video? I keep trying to look it up but I only ever find instructions on cloning the camera app myself (usually with very bad instructions). I know this can be done with the iPhone, I would be surprised if it wasn't possible wit...

Android Turn-by-Turn API?

Android 2.0 has turn-by-turn directions, however, I do not yet see an API exposed for this in the 2.0 SDK. Are there any documented plans to expose an API for calling into the new turn-by-turn features? ...