android

how to restrict capital letter typing in android programmatically?

I want to restrict capital letter typing through keyboard on my form. any one guide me how to achieve this? ...

Error with Android Video Preview

i had this working last night, and have changed the xml layout a bit, which has caused the preview just to freeze when app starts. Only major thing thats changed is ive changed it from LinearLayout to a Relative one the logcat is huge, this is a snippet from when i think the app starts E/SecCamera( 2191): initCamera: m_cam_fd(35), m_j...

How to keep track of activities in activity stack

I need to keep track of currently existed Activities in Activity stack. Can any one help me in that how to do it programmatically? ...

Reason for Window already focused during list click event.

Friend's, I have a list view,by clicking any list row i have to move webview with progressbar to show it's progress,here my problem is after clicking list view it gives below exception in my Log cat, WARN/InputManagerService(73): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Pr...

How to get width of the Button in android

I want to show EditText and Button in one line. But the size of the button is the fixed to some pixels. I wanted to get the width of Button programatically so that i can adjust width of EditText on changing the orientation to vertical or horizontal my XML file is as follows <LinearLayout android:id="@+id/middleLayout" android:...

How works android ImageView android:scaleType="fitXY" property?

I need to know how he takes drawable object. I'm collecting some ImageView objects in array, they have background images that are rather big in resolution so they take lot of memory... I have read somewhere that it will automatically create image with resolution that my imageView have, so i think it will take less memory than first one....

Accessing the phonebook on Galaxy S crashes the app

Does anyone know how to access the contacts from the Galaxy S? I have this line of code: Intent intent = new Intent(Intent.ACTION_VIEW, Contacts.CONTENT_URI); startActivity(intent); and it works on the emulator as well as on the Samsung i5700. I tried running my app on Samsung i9000 (Galaxy S) but it crashes. I am getting the follo...

How to set images at the ends of Gallery view(right and left).

friend's, i need help on placing images(back and forward images) at two end of my gallery view ,i have gallery to list menus to scroll horizontally,and this gallery is in RelativeLayout how can i get the images at two ends of gallery without scrolling. Thanks in advance. ...

What quirks should I look out for when developing for the Samsung Galaxy S?

I recently released a game on the Android market. It seems to be working fine for most people, but everyone using a Samsung Galaxy S is reporting the same problem: The graphics for the game are not being drawn on screen (though they appear to be present, sound effects are still generated). The game uses a SurfaceView to draw the various ...

Custom list cursor adaptor crashes at bindView on emulator -- not on phone

Hi all I will try to be specific if I can - please be patient, first time asker and relatively new to programming on this platform. Apologies if this has been asked/answered before - please link it to me. I have searched up and down but find other unrelated (to me at least) problems. The real puzzler for me is that my app is crashing on...

Android: light weight solution to detect keypress.

Dear All, In Android I am writing an application in which, I would like to capture an event if in case user doesn't do any activity (tapping/key press). For better context - It is like session timeout. Basic solution - I can override the key press/tapping event and put one timer which continuously run either as thread or service. ...

Reading contacts from phone book in Android

Hi I 'm trying to read and display contacts from phone book in android. My Device is synced up with gmail and funambol which togehter have more than 600 records. Now by default my application reads gmail contacts. On selecting any contact from the displayed list, it throws an exception as the list is displaying a gmail contact which jus...

Connecting to paired bluetooth device (BluetoothSocket) in android 2.1

Hi, I am trying to connect to a paired bluetooth device (baracoda d-fly bar code reader). I tried the program GetBlueDemo from market and this manages to read from its socket. I wrote my own proof of concept, but i just keep getting an excpetion when i try to connect to the device. 08-23 14:39:28.635: DEBUG/BluetoothTest(19238): Coul...

getting the full path of R.raw folder.

I have a binary file in the R.raw folder. Now I am able to get the file name and can read the file as well, but I need to find out the complete path of the file in string format. any help will be appreciated. ...

Cant get scroll bar in android

Hi all, I cant seem to get scroll bar with ths following layout. <TableLayout android:layout_height="wrap_content" android:stretchColumns="*" android:background="#ff0000" android:layout_margin="1dip" android:layout_width="75dip" android:layout_gravity="center"> <TableRow android:background="@color/custom_button_bggre...

get the values of the fields in a form in an android webview android

Hi I have used HTML/CSS/js to make UI for my android app. (port from iPhone app) One of the HTMLs contains a form. I need to get the values entered in that form and use them in android code. the target of the form is the page itself and the method is GET. How can i get the values entered by the user in that form? ...

How to remove � character while parsing xml file in android

Respected All, I have to read xml files from server and display data from all files. some data contains character '�' which gives me SAXException while parsing. I have tried to convert UTF-8 format. but it gives me out of application as soon as that char is found in file. I have used SAXParser to parse xml file. If you have any solutio...

Get a single accelerometer value

I'm working on adding a calibration feature to an accelerometer-driven game. For the calibration, I need a single value from the accelerometer. Should I register a listener, get the first value it gives me, and unregister it, or is there a better way to get just one value? ...

Obtain Android GPS location once every few minutes

I would like to write an app on Android to upload my GPS location to an external website once every ~5 minutes. This needs to have as minimal an impact on battery life as possible, but it also needs to work without any user interaction. (Background: I'm competing in an Ironman triathlon which will take me about 14 hours to complete, and ...

how to write data to the existing xml file using code in android

friends i am downloading some images from website using xmlrpc now i want write the url of those images into xml files how to add data to exiting xml file in android ...