android

Intent filter with vendor specific MIME type

The app AndroidVNC defines the following activity filter in its manifest: <activity android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden" android:name="VncCanvasActivity"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:n...

Android: Resizing and scaling a part of the image

Given an image, I want to be able to scale only a part of that image. Say, I want to expand half of the image so that, that half takes up the whole space. How is this possible? Will ImageView fitXY work because I thought it'll work only for the whole original image. @Override public void onCreate(Bundle savedInstanceState) { super.onC...

android maps view crashes app

Hello, I've just started to learn development for the android. I set up a test app with a basic textview that when you clicked on it, changed text. that worked fine. So I decided I wanted to do something interesting with google maps using mapview. I've followed the instructions in the documentation, and looked around at the demomaps de...

android fb-connect layout disordering issue

I am using fb-connect for android app problem is when keyboards gets open layout distorted ?? I think they are opening facebook login page in browser any quick fix to add done button and layout disordering after keyboard get open ...

AndroidManifest.xml

I came across the following two lines in AndroidMenifest.xml file of my android application: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"&gt; Why we have write "encoding" in <xml> tag, what is the purpose of it? What is the purpose of writing 2nd line ? if anybody know ...

Toast created in an IntentService never goes away

I have an IntentService that downloads some files. The problem is that I create a Toast inside the IntentService like this Toast.makeText(getApplicationContext(), "some message", Toast.LENGTH_SHORT).show(); The Toast will never disappear event if I exit the app. The only way to destroy it is to kill the process. What am I doing wro...

How can I play audio file stored in File system using adb command.

Hi I am quite new to android but have already worked with adb and abd shell am commands. Now I am looking the way to launch and play audio file mp3 or wav that is stored in File system while using adb command only. Please help me to find out: Where should I store this file (whether it in data/app ?) Do I push this file to this lo...

Android: How to store images from url & save it in SD card

Hi can any one help how to save the images into SD card which i can able to retrieve from the URL link. ...

Remove default focus color from GridLayout and EditBox in android

Hi , i want to remove the default orange focus color from GridView and from the EditText. I have tried the android:focusable="false" but it is not working.Can any one help me if you have gone through this problem before????? Thanks in advance. ...

Weird behavior in Android's "if" block

It walks like a bug, it chirps like a bug.... I need someone to confirm that it's a bug. I was trying to get phone numbers from the address book with this code: public JSONObject getAllPhones() throws JSONException{ String mPhoneNumberProjection[] = new String[] { Contacts.Phones.NAME, Contacts.Phones.NUMBER, Contacts.Phones.T...

Events Handling For CustomListView

Hi i want to know how the handle events ,such as selected item in the Custom List, How To get the position ,name of selected item in customList Regards Rakesh shankar.P public class Adapter extends BaseAdapter{ int count=0; Context ctx; List<InfoObject> obs; Adapter(Context ct,List<InfoObject> cols) { ctx=ct; obs=cols; }...

Button setBackgroundColor no highlight effect

When I create a Button, Button myButton = new Button(this); myButton.setText("Click Me!"); it creates a button, that on click, turns "Orange" to indicate the click. To the button when I add, button.setBackgroundColor(Color.BLUE); It creates a blue rectangle, and on click does not have a hightlight effect. I don't mind the rectan...

How to read full data using HttpUrlConnection in Android

I am using HttpUrlConnetion to post data to server and read data from server. I am able to send compressed data to server and server sending again compressed data to client, but while reading data from server, android application is reading approximately 50% data not full data. Would any one suggest how to overcome this? is there any bu...

ANR and service prblem with android

hi all my problem 1 )i have one android check box and i start one service on tap of check box but the service take lots of time 2-3 minutes to process my task now for that time being my check box is selected and other ui control like button, and other check box where not function and give me ANR. 2) suppose i give progress bar at u...

Android-Service killed with "no longer want" - how to restart it?

Hi, We have a Service that continuously collects sensor data on the phone. This service should run "forever", e.g. as long as the user wants, and not be killed by the system. For clarification, this service is not intended for an app to be released in the market to the general public, it is written for a scientific study. So the peopl...

Audio Record using Android NDK

I try to record audio using android ndk. people say I can use "frameworks/base/media/libmedia/AudioRecord.cpp". but it is in kernel. how can I access and use it? ...

Shadow Effect for a Text in Android?

Hi Folks, How can i make shadow effect Text in Text View. Any Idea? Thanks.. ...

Integrating google checkout in Android?

Hi, Is there any way we can integrate Google Checkout in Android? I am able to post the order request and in response I get the checkout redirect url where the user is redirected. But then how to proceed with it. How will the android application come to know when the payment is done. The redirect url is called in Webview and then ther...

Getting text from spinner

placeSpinner.getSelectedItem().toString(); so I'm using this coding lines to get the text from my spinner and pass it on to another java file. But the application keeps giving me a force close whenever I do this. Hwo can I resolve this error? Thank you so much. ...

how to open .ics file in Android 2.1 version?

Hello all.I just create a application that will download the ics files from the mail attachment.I use the Android 1.5 Emulator.It downloads the ics file and i can able to open that by using my application.But in the 2.1 simulator when i try to download the ics file The browser displays the ics file contents .I need to open that ics file ...