android

How to get the line number an xml element is on via the Java w3c dom api

Is there a way to lookup the line number that a given element is at in an xml file via the w3c dom api? My use case for this is that we have 30,000+ maps in kml/xml format. I wrote a unit test that iterates over each file found on the hard drive (about 17GB worth) and tests that it is parseable by our application. When it fails I thro...

AutocompleteTextView: on "NEXT" highlight next TextView, on "DONE", make keyboard disappear

hi all, I have two AutocompleTextViews and I want to switch to the next if the user presses "NEXT", and make the virtual keyboard disappear when he hits "DONE" at the second AutocompleTextView. So far, the buttons "NEXT"/"DONE" do nothing at all.... Unfortunately I found no resources addressing this problem. Any suggestions? thx ...

Project setup for creating third party libraries for Android

Hi all, I am creating a library for Android that others can include in their own project. So far I have been working on it as a normal Java project with JDK 1.6 setup as system library. This works just fine in Eclipse when I add the android.jar. The issue comes when I try to my build script. I am running Gradle and doing a normal compi...

Embedded computer vision platforms

Hi folks, I am planning to start a computer vision based project on a smart phone platform. I know iPhone ( http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en ) and Andriod ( http://github.com/billmccord/OpenCV-Android ) have openCV support. I am interested in knowing how was your experience with the level of integration, sup...

MediaPlayer PVMFFailure

Playing mp3s with the MediaPlayer object, I occasionally get the error "Command PLAYER_INIT completed with an error or info PVMFFailure." Curiously the MediaPlayer documentation doesn't reference this error at all. Anyone familiar with this error and could shed some light on its cause? ...

Get preferences in AppWidget Provider

Hi all, I seem to be having trouble reading preferences from my AppWidgetProvider class. My code works in an Activity, but it does not in an AppWidgetProvider. Here is the code I am using to read back a boolean: SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0); boolean autoreplyon = settings.getBoolean("autoreplyon", fa...

When would the layout animation happen in an android application?

I have set a fade animation in my list view, but it only worked in the very first time, when I try to hide it and show it in the next time, the animation does not work, I want it show again. What should I do? ...

Alert Dialog with custom layout failing

So this is related to a question I asked earlier. I am trying to display an alert using a specified layout. My layout is: And the code to call and show the alert dialog is: Context mContext = getApplicationContext(); AlertDialog.Builder builder = new AlertDialog.Builder(mContext); // use a custom View defined in xm...

How to display the data of DOM parsed attributes in the listView display ?

Hi, I am building a test output for DOM parser with node "Rider" and within that 7 attributes are there.URL://http://ps700.pranasystems.com/tours/8/xml/results/stage1results.xml. I want to display only the "name" and the "team" attributes output in the listview mode of the device.I am not getting clear where to store the output to disp...

Clickable widgets in android

The developer documentation has seemed to have failed me here. I can create a static widget without thinking, I can even create a widget like the analogue clock widget that will update itself, however, I can not for the life of me figure out how to create a widget that reacts to when a user clicks on it. Here is the best code sample th...

Force Android widget to update

Hi all, I respond to a button press on my appwidget in the onreceive method. When the button I pressed, I want to force the widget to call the onupdate method. How do I accomplish this? Thanks in advance! ...

How to control screen birghtness with slider in android

I want users to be able to control the birghtness with a slider. Please answer in the simplest way because im a noob when it comes to android. ...

Row image changes in listview in android?

Hi, I am developing an android application where I need to manipulate the background image of the rows in listview on certain conditions. Initially when the listview is loaded all works properly. But when I scroll down to the listview and come up again the background image changes. Can someone tell me the reason why its happening so? H...

How to change background color in android app

I want to be able to change the background color to white in my android app in the simplest way possible. ...

find out the current location

Hi , I want to dispaly the current location in my application not in map. I want the current palce using current lattitude and longitude . For Ex some 'x' person i want to know his location.but i want to know his location using his current lattitude and longitude. When i use the below code it`Context context; ...

After I add a spesific sound file to res/raw I get error (java - android), Why is that?

After I add the sound file "do.mp3" to res/raw I get this error: res\raw\do.mp3:0: error: invalid symbol: 'do' And their isn't reference to it in the R class. How do I fix it? ...

in clicking edittext box then dont open mobile keyboard this senario how can implemented

i am implementing one application some fields are edittext in edittext clicking open mobile keyboard how can implemented this keyboard do not open ...

-Unzip failed...Access is denied- error while adding Android SDK components to Eclipse

Eclipse (3.5) -->Window-->Android SDK and AVD Manager--><> When Adding SDK Components, there is the following error message: Downloading Documentation for Android SDK, API 7, revision 1 Installing Documentation for Android SDK, API 7, revision 1 Unzip failed: C:\Program Files\Android_SDK\temp\DocPackage.new01\navtree_data.js (Access is ...

Android: Streaming audio over TCP Sockets

Hi, For my app, I need to record audio from MIC on an Android phone, and send it over TCP to the other android phone, where it needs to be played. I am using AudioRecord and AudioTrack class. This works great with a file - write audio to the file using DataOutputStream, and read from it using DataInputStream. However, if I obtain the ...

Android : SQL Lite insertion or create table issue

Team, can anyone please help me to understand what could be the problem in the below snippet of code? It fails after insertion 2 and insertion 3 debug statements I have the contentValues in the Array list, I am iterating the arraylist and inserting the content values in to the database. Log.d("database","before insertion 1 "); lite...