android

How to write Android.mk for library using Gnu makefile

I want to make an Android application using huge third party native libraries which use the Gnu build tools (gnu makefile). My question is how to write the "Android.mk" files for these libraries in order to build them using the Android build system or the Android NDK. Thanks in advance ...

AudioRecord doesn't work for Motorola Milestone

I'm having this problem only on Motorola Milestone. Code: // init recorder recordInstance = new AudioRecord(MediaRecorder.AudioSource.MIC, 8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, 8000); recordInstance.startRecording(); //more code here recordInstance.stop(); The errorinformation I have ...

Android Email Application:

By looking at the link http://stackoverflow.com/questions/2001254/downloading-sent-mails-from-yahoo-gmail-and-hotmail is it possible to invoke or call Gmail and open a message programmatically ...

Android ignoring my setWidth() and setHeight()

So, why does this code: package org.popoffka.apicross; import android.app.Activity; import android.os.Bundle; import android.widget.Button; public class Game extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Button testButton = new Button(this); testB...

Uniquely Identify ImageButtons placed Programmatically

Hi, I have been placing several ImageButtons programmatically in a TableLayout, every ImageButton has it's own Drawable resource as a Background. I use an XML description for the layout of the ImageButton itself and afterwards use the LayoutInflater to retrieve such an ImageButton (called genre_cell.xml): <?xml version="1.0" encoding="u...

Android. update ExpandableListView

Hi everyone! I have the following problem: I would like to change value of ExpandableListView's cell on click. How should I do that? Here is what I'm using: public class TemplateActivity extends ExpandableListActivity { private SimpleExpandableListAdapter expListAdapter = null; protected void onCreate(Bundle savedInsta...

Sockets, Threads and Services in android, how to make them work together ?

Hi all, I am facing a probleme with threads and sockets I cant figure it out, if someone can help me please i would really appreciate. There are the facts : I have a service class NetworkService, inside this class I have a Socket attribute. I would like it be at the state of connected for the whole lifecycle of the service. To conne...

IntentFilter for address book

Hi folks! I have a question regarding the creation of an IntentFilter. I'm currently writing JUnit-tests for an Android application and want to make use of ActivityMonitors. To be more specific: I want to create an ActivityMonitor which listens for calls to the address book as our Application requests the user to choose a contact from ...

Is it possible to read data that has been separately copied to the Android sd card without having root permissions?

Edit: This was user error (sorry). I have answered it below. I am developing an application that needs to access data on the sd card. When I run on my development device (an odroid with Android 2.1) I have root access and can construct the path using: File sdcard = Environment.getExternalStorageDirectory(); String path = sdcard.getAbso...

Android - How to programmatically answer a call

I know this has been asked before, but at this time the answer of the post is not true. http://stackoverflow.com/questions/2610587/how-to-programmatically-answer-a-call Vringo and other apps does answer the phone by pressing a button on their app, so there must be a way to do it. Anyone has a suggestion? ...

android widget stop working

I have an app with a widget that loads an activity to perform an action. It works great almost always, but every so often it will be unresponsive and I will have to start the app again to get it to start working again. Does anyone have an idea as to why this is happening? ...

Android ImageView draw

Hi, i have the following problem. I am working with a library of maps which paints the icons on the map using drawables and canvas. Now, i'm trying to modify it in order to the user can click on icons. So i want to attach drawables into different ImageView with a onClickListener. However, i don't know how i can paint the ImageView ...

java.lang.NoClassDefFoundError thrown with my own packages in Android 1.5

Hi, I have developed an application which has several packages within it's project... A class in one of those packages is called right away in the first line of code, which throws the dreaded java.lang.NoClassDefFoundError error... I don't get it, the package simply is within the project, and it works fine on my Android 1.6 device, but w...

Low delay audio on Android via NDK

It seems that this question has been asked before, I just would like to know whether there is an update in Android. I plan to write an audio application involving low delay audio I/O (appr. < 10 ms). It seems not to be possible based on the methods proposed by the SDK, hence is there - in the meantime - a way to achieve this goal using ...

Android: Download the Android SDK components for offline install

Is it possible to download the Android SDK components for offline install without using the SDK Manager? The problem is I am behind a firewall which I have no control over and both sites download URLs seem to be blocked (throws a connection refused exception) https://dl-ssl.google.com/android/repository/repository.xml http://dl-ssl.goo...

Cursor returns zero rows from query to table

I've created an SQLiteDatabase in my app and populated it with some data. I can connect to my AVD with a terminal and when I issue select * from articles; I get a list of all the rows in my table and everything looks fine. However, in my code when I query my table, I get a cursor back that has my tables columns, but zero rows of data. ...

Default value of Android preference

How do you get the default value of an Android preference defined in XML? Context: I don't want to repeat the definition of the default value in both the code and the preferences XML. ...

Android Rotate Matrix

Hello, I have matrix. This matrix represents array x and y coordinates. For example float[] src = {7,1,7,2,7,3,7,4}; I need to rotate this coordinates to 90 degrees. I use android.graphics.Matrix like this: float[] src = {7,1,7,2,7,3,7,4}; float[] dist = new float[8]; Matrix matrix = new Matrix(); matrix.preRotate(9...

Is there a better way to publish to stream (Facebook) from an Android app?

The "unofficial" FB library is not working very well, so looking for alternatives. In case there aren't what is the most straight forward way to use the library for this purpose solely? ...

Best practices retrieving XML/stream from HTTP in Android

Hello everyone, what are the best practices parsing XML from an HTTP resource in Android? I've been using HttpURLConnection to retrieve an InputStream, wrapping it with a BufferedInputStream, and then using SAX to parse the buffered stream. For the most part it works, though I do receive error reports of SocketTimeoutException: The opera...