android

Android Contacts Groups Management

Hello I am trying to write an android app that will supply contact data to a pc application via wifi. This is my first app and I have spent the last 4 days to find a safe way to manipulate contacts groups. To be more specific: I am using sdk version 2.1 Emulator does not have contact groups functionality but this is not trivial When I ...

Having Trouble Referencing Files in Android

I'm working in a group right now, writing an app that needs to be able to reference a file which is not written at runtime. Essentially, the file stores data which the app (a game) uses at certain points. I don't have any trouble saving files at runtime and then referencing those files, but for some reason, I'm having trouble referencin...

Formatting countdown timer with 00:00:00 not working. Displays 00:00:00 until paused then displays the time remaining

I was trying to create a countdown timer from http://helloandroidworld.com/2010/02/how-to-create-a-simple-android-countdown-timer/ but I cannot get it to work with the format I want 00:00:00 as described in the article. The timer will start and allow me to pause it and it will run for two minutes but you cannot see it running. If you pau...

Any fixes for crash because of combination of WRITE_SETTINGS and SEARCH_LONG_PRESS?

I'm trying to create an app that will change a setting when the user holds the search button. It seems that the combination of the WRITE_SETTINGS permission and the fact that the activity is launched from another application using the long press makes the parent task crash. For example, if I'm looking at Google Maps and hold the search b...

Error on running the Android application " Emulator: could not find virtual device named 'TestDevice'"

Hi, Today I have installed Android SDK. But when I am trying to run the very 'HelloWorld' program, I have encountered with an error like : "Emulator: could not find virtual device named 'TestDevice'. My workplace is F:\android. SDK Manager is in C:\Downloads\android-sdk_r07-windows\android-sdk-windows\SDK Manager.exe Eclipse is in C:\Do...

MotoDev Says I Have Errors, but it won't show me them.

This is a really stupid question I imagine, but is there a way to search for hidden errors. I'm working on a project in MotoDev's Eclipse environment, and it won't let me run suddenly stating that I need to fix errors first, but it won't show any errors in the log at all. ...

android: audiotrack to voice call

hi all, i'm trying to play a sample to voice call uplink stream... int minSize =AudioTrack.getMinBufferSize( 44100, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT ); final AudioTrack track = new AudioTrack( AudioManager.STREAM_VOICE_CALL, 44100, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_1...

Parse KSoap2 response in android

So I managed to call a webservice using KSoap2 in android but I can't find a way to parse the response... So here's what I receive from the webservice anyType{ WORCCategoriaSubcategoriaRecord=anyType{ssENCategoria=anyType{Id=1; Nome=Problema na rua; }; ssENSubcategoria=anyType{Id=1; Nome=Falta de acesso; Imagem=anyType{}; CategoriaId=1;...

Changing progress bar color using XML in Android app

I'm trying to change the color of a horizontal progress bar (foreground). I came across this example and am trying to model my XML file off it. However, I get a compiler error at the following statement: myProgressBar.setProgressDrawable(R.drawable.progress_horizontal); The error is "The method setProgressDrawable(Drawable) in the t...

Documentation on States for a View

How can I determine what states are possible for a particular view? I see that the View class defines all the possible states. Does this mean practically that all views can be in all states? For example, I am working with ListView. When I add the listSelector attribute, my StateListDrawable item "state_focused" works but "state_selec...

Arrays and ListView in Android

I have a ListView that displays every item in an array called, "Facts_Array". What I would like to do is display the count of the item clicked on. Right now I have this: lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view,int position, long id) { Toast.ma...

Need Help: Android SDK Simple Test Program

I'm trying to play around with the Android SDK and I'd like to try and run a random interactive java program on the Android. However, I'm still not sure about how to convert java's System.out.println and TextIO.getlnInt(); to Android equivalents. Here is the program I'd like to convert/run: http://math.hws.edu/javanotes/c2/s4.html The ...

NoClassDefFoundError when trying to unit test JSON parsing in Android

I'm working on an Android app where some part of it gets JSON-formatted data from a web service. The basics of the class parsing the JSON data looks like this: public class JsonCourseParser implements CourseParser { public Course parseCourse(String courseData) { Course result; try { JSONObject jsonObject = new JSONObject(cour...

How to specify multiple OR conditions in android (sqlite3)?

Hi, I want to know how to specify something like in my database adapter: Select * from _myTable WHERE _columnValue IN ('2','3','4'); Is there a way to use any of the existing query methods specified in SQLiteDatabase? I can write the query in pure sql, but wondering whether there is a better (and easier) way to accomplish what I am a...

Is match(Uri) of class UriMatcher reentrant?

The examples that I have seen of how to make a ContentProvider have all used the UriMatcher#match(Uri) method within the insert, query, update, and delete methods to easily handle all of the URI patterns that the content provider responds to (e.g.: http://developer.android.com/resources/samples/NotePad/src/com/example/android/notepad/Not...

Switch Focus without closing dialog in Android

Hi In Android is it possible to switch focus back and forth between an open dialog box and the main view without closing the dialog box. The preferred method of switching would be to click on the unfocused view so that it obtains focus. ...

How do I texture map onto a curved surface?

Hello, I'm attempting to create a 3d game using OpenGL. I have a very basic world and am now working on a character. I want to map a texture to the head which will be oval shaped. How do I do the mapping? I know how to map to flat surface. I'm wondering if the normals can be used to help but I've never done this before and when I se...

MS future .net P/InVoke Android Delphi c++ price compertition

Today C# and a modern copy of Delphi is getting very expressive for a student /hobbyist to start out on with a $2,000 price tag to get started. I remember when you could get started at a 10th of the price with Delphi. And a very large array of small programs came about in all sorts of fields. The ones that come through that hobby level a...

android java.util.TimeZone problems with daylight savings time implementation?

It appears that the java.util.TimeZone implementation in Android is broken (at least in 2.2). For instance TimeZone denver = TimeZone.getTimeZone ("America/Denver") ; TimeZone phoenix = TimeZone.getTimeZone ("America/Phoenix") ; Running under the emulate in Eclipse, denver.hasSameRules (phoenix) returns true, and it should return fals...

Android USB I/O

OK, so i have seen all the stuff about how acting as a USB host is impossible on vanilla android, but is there anything in the Android API that would allow an app to override the default USB behavior in order to manually control the USB i/o responses, in order to support some other protocol? I have not seen anything that would facilitat...