android

screen goes off while recording and preview gets corrupted

How do you prevent the screen from going off when recording is in process. If recording is in process, and there's no other activity like using arrow keys, or the keypad, the screen goes off and when it's brought back to life, the preview is corrupted. ...

Android ListView center selection

Hi there, I have a ListView that shows the closest word matches to a search. For example if I search "hi" I get the following results in the ListView ... hi hi five hi-five high highlight .... I am using ListView.setSelection(wordList.indexOf(searchWord)); ListView.setSelected(true); The above code puts the selected word "hi" at...

Extract address/contact details from a text block with name and address?

I have a block of text that includes name, maybe company name, and address, and maybe email address. I want to extract the street address out of that, and preferably name and address. This data is siphoned from multiple sources, so I have no idea about the actual formatting. It could be something like this Company name, [email protected]...

startActivity crashes when trying to respond to menu click.

I know this has been covered elsewhere, but I'm new to the Android platform and am having a hard time figuring out how to add basic menu options to my first app. I have an options menu setup using @Override public boolean onCreateOptionsMenu(Menu menu){ MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.menu, menu);...

Set TextView text from html-formatted string resource in XML

I have some fixed strings inside my strings.xml, something like: <resources> <string name="somestring"> <B>Title</B><BR/> Content </string> </resources> and in my layout I've got a TextView which I'd like to fill with the html-formatted string. <TextView android:id="@+id/formattedtext" android:layout_width="fi...

Android - writing apps for not-yet-released devices

I am looking to write an Android app for a device that has not been released to the market yet, and so I will not have the hardware to test upon. I have created an AVD (Android Virtual Device) with as much information as is currently available on the web, so assume that this is as like the device as is possible to get. However, does an...

what's design pattern principle in the Android development?

I was a JaveEE developer. Recently I joined an Android development team. The structure of Android confused me. The MVC design pattern seems not suit for Android development. So what's is the design pattern principle for Android development? I means is there any hint about how to write a clean, easy reading and effective Android code. ...

KeyboardView.OnKeyboardActionListener

How can I disable swipeLeft()/swipeRight() methods, because it intercepts onRelease() method then I quickly moves the finger? ...

mobile programming

Im trying to find an idea for my third year project related to mobile programming with Android or J2ME. anybody has any new idea of mobile application? or at least something that is worth to work on it for the third year project? ...

How to draw horizontal line in ListView?

Is there any better way to draw a black horizontal line than defining layout with fixed height and black background? ...

Serial port programming on Android-Beagleboard

I am porting a linux application onto android, which runs on beagle board. My application has to access serial port(send/recv). Is it possible to read/write serialport using an application, unless the android is 'root'ed? ...

Android: ListView using two cursoradapters?

I have some code which executes two queries against a database and returns two cursor objects. Is there any way that I can combine these two cursors so that all the ListView gets the data from both? ...

Sound works on HTC Desire but not on T-Mobile G1

I defined the following Sound Class to play Sound in my Pacman Game: public class Sound { private static boolean sound = true; private static MediaPlayer eatSound; private static MediaPlayer shortEatSound; private static MediaPlayer eatCherry; private static MediaPlayer eatGhost; private static MediaPlayer extr...

what is easiest way to save mms in pc?

dear friends, i want to save received mms in my pc through data cable or bluetooth automatically. any one guide me which phone supports functionality like this or is there any specific software available to achieve this? any help would be appreciated. ...

Use sdk problem

How to set targetsdkversion for 1.5. I developing projects based on eclipse id when I try to set targetSdkVersion in manifest it showing error. ...

Long Touch on a surfaceView ( android )

Hi! I'm making a game on Android and I need to do certain actions when the users attempts a long press on the screen. Unfortunately I haven't found any methods that works directly with a custom SurfaceView, feel free to tell me if such a method exists :) So I decided to try and implement a long touch detection from the onTouch event li...

IllegalArgumentException: column '_id' does not exist when call to SimpleCursorAdaptor

I have a table namemaster having columns id, name, surname, gender, designation When i fire query to get cursor for Cursoradapter i get IllegalArgumentException: column '_id' does not exist when call to CursorAdaptor But there is no column with _id. Can anybody tell me why i ma getting this error.. Here stack trace 07-13 15:45:40....

android - controlling state of RadioButton

i am gettin 1 problem in d android application that i have made. -> i have a 3 RadioButton's on 1 activity screen -> after a Button is pressed(on same activity) the text associated with all of them should change and all RadioButton's must be unchecked and should be clickable the text is changing properly and the RadioButton's are beco...

Determining if app is running in background

How can I tell that my application has been put in the background (i.e. none of my app's activities are visible anymore)? I need to determine this so that I can release resources shared among several of my activities (graphics, sound clips and a socket connection). I've thought about keeping a global counter that's incremented in the ac...

Activity lifecycle related issue

I'm using a CountDownTimer's onTick(long l) function to check some conditions and if they are satisfied then I call an activity's function to perform some UI related tasks. However I'm wondering if it is possible that while the activity is destroyed and recreated due to an orientation change, the onTick() to be run, and possible to call ...