android

Android SMS handling

Hello, I am just wondering about how android handles sms when it receives them. More precisely my question is when the android phone receives a sms message, which application saves the message to the mmssms database? Is this done by the OS or by the native sms application? ...

how to authenticate to REST web service from Android app?

I need to pull data from a REST web service in my android app. The web service requires authentication. I need to first call a login method, which will return me an authToken and JSESSIONID as part of the response header. I need to pass these items back with every request. I'm currently using: org.apache.http.impl.client.DefaultHttpCl...

Android: Saving Image to Database

I have a activity with 3 imagesViews and a Button. Clicking on the ImageView shows an AlertDialog with a list of images (located in /res/drawable) that the user can select. I've hit a wall where I don't know how to store the images to the database that were selected in the ImageViews. Any pointers? ...

Creating a thread to asynchronously download xml for usage in UI elements

I'm making an application that grabs an RSSFeed from one location, parses it, and displays the items in a rich ListView. I've got it working synchronously, but it hangs on the initial download. I used ImageDownloader from the Google blog to asynchronously grab images to populate the ListView, but how do I go about threading the download ...

Can't get widgets from main.xml referenced in the Java program

Hi, Made a very basic xml file to try and access a simple button widget. The main.xml file is: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:bac...

How can I check if a view is visible or not in Android?

I set sameting to invisible like this on Android: myImageView.setVisibility(View.INVISIBLE); And then visible like this: myImageView.setVisibility(View.VISIBLE); I don't know if myImageView is visible or not now, how can I check it like this: if (IF myImageView IS VISIBLE) { Do something } else { Do something else } How can I do...

The various versions of Android and XPath support

Hi folks, I am a newbie in the Android world, having limited experience in Java from my varsity days decades ago. These days I am a pampered dev in the .NET world. These days I am a proud owner of an HTC Desire and decided to try my hand at Android dev. Now I have struck a bit of a dilemma. I am writing an app which heavily uses XML ch...

How can I create an activities in a list view

Hi, I have create a list view within a tab with a list of teams within it, I want to create a activity which when clich goes to another class, I want to do this with 20 items that will be in thisa list, code is below public class ll2 extends ListActivity { static final String[] teams = new String[] {"Accrington Stanley", "Aldershot", ...

Tabbed Application with location listener implemented in tabActivity tabHost

hi. here is my problem. i have an application that has a tabActivity and 3 tabs. all off the tabs use a location listener and work with locations. i implement onPause and onResume for every tab to remove and start listening for location accordingly. is this the right way to go? i had another idea to work with and that was implementing a...

Android: Transmit sound to somebody during a call?

I've looked up and down the SDK for this, but I can't find anything. I'm wondering if there's a way to transmit a sound, such as a WAV or OGG, during a call such that the person on the other end can hear it. (This sound should be heard in addition to, not in place of, the normal voice transmission.) Is there a possibility I may have over...

Android application: SocketException permission denied (No such file or directory)

I am trying to use the code written and uploaded by Fedor posted in this thread http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview (Source code: http://open-pim.com/tmp/LazyList.zip) Fedor's project works well, but when I try to adapt the code to my project, things are not running well since...

Android - Rotate Bitmap (bigger than Cavas) but centered with Canvas

Hi, I'm trying to rotate a bitmap (which is bigger than Canvas) keeping it centered with Canvas and repeatedly in time, in order to make it appears as spinning. I wanted to post an image explaining the situation, but I can't (not enough reputations; it's a pitty because I've spent a lot of time doing it :( ). I hope you understand what's...

android weird onCreate / onDestroy balance

Hi, is there a way to tell Android that I would like subsequent calls to startActivity() all resume the target activity rather than creating it over and over again ? Any workarounds ? Thanks ...

How to program a scrolling game camera in android?

Hello, I am currently trying to write a simple shoot them up game with top down perspective. I am using SurfaceView and Canvas to draw the graphics on the screen, but I cannot find out how to make the "camera" scrollable. The player character is always in the center of the screen and the camera(SurfaceView's canvas essentially) is suppo...

Encode a URL Containing a JSONArray

I've got an android application that I'm attempting to use to pass some data to a webservice using HTTPGet. If I just construct the string using the JSONArray.toString() method, I end up with a URL that looks something like the following: http://xxx.xx.xxx.xx/api?method=upload&amp;args[deviceID]=123456789&amp;args[data]=["{element1=9329...

Google Maps Android API gives a NoClassDefFoundError

My app just consists of a map with an overlay, but when I create my MapView, my app crashes with a NoClassDefFoundError. I'm using the Google API AVD that matches my target, but apparently I'm still doing something wrong. Any ideas? ...

Getting ANRs after terminating android service

I've got an activity that launches a local service using the bindService() method. Everything works great while the app is running, but when I terminate the app and unbind from the service in the activity's onDestroy(), several seconds later I see the following errors show up in logcat: 09-25 02:13:46.035: WARN/ActivityManager(60): Time...

Which Eclipse version should I use for Android app?

Hello, I am starting to develop android applications. Can any one suggest me which version of eclipse should I use? I see there are 11 versions. I am confused with these: Eclipse IDE for Java Developers Eclipse Classic 3.6.1 Eclipse IDE for Java EE Developers Pulsar for Mobile Developers ...

[android] why does onServiceConnected isnt called?

I am a beginner who made a simple program to show how service is work. ..... toStartService = new Intent(this, SimpleService.class); sc = new ServiceConnection() { @Override public void onServiceConnected(ComponentName name, IBinder service) { Toast.makeText(MoreService.this, "SC: Binded", Toa...

PDF in response to POST - android browsers perform additional GET and save that as file

My Django view generates a PDF via pycairo in response to a POST (I'm not redirecting in response to the POST). When I POST using desktop browsers I can save and/or view the PDF using Adobe Reader or Document Viewer. However, when I POST via my android browsers the Adobe PDF Reader and the ThinkFree viewers both report the file as corrup...