android

Why are my SoundPool sounds not playing simultaneously in onClick()?

When I click, the following code leads the two sounds to be played not simultaneously, but sequentially. Why are they not played simultaneously? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mytextview=(TextView) findViewById(R.id.textview); ...

ACTION_PICK usage with contact book

I was able to use ACTION_PICK with People.CONTENT_URI with the following part of code Uri myPerson = People.CONTENT_URI; Intent contactPickerIntent = new Intent(Intent.ACTION_PICK,myPerson); startActivityForResult(contactPickerIntent, CONTACT_ACTIVITY_CODE); with this i was able to launch the native contact book and on sel...

Resize AlertDialog to fit image exactly

Hey guys, I have the following AlertDialog with an image inside it: As you can see there is a small gap just above and just below the image. I'd like to remove that gap. My layout xml looks like: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id=...

Problem with google url for geocoding in android raises an exception java.net.UnknownHostException: Host is unresolved: maps.google.com:80

In my application i am using gps sevices.After finding latitude and longitude i am converting it to address.Here i am using this url: URL geoCode=new URL("http://maps.google.com/maps/geo?output=xml&amp;q="+latitude+","+longitude+"&amp;key=ABQIAAAAyL88-_OpLk5FIIOkSeeUmxT7MHGqhzhEaCAfoEQCgDSx27boqRSFO8M6ewa7UDr6dXrY4gXcl2BoDw&amp;sensor=t...

How can I get working dynamic ToggleButton text under android?

I've got a ToggleButton that's set up like: final ToggleButton filterButton = (ToggleButton) findViewById(R.id.filterTags); filterButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if (filterButton.isChecked()) { // pop up the list of tags so the u...

Application idle timeout - Want to implement autolock for a specific idle interval

Hi all, Is there a way to know application(any activity/sub activity/alert dialogs etc) idle timeout. For example if i did not respond to an activity for a particular time, how would i know the idle timeout for that activity. Actually i want to implement auto lock for a specific idle time interval. Or is there a way to know that an even...

Does Android's CursorAdapter run in a background thread?

Does the CursorAdapter run on a background thread and posts updates via the UI looper thread? If not what is the best pattern to load data asynchronously from a ContentProvider? ...

Failure to build NDK cygwin Windows 7 x64

I currently have a JNI application on the market and was looking to use the neon instructions to further improve performance. I am able to compile and build the neon sample and some basic changes but whenever I choose to do something more complex the assembler crashes with the following output (i've stripped the file names): .0/ProjectT...

How to call a specific function on FocusChange of all buttons in android?

Hi, It's possible to specify a particular function to be called when button is clicked by setting its onClick attribute in xml: android:onClick="function_name" I want to do something similar for FocusChange of buttons, is this possible? Specifically, I wish to increase my button's size when it has focus and make it n...

Capture button release in Android

Is it possible to capture release of a button just as we capture click using onClickListener() and OnClick() ? I want to increase size of a button when it is pressed and move it back to the original size when the click is released...can anyone help me how to do this? ...

[Android] import class/method from java file

I'm currently learning android and java, and I am having some issues with importing a java file. I am working with the time and date example in the android api demos, and I want to put all the code relating to creating the time and date dialogs setting the values etc into a separate java file, and in my main java file run when the appli...

Capturing logcat on android x86

iam running android 2.2 (froyo) on a x-86 based PC. How can I capture a logcat on the terminal console and save it to any specific location within the android, say notepad ? Whats is the keyboard command for it ? What are the other generic keyboard shortcuts for android x-86? ...

Android DOM Parsing Help

I have used XML DOM parsing BUt not able to display the LIST. of attributes..Local,Music,walk, sports....etc How it will code in oncreate() method. pls help me regard this.. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // DownloadLINK(URL); // } // private void DownloadLI...

Json and Gson in Android Application.

Hello Team, Can I have the Information of what is the difference between JSON & GSON. I have read the word GSON at some places while looking for JSON particularly. I don't know the clear difference between the two. Another thing is the Words; "Marshalling" and "Unmarshalling" associated with JSON Parsing, I wonder what they are actual...

problem with the real time capturing of a video-android

Hi all, I need a big help for this issue... I am not sure what i am doing is correct or not i am doing a sample application for transfering realtime video from one android device to an emulator, in device side i can open video cam and a set an output file for it, while the recording is progressing, at the same time i am ope...

how can i get all the system notifications that are shown now?

how can i get all the system notifications that are shown now?i want to write a programe that can intercept the notifications that other apps notified. ...

exit and back button implementation

Hi All, Either exit button or back button only can be implemented in my application.But i want both the implementations in my application. So,Please propose me a solution. Thanks in Advance..:) ...

[Android 2.1] MotionEvent multiple touch events get mixed up and influence each other (see demo video)

Hi all, Purpose of the app: A simple app that draws a circle for every touch recognised on the screen and follows the touch events. On a 'high pressure reading' getPressure (int pointerIndex) the colour of the circle will change and the radius will increase. Additionally the touch ID with getPointerId (int pointerIndex), x- and y-coord...

Android Show Different Image on Different Resolution

I am attempting to create a very graphically intensive android application. Almost all of the UI is based on bitmaps and I would like to support as many different devices as possible and to have the app look great in all of them. Is it possible to embed different resolutions for each image and have a different image displayed on each de...

outgoing message Receiver

hi can anyone tell me how we know that user is typing a msg. actually i am developing an app in which if user is in speed and if he/she starts messging in speed than he should unable to do this. and how should i add this feature in my app. i m very confused. plz help me so that i can move forward. ...