android

Android ThreadSafeClientConnManager Timeouts?

I'm using a ThreadSafeClientConnManager to perform simultaneous requests in background threads on Android, set up with: HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, HTTP.DEFAULT_CONTENT_CHARSET); HttpProtocolParams.setUseExpectContinu...

Android/iPhone to have full access of Enterprise Information System?

We continue to build our fairly small applications on Android, iPhone and other mobile operating systems. This is fine and fun in the beginning of a new era, but when mobile OS matures, gets to be the preferred device for business people in motion, they want something more. One would guess they want the same access and capability to ER...

Picking image from gallery always returns resultCode -1.

Here is my code. Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("image/*"); intent.addCategory(Intent.CATEGORY_OPENABLE); startActivityForResult( Intent.createChooser( intent, "Select Image"), SELECT_IMAGE_LOCAL); For some reason it is always returning -1. Any ide...

Junit Android ActivityUnitTestCase: How do you make it use a target Application instance?

So I have a custom Application class which has global state in it custom to my application. Currently inside of my activityUnitTest the Application object does not seem to be instantiated and it causes a lot of underlying calls to fail. How do you go about telling the ActivityUnitTest to create an instance of my desired application Objec...

ERROR in C:\Users\lenovo\Desktop\android-sdk_r06-windows\android-sdk-windows>>SDK Setup.exe

I have had "Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: Connection timed out: connect" ERROR for 2 weeks.Please help me ...

RatingBar onClick

Hi, I have a ListView that uses different XML files to create Views and make items out of. One of these XML files contains a RatingBar. Everything displays and looks excellent. I'm trying to attach an onClick handler to the RatingBar to launch a new Activity. My RatingBar is of style ?android:attr/ratingBarStyleSmall; so it's just a...

Can you load dynamic maps in the phonegap framework?

Currently I've been using google's static maps to display maps in a phonegap app I'm developing. But I'm wondering if there's any way to load a google map that the user could scroll into and out of? I would want similar functionality as the maps app in most mobile environments. Is there any way to incorporate that type of service into my...

Backing up data on your Google mail account in Android

I want to have my application periodically save a zip file to the cloud. Since I don't want to set my own cloud solution, I thought of doing something similar to what the application SMS Backup does. It saves your Gmail credentials and when a new sms arrives it saves it to your Gmail under a specified Label and also marks it as read. N...

Android Camera Preview Stopping Audio

I'm trying to play a song snippet in an Android app which includes a camera preview. But whenever I start a song playing with MediaPlayer mp = MediaPlayer.create(this, R.raw.song1); mp.start(); It always stops after ~.5seconds I have come to the conclusion that it is something about the camera preview that is stopping the musi...

HorizontalScrollView - need to scroll by width of the images.

I have a HorizontalScrollView that consists of Images (Icons). I need to scroll the view in "blocks" the width of the icons, so as to never have a "piece" of the icon on the screen. I need more, but this question will give me all the other answers I need. Does anyone have a code example to point me to for this? Thank You in advance...

Problem with NinePatchDrawable

The problem with NinePatchDrawable. Created 9.png file using a utility draw9patch, but when the throw the file in a folder res/drawable error: No resource found that matches the given name. ...

A very open-ended, n00b-esque question about extending the Notepad tutorial in Android

Hello everyone! I want to start off by asking for your collective patience... I am trying to learn to program for Android by trial-and-error type modification of the Google Sample code: "Notepad Tutorial" So far things have been very slow going. (I am also reading Head First Java :) My goal is to add to the tutorial app an additional T...

mediaplayer.start() makes app crash only on Motorola Droid devices

Hi everyone, I have a soundboard uploaded on the android market. The app is doing pretty well in the market(50,000+ downloads), but the developer console reports that I have an error, and this is bothering me. All crash reports come from only one device - Motorola Droid. I've looked at what the error actually is, and it happens when I ...

Do OpenGL Point Sprites work in Android?

I'm developing on a Droid, version 2.1-update1. My supported GL extensions include GL_OES_point_sprite and GL_OES_point_size_array. I am unable to get point sprites to render. The code below throws UnsupportedOperationException from GLWrapperBase at the glTexEnvi call. If I disable textures and comment out the glTexEnvi all, it t...

AVD Android Emulator not loading applications

I'm an experienced Java programmer and I've followed the Hello World tutorial word for word. However, the emulator loads up but the apps do not. I tried the Hellow World app and a sample project GestureActivity. Each time only the emulator works. My computer is reasonably fast and I've waited at least 10-20 minutes on occasions. Is thi...

gluLookAt not working despite using Push/PopMatrix for transforms

I'm trying to use gluLookAt in an Android app to move the "camera" around, but I'm not seeing any results. I've looked around and I gather that any glLoadIndentity() calls will reset the matrix, cancelling the effect of the gluLookAt. Problem is, no matter what I put in my gluLookAt call, nothing moves. So here's the relevant part of ...

Best practices including pre-installed data?

Hello, Where is the best location to install pre-install data for your app? (for example, sample photos). According to this document, we should put data in "/Android/data/your_package_name/files/" http://developer.android.com/guide/topics/data/data-storage.html#filesExternal I am not 100% sure what should go in that location and wha...

Rotate View Hierarchy 90 degrees

Hello, I am working on a subclass of FrameLayout that is supposed to rotate all of its children by 90 degrees. I am doing this to overcome the landscape-only camera limitation present in android 2.1 and below, by having the activity be in landscape, but placing my camera overlay into this framelayout overlay to cause it to appear as if ...

How to layout a button

I would like to apply both an icon and text to a button. The button would have the icon centered in the button and text written at the bottom, centered. I could not get the text to center and be at the bottom using android:gravity. A side note, for a layout with 6 buttons is a Table Layout the best way to do it? There is 3 rows and 2 c...

android home screen widget x-y coordinates

Is it possible to obtain the X-Y coordinates of a home screen widget? I need to display a pop-up relative to the position of the widget, so I need to get the X and Y coordinates. Thank you ...