android

Starting to make progress Was [MediaRecorder prepare() causes segfault]

Folks, I have a situation where my MediaRecorder instance causes a segfault. I'm working with a HTC Hero, Android 1.5+APIs. I've tried all variations, including 3gpp and H.263 and reducing the video resolution to 320x240. What am I missing? The state machine causes 4 MediaPlayer beeps and then turns on the video camera. Here's the perti...

Android -- Can't play any videos (mp4/mov/3gp/etc.)?

Hello all, I'm having great difficulty getting my Android application to play videos from the SD card. It doesn't matter what size, bitrate, video format, or any other setting I can think of, neither the emulator nor my G1 will play anything I try to encode. I've also tried a number of videos from the web (various video formats, bitrate...

getting all albums --> getAdaptedEntry() returns null

Hi all, i am using gdata picasa APIs to develop picasa application for android mobile . i am using the following piece of code , public List getAlbums(String username) throws IOException, ServiceException { String albumUrl = API_PREFIX + username; UserFeed userFeed = getFeed(albumUrl, UserFeed.class); List<GphotoEntry> entrie...

Uploading images to a PHP server from Android

I need to upload an image to a remote PHP server which expects the following parameters in HTTPPOST: *$_POST['title']* *$_POST['caption']* *$_FILES['fileatt']* Most of the internet searches suggested either : Download the following classes and trying MultiPartEntity to send the request: apache-mime4j-0.5.jar httpclient-4.0-beta2....

Aligning components at desired positions

Hi, Seeking help to design a layout as shown here: http://docs.google.com/Doc?docid=0AQhgDtGvE2HgZGZ6cmtua185MTd0eGdyZmc&amp;hl=en The major challenge I face is aligning the components at desired positions. Please refer the three buttons(icons) and the way they are positioned. Literally, going nuts, thinking how to position those exac...

Adding marker to the retrieved location

I have displayed the map in my app by using the following code. I have retrieved info from the database and displayed the map. Now i want to add marker to the retrieved location... googleMao.java public class googleMap extends MapActivity{ private MapView mapView; private MapController mc; GeoPoint p; long s; ...

POJO's versus Cursors in Android

I usually tend to define the model layer of my apps using POJO's, such as Article, Comment, etc. I was about to implement an AlphabetIndexer in the adapter of one of my ListViews. Right now this adapter accepts a Collection of Articles, which I normally get from my wrapper around an SQLiteDatabase. The signature of the AlphabetIndexer ...

Android: Is it better to start and stop a service each time it is needed or to let a service run and bind to and unbind form it?

I'm developing an app that checks several conditions during an incoming phone call. The main parts of the app are a BroadcastReceiver listening for Intents related to the phone's status and a local Service checking the conditions. At the moment the service is started each time an incoming call is detected and is stopped when the phone s...

Foreign key constraints in Android using SQLite? on Delete cascade.

I have two tables: tracks and waypoints, a track can have many waypoints, but a waypoint is assigned to only 1 track. In the way points table I have a column called "trackidfk" which inserts the track_ID once a track is made, however I have not setup Foreign Key constraints on this column. When I delete a track I want to delete the as...

How do I create a Thread Manager for an Android App ?

Hi, I would like to know how to start and code a thread manager for my Android App. My app is going to fill a list with a network I/O and I have to manage threads for that. I never done this before and I don't know where to start. I heard about Thread Pool and other stuff, but I'm quite confused. Could someone please help me make my way...

Button draws normal state after pressing

Hi! I'm new to Android and just starting the very basics. I implement my custom button skin using .9.png images for norma/focus/pressed states. It works fine, but I noticed that after a pressed the focussed button it visually "lost" focus and draws the normal state frame. I planned to use different state images to highloght what button i...

Is there a way to change the map data for the Android Google Map API?

I need to use a different datasource inside a map in Android than the google provided data. Is there a way to change the datasource to a tile based service (openstreetmap.org for example)? Or are there other Android map APIs which are OpenSource and can be adapted (except Ericcson Mobile Maps - this doesn't work for me because of the li...

Appcelerator Titanium: Android SDK doesn't load

Hello! I started developing with Titanium and now I really stuck on one part. I downloaded the Adroid SDK and added the path to Titanium: /Users/michael/Downloads/android-sdk-mac_86/ I can open e.g. Kitchen Sink in the iPhone Simulator without problems, but when I want to open it in Android then my screen looks like this: Screenshot ...

Loading only part of a bitmap file in Android

Hi all, I would like to load a cropped version of a bitmap image into a Bitmap object, without loading the original bitmap as well. Is this at all possible without writing custom loading routines to handle the raw data? Thanks, Sandor ...

I can not get the text from a selected item in a listview...pleeeeasss help.

I always get an ClassCastException error... i do not what else to do... - I'm using a data biding concept to populated the listview from a sqlite3 database. - I just want to get the selected item text after a long press click. This is the code of the activity: public class ItemConsultaGastos extends ListActivity { private DataHelper...

heading , roll , pitch

Hi, I 'd like to know how to obtain to heading , pitch , roll angles that determine the position of an android device, if that is possible . Don't consider the device dependent details . References to helpful documentation are also valuable .Thanks ! ...

byte[] operations in Java

Let's say I have array of bytes: byte[] arr = new byte[] { 0, 1, 2, 3, 4 }; Does platform has functions that I can use to play with this array - for example, how to invert it (get 4,3,2,1,0)? Or, how to invert part of it (2,1,0,3,4)? Get part of array (0,1,2,3)? I know I can manually write functions but I am curious if I'm missing u...

Call a non static methode in a static SQLiteDatabase class

i want to display a msg to the user (msg box or Toast) when exception happend in a static SQLite Database class that i use. the problem is that i cant call a non static method in a static class , how can i handle this. this is the class private static SQLiteDatabase getDatabase(Context aContext) { and i want to add something like ...

How do i make multiple url links show in array?

Im new to droid programming and i got a simple retrieve image from url working but confused on how to make it so i can load multiple images from my webpages url. Someone informed me change the drawable to string but not sure 100% how to do so here is most of my code so far: public class Gallery extends Activity { /** Called when the act...

Can you add subfolder to layout in Eclipse Android project?

When I create a subfolder in the layout folder, and drag an xml file to it, the generated R file doesn't seem to show the subfolder. a) is there a way to change that b) is the file and file structure still picked up by SVN and c) so, if I do it that way, can I still just refer to the object using layout? ...