android

Problem creating AVD

I have installed Android SDK on my MAC OS X 10.6 and facing lots of problem while creating AVD. When I tried to create it for ECLIPSE (3.5 Gallelio) then after clicking the 'new' button, when I try to type a name there comes a message bellow saying 'a target must be selected in order to create an AVD'. But the problem is, the Target f...

Google maps doesn't work on the HTC ?

Hi guys, I am developing application with Google Map. I've tested on the emulator and saw error line In the log: 01-23 16:04:28.453: ERROR/MapActivity(733): Couldn't get connection factory client But it worked fine on the emulator. Then I've signed the application and created its .apk file. I've put it on the web server downloaded...

Android Run application from last Activity

Hello, I have an application with several Activities. My A Activity has the Manifest Intent filter parameters: action.MAIN and category.LAUNCHER. after its being loaded I call Activity B and finish() A since I don't use it anymore. After I run my application, go from Activity A to B and press the Home button, when I relaunch it from th...

GPS on iPhone and Android...is there any way to get the EXACT location of the phone (not approximate)?

I know that it's mostly "approximate". But, I must know the EXACT location of the phone, regardless of battery life or whatever. I need the exact location of the phone! Is it possible? ...

Android ListView Refresh Single Row

After I have gotten the data for a single row of a ListView, I want to update that single row. ATM. I am using notifyDataSetChanged(); but that makes the View react very slow, are there any other solutions? ...

Android: How to do create custom EditText with a clickable arrow on the right

I would like to have an EditText with one modification: on the right (still inside the EditText) there is an arrow pointing downwards, that I can set OnClickListener to. So when user clicks on the arrow it displays a menu. What is the best way to do this? ...

FileDescriptor's actual system file descriptor (as int) in Android

Is there a way to get system file descriptor (socket or file number as int) from Android's FileDescriptor object? I'd like to access file descriptor directly in JNI code without using any Java wrappers. Edit: I've found getParcelFileDescriptorFD and that FileDescriptor has int field named "descriptor", example usage in media/jni/android...

ContentResolver - hot to get get random access / seekable representation of resource which maps to file

How do I access ContentResolver content as a file? There's simple way to open underlying file-based content as an InputStream, but it's not possible to seek on InputStream. There's RandomAccessFile, but either File or file name is needed to create instances. Content I'm trying to read is mapped to file (email attachment). ...

Will C/C++ libraries work on Android Phone

Hi, Does anyone have any experience using JNI to call native C/C++ libraries in Android? Is the environment suitable for running C/C++ libraries and if so is there anything specific about the environment which you need to accommodate? Thanks ...

Converting equations to java for android?

I am a cameraman and I want to make an app for my Moto Droid that will calculate my depth of field given four inputs. I am literally brand new to javascript and this programming stuff, so I was wondering if anyone could help me out. I have a very basic GUI set up using Droiddraw which allows me to input my 4 variables, which are: Focus...

Android SDK beginner question

I'm a n00b developer at my second attempt to use the Android SDK. I'm developing on the Mac platform and I've noticed that the latest version of the SDK doesn't include anything except the tools (so I have no plugins, no targets to choose from inside the package I downloaded). So I tried to use the Android SDK and AVD Manager to downloa...

How do I specify different layouts for portrait and landscape orientations?

I've seen references to being able to specify two separate layout xml files for an activity, one for Portrait and one for Landscape. I've not been to find any information on how to do that though. How do I specify for each activity which xml file is it's portrait layout and which is the Landscape layout? Is it also possible to speci...

Creating dynamic controls

I am trying to create a screen with some dynamic controls, well radio buttons to be precise purely for learning purposes. I have managed to add the radio button by referencing the radio group in the main.xml file. RadioGroup rg = (RadioGroup)findViewById(R.Id.types); RadioButton rb = new RadioButton(this); rb.setText("some text!"); ...

Android AsyncTask context problem

I've been working with AsyncTasks in Android and I am dealing with a strange issue. Take a simple example, an Activity with one AsyncTask. The task on the background does not do anything spectacular, it just sleeps for 8 seconds. At the end of the AsyncTask in the onPostExecute() method I am just setting a button visibility status to V...

how do you call a value entered in a UI to your java class?

Making a simple app for my android. in my xml interface there is a text box in which the user will input a number (for example: 10). the id of this text box is "input1" how do I call the value of input1 in java and then perform a calculation on it? For example... suppose input1 = x x + 5 or x*2 and for that matter, how do I have...

Retrieving and parsing iCal data over HTTP on Android

I am making an application that asks the user for userid, appends the userid to a static HTTP link to retrieve the user's daily schedule info file that has a .ical (calendar) extension. I need to read the data from file, format in new UI and representing some useful data on an Android device. My query is can I access a static HTTP link...

How do you make a multiple-choice list from the sqlite database in Android?

I'm new to Android programming, and I wanted to pull list options from a column of the SQLite database for the user to select. How would I go about doing this? Like, say the database table to be read is called countries, and the columns were ID, country, and capital. How would I let the user pick from the list of capitals and have the ap...

Best approach for oldschool 2D zelda-like game

Hello For learning purposes, I would like to code a simple 2D game inspired by Zelda series on the nes/gb. http://www.5min.com/Video/The-Legend-of-Zelda-a-Link-to-the-Past---Walkthrough-Part-3-89824010 is a nice example. The player could move on a scrollable view, and when hits defined map limits, like a house door, dungeon, or new zo...

How to draw a route between two geopoints on the Android

I have two OverlayItem's on a MapView. How can I draw a route between the two geopoints? ...

How to store data accessible to both a web site and android application?

I’m developing an Android and web application that will function as a service (use the same data). My question is how should the data be stored to allow for both the web and the android application to have access to the same set of data? Should the android application connect to the sites MySQL server to store/access data? If so how d...