android

Creating a rectangle shape with only two rounded edges

I can create a shape that is a rectangle with all edges rounded. However, what I'm wanting is a rectangle shape with only 2 of the edges rounded. Is this possible? I'm essentially hacking together a ListView that looks like a bubble with rounded edges. I'm looking to add a header that has the two top edges rounded and a footer with t...

WebView displays .pkg file instead of downloading it

Hi all I need some help here I have gone through the tutorial for WebView and I get it to load my url and it loads fine. I run a site that offers .pkg files to my users for download to there device. The issue is instead of downloading the .pkg file it just displays the raw code of the .pkg file in the webview. How can I get this to force...

How to restore last values of listview and other views after coming app from foreground ?

When i click home button and then come back to to my application it doesn't show the last values on the listview or any other view it just look same with when i started the application.I believe it is can be done with onResume and onPause but i couldn't find how . ...

Camera crashes in Android 2.2

I have tested my application on the Android SDK on everything from 1.5 to 2.2 and the camera code in my activity works fine. Running it on a device with 2.1 is also working. But the same app does not work with 2.2 on HTC Desire and Nexus One and the app crashes. Any ideas why they might be happening? Am using import android.hardware.Cam...

My BroadcastReceiver is not receiving the BOOT_COMPLETED intent after my N1 boots. Help Please!!!

I am unable to get my BroadcastReceiver onReceive method called using the BOOT_COMPLETED intent. AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.jerrellmardis.umbrella" android:versionCode="4" android:versionName="1.0.3"> ...

Android: Including multiple Java Packages to Manifest

The app I am developing has many activities organized into seven java packages. Originally I wrote all the coding and stuff for each group of activities in a java package as different projects. Now I'm at the point where I want to put all the packages together into one project. When I add a new package to the src folder, I get an error ...

Programming Resources on using Android Networking APIs

Hi folks, I'm trying to learn how to use Networking API in Android (or how to make the app network enabled). I looked in the following places: 1. Coder-Darcey book "Android: wireless application development" has a short chapter on this. But it is for an older version, 1.5, of Android. I'd like to refer to a more recent & more detailed ...

Android: Include External Jar in Build (Without Eclipse)

Hi, I'm working with Android at the moment, trying to avoid using Eclipse (for which I have an irrational hatred). I need to include an external .jar file (used in my Activity)and have no idea how to link it for ant debug... I've read up on build.xml files but adding <path id="compiler.classpath">...</...> or <classpath> nodes to the ...

Assign value to each string in the ArrayAdapter

Hello, I want to create a ArrayAdapter for one spinner. So each element contain one string (which will be displayed in the spinner/list) and one value (e.g. an ID). How I can easily store a second value beside each string without implementing a new Adapter class? Sincerely xZise ...

HttpUrlConnection problem in android

HI, i am doing a HttpUrlConnection in android application with an URL. The uRL is giving me response in the browser but in the android code InputStream returning zero. this is my code..... URL url = new URL("https://certify.securenet.com/payment.scrnt"); HttpURLConnection httpCon = (HttpURLConnection)url.openConnection(); Input...

Is there a way to accurately determine which city in US the user is in using Android Location Manager?

I am trying to determine the city in USA the user is in using their current location from an Android App. I want to use the GPS as the location provider but how accurately can I determine the name of the city from the Locale or Latitude / Longitude data. For instance I noticed the twitter app determines you are in Manhattan when tweetin...

Set root activity/intent in Android

I'm switching between different Activities using Intents. For one Activity, I would like it to clear the history stack so when the user presses the back button, it takes them Home instead of previous activities in my application. ...

Customized Tabs/Views - TabHost or ActivityGroup?

I am building a tabbed application. Things work wonderfully with TabHost. Unfortunately, my team lead does not like the look of the tabs. He doesn't like the tiny icon and the gaps between the tabs. So, I either need to modify TabHost or use an ActivityGroup. My first attempt was at changing TabHost. Here is the drawable for one ...

facebook through android

I want to connect my users to signin in facebook through my app. I did some google and some people are saying use fbrocket where as some http://github.com/facebook/facebook-android-sdk.git. I want suggestions 1) which one is easy to implement? 2) what is the difference between them? 3) Why I need to install a jar. Can I achieve this usin...

How to get duration of an video file?

Hi all, I'm a beginner in Android programming. I have been write an application to list all video file in a folder and display information of all videos in the folder. But when i try to get the video duration it return null and i can't find the way to get it. Any one can help me? Below is my code: Uri uri = Uri.parse("content://media...

Random Access files > 2GB with Android SDK

Hello, can anyone tell me how to random access a file beyond 2GB with android SDK. I was trying to seek to a position > 2147483647 and got the exception: "Value too large for defined datatype". That is odd as the parameter for the seek command is type "long". See the code example for details: RandomAccessFile BigFile; BigFile = new...

Using a ViewAnimator with a glSurfaceView does not animate.

I have a ViewAnimator setup to go through a few normal views (buttons, text, etc) and then to a glSurfaceView. When animating between the normal views it behaves as expected, however when trying to flip to the glSurfaceView it just appears. Perhaps it is not possible to animate a glSurfaceView. Here is how I setup the ViewAnimator <V...

How to return from preference screen to main activity?

Hi. I have one main activity and one preferenceActivity. On my first activity I call menu and go on preferenceActivity by calling startActivityForResult. case R.id.settings: startActivityForResult(new Intent(this, SettingsActivity.class), LAUNCH_SETTINGS); return true; Then I change my ...

service displays points on map android

hello, i have a android service running in the background which receives the coordinates from the server every few seconds. i am not sure how do i display the coordinates on a map every time the service receives a response from the server. kindly help or give an idea. thanks ...

Backing to ListActivity causing undesirable behavior

I've been messing with some layouts for my ListActivity's ListView and found a problem: When I click a list item it starts a new Activity. Unfortunately, when I click the back button to go back to my ListActivity, the scrollbar of the ListView is all the way at the top. It used to be that, when I clicked the back button, the user woul...