android

XML in eclipse not updating?

I'm using eclipse helios to design a simple android application, however I'm having issues with tidying up the user interface by editing the XML after writing the rest of the application. However none of the edits to the XML file (I've checked it's the right one) are showing when I send the application to the onscreen emulator. For ex...

android emulator/eclipse deletes application files on redeployment

My Application downloads a file from a server and stores it in: /mnt/sdcard/Android/data/com.test/files. (the /mnt/sdcard is derived from Environment.getExternalStorageDirectory(); ) Everytime I redeploy the Application from eclipse(run menu) to the emulator it deletes the file. The Checkbox 'target/wipe user data' in the run configurat...

Image parsing in rss in android

Hi, I am trying to parse RSS feeds from a news website but I am unable to fetch the images from the rss feeds. Can someone suggest me some easy implementation for parsing RSS feeds with images in Android. ...

Android - check for presence of another app

I'm working on an app that extends the functionality of another, existing app. I want to know what the easiest way is to determine, through code, whether the first app is installed, preferably by referencing it by com.whoever.whatever but almost any criteria would be helpful. ...

android - get a resource (a string) from its unique integer

Hello. I want to do the following: I want to make a very simple gallery application. So I'd like to select a path for the images and set it as a resource. I set it in String.xml. So I have another class, which needs the selected path to load all the images from it. class ImageHolder { public ImageHolder() { this(R.string...

Android - How can I load an image to a ImageView?

Hello, I want to make a simple image viewing program, that just takes the images from a certain folder, and loads them from it. I did some coding with less thinking, so I did stumble upon this: Button btn = (Button) this.findViewById(R.id.buttonNext); btn.setOnClickListener(new OnClickListener() { public void onClick(View v...

Add Relativelayout or listview in Gallery in android?

Hi, I will like to use gallery view to add listview or relativelayout. Most of the examples that I have seen are of adding images in gallery and that is quite simple. Can someone let me know how to add other layouts inside gallery view. ...

Android activity image background size.

Hello, I am a bit confused on creating an image which will be acting as a background for my activities. So, in short, my aim is that my application should be able to fit the different screen sizes. Therefore, what size in pixel should my three images be to be able to fill the screen of the device in ldpi, mdpi and hdpi? Thank you for a...

MT4J on Android?

A quick Google search hasn't yielded any answers to this: Are there any factors that would prevent me from developing on Android using MT4J? ...

Trouble with Android Licensing Server

Hi everybody, I've tried to use the new license service of Android and I am facing some troubles. My code in the main activity looks like this: mLicenseCheckerCallback = new MyLicenseCheckerCallback(); String deviceId = Secure.getString(MainTabActivity.this.getContentResolver(), Secure.ANDROID_ID); mChecker = new LicenseCheck...

Touch screen reacts on hidden links

I have a html page with some links. When you click on a link, some jQuery code hides the div container, and shows another div. The originals links, in the first div, are no longer visible. From the browser (webkit on android) point of view, everything works perfectly. But if I touch the screen, the hidden links react as if they were vi...

Android - SQlite Getting nearest locations (with latitude and longitude)

Hello, I don't know if I'm wierd, but I haven't found any topic about the subject. The thing is, I have data with lat and lng stored in my SQLite database, and I want to get the nearest locations to the parameters I put in (ex. my current location - lat, lng). I know that this is possible in MySql, and I've done quite some research that...

?Sending a String created inside a method to another class

I have code which has one activity which passes information to a second activity. I can use this information to pass to a third activity with additional information from the result of the second activity. I want to use gestures as a method of going back to a previous activity, but if I go back from the third to the second activity I n...

portrait view inside landscape activity

Hi Guys, I have a question, how to show a portrait view inside landscape activity (eg. camera activity) for example: i have a camera activity (which should always on landscape mode), but i want my button (which is overlay on top of camera screen) following handset orientation. so when i turn my handset as a landscape, then my button o...

Need to fetch the Contact Account name and Contact Display name from the content provider using a single cursor in Android.

I need to list the 'Display name' of all the contacts belonging to a single account. I am planning to use a cursor adapter for populating the list and hence would require the corresponding fields (Display name, Account info) to be fetched in a single content provider querry. Looking at the Contacts Database Structure a single table amou...

How to deal with orientation change with a ProgressDialog showing?

I am showing a ProgressDialog in the onPreExecute method of an AsyncTask object and canceling the ProgressDialog in the onPostExecute method. In the doInBackground method I am making an HTTP request for user registration. I wish to allow screen orientation changes. When I change the orientation while the doInBackground method is still ...

Android Media Player Error

I am trying to play media player in android.But after some time it is giving following errors and the songs stop. 09-12 21:15:37.265: ERROR/PlayerDriver(31): Command PLAYER_PREPARE completed with an error or info PVMFErrResource 09-12 21:15:37.275: ERROR/MediaPlayer(333): error (1, -17) 09-12 21:15:37.295: WARN/PlayerDriver(31): PVMFInf...

Android Api - get mobile number from contacts

Hi, I tried so much tutorials, and read a lot here at SO, but i cant solve my problem: When a button is clicked, the user can choose the mobile number of a contact. Actual I can get the name of the selected contact, but i can't find a way, to get/chose the mobile number.. public void onCreate(Bundle savedInstanceState) { super.onC...

Android app connecting to a webservice - not working

Iam trying to connect my App to a WCF service that I created in asp.net. The service runs on my localmachine: http://localhost:8080/Service.svc/ But for some reasons my Android can not connect to this http-adress. This is the error: 09-12 14:50:44.540: WARN/System.err(593): org.apache.http.conn.HttpHostConnectException: Connection to...

MapView adding pushpins on touch

I managed to get the map shown on the screen. Now the user will move around the map and press on it. After pressing on a point I need to add a push pin on screen on the pressed location. If the user decides to go for another point, when pressing on the chosen point, the first pushpin would disapear and a new one will be drawn on the new...