android

Remove default drop shadow at top of activity layout?

Hi, I have an activity. It does not have a title bar. The content view is just a linear layout. It looks like android draws a drop shadow at the top of my content view, directly below the status bar. Is there a way to stop that from being drawn? My layout is just: I have no titlebar: requestWindowFeature(Window.FEATURE_NO_TITLE); ...

Cannot run (in Eclipse) Bluetooth Chat sample app from Android website

When I run the app in Eclipse, Android emulator starts but says "Bluetooth is not available". Need urgent help with this. Also need help with running/installing an app on real phone. I connected my HTC Desire (Android 2.2), enabled USB debugging and run the app from Eclipse. Emulator starts as usual instead of the app running on my phon...

Dynamic autocomplete widget in android

Hello experts, Can anyone kindly guide me as to how to implement a dynamic auto complete widget in android. My requirement is, as I type a letter, a thread will work and will return an array with 5 suggestions maximum. I need to display these 5 suggestions in an auto complete list view. Experts please guide as to how to implement the s...

Testing android application. How to allow for Intent.ACTION_PICK?

I have an application which launches startActivityForResult so user can choose a picture. I don't want to test this, just mock a choice and return to the main Activity. How to do that? getActivity() fails with RuntimeException: Unable to resolve activity for: Intent { act=android.intent.action.MAIN ... blah..blah..blah.. ...

Implementing Triangulation in android

Hi Guys: I am new to android. I am developing an application in android 2.2 to identify location of user by means of any available resources (GPS , Networks etc). I have done finding location through GPS and using SIM network along with internet. Now problem is want to locate device when no GPS and no internet is available. In this case ...

Android: InputMethodService how to set a view with setExtractView(View view)? [secret API bug?]

I'm trying to provide a modified view for a custom Android keyboard in fullscreen mode. Therefor I'm trying to replace the extract view. In the documentation I found the following method: setExtractView(View view) - so I assume it's a public API call. However, as you can see from the Android OS source code (snipped pasted below) it lets...

Native Mobile Applications with HTML

Hi, I am trying to develop a native application for iPhone or Android or Symbian on Windows. I have looked online and came across http://rhomobile.com/, which let you develop native applications for almost all devices, but I am inexperienced in Ruby. I can code in HTML, ASP.Net, Javascript, and PHP. The only thing that made my search...

DecodeByteArray with WebService image always null

Hi guys, There what I am trying to do : I am calling a WebService that send me back an image. I get it from the entity.getContent() method. Further in my code I try to use de BitmapFactory.decodeByteArray(myImage, 0, myImage.lenght) but the Bitmap that it returns me is always null Does someone have an idea ? ...

RTP library for Android

I am looking for an RTP lirbary for Android. So far I could not find any. Is there any such library? Alternatively, I think I can use any RTP library for JSE for which I can get the source code. I can compile the code in Android. I will be writing a proprietary application so the license has to permit that. Can anyone suggest a library ...

Get click event and swipe gesture in imageswitcher in android?

Hi, I have an imageswitcher as the only component on the screen. I want to capture the swipe gesture and click event separately for it. But it is not able to get the events separately. If I set the onclicklistener method for imageswitcher object then it always fires onclick method even if I have swiped. Can someone let me know the work...

Finding your location when using Internet in android

Hey Guys! I have implemented location identification using GPS in android in my application but now if GPS is not available or disabed then how to identify location when internet is enabled in device. Whether using google API or triangulation or some thing else. Thank You. ...

How to quickly test an HTTP post response in an Android emulator

Let's say I want to perform a quick HTTP post to a website within my android app. If I were to set up the http client and send the post all in the onCreate method of the main screen (inside the UI thread) just for testing purposes, what would I use to quickly see what the response is to the post? I tried something quick and dirty below...

The touched control does not gain focus, when I touch outside of the PopupWindow.

When I touch a control outside of the PopupWindow, the popup dismissed, but the touched control does not get focus. Q: What can be done, to make sure the clicked control get focus? I tried setOutsideTouchable with no luck, it looks like this method is for some thing else. ...

NullPointerException Occurs when trying to create a file and write data to it in Android

Hi, I am trying to create a file ,if it doesnot exist and tried to write some data to it. The same program I did in java, it was running fine.But when I try to do the same thing in Android I am getting NullPointerException at the place where I am trying to write data to file. And also, I did not find any new file in the current directory...

Combining SurfaceView with other Views such as TextView and Buttons

Hi everyone I'm totally new to android programming (just did some tutorials/read the dev guides etc.) and as every newbie I want to do a useless game :-). Currently I'm struggling with the layout of different views. Similar to the example I've made a class which extends a SurfaceView and put that into a FrameLayout. Around this Surface...

android screen resolutions and sizes

I am currently working on an android app that is causing me some trouble. My app is heavily dependent on images that are fitted correctly to the screen they are being displayed on. Unfortunately things like the FWVGA/WVGA resolution difference 854 vs 800 is causing me some real problems, and that's aside from the other sizes/densieites a...

workaround for mapview overlays not pinch-zooming correctly

If a user does a "pinch zoom" on the map, my overlays don't properly size until the end. This has been noted in other posts, so i assume it is a known issue. Problem is, my client finds it totally unacceptable, as I am tasked with making the android app look as good as the iphone version. Is there any way to correct this, even if it...

Android: GestureDetector won't catch Gestures

I have to GestureDetectors in my program. One works beautifully, the other doesn't. As far as I can tell they're both implemented the same way. Here's the code for implementing the one that isn't working: myExcuseGestureDetector = new GestureDetector(new excuseGestureDetector()); excuseView.setOnTouchListener(new View.OnTouchListener()...

how to copy a file stored in /data/data/com.sai.myproj/files/a.txt to res folder in Android

Hi, I have a file stored in /data/data/com.sai.myproj/files/a.txt .This is the file I created and wrote data, it was stored in data/data/com.sai.myproj/files/a.txt which can be viewed using FileExplorer of DDMS. How to copy this file from there to res folder as I need to parse this file . Can anyone help me in sorting out this issue. ...

programmatically delete a widget on home screen by click listener in android

Hi I've a widget which i would like to delete programmatically if the user gives the command by clicking on some button or so.. But as per my knowledge the app programme and the widget programme will be running in different processes. So how is it possible to get the controll of another process remote view and delete the same clearing al...