android

Get contacts photo which are synced with facebook for android

Hello stack people, I am trying to show contact pictures in my application but I am getting pictures of those who were added manually only and not those which are synced with facebook. How to work around this? Here is my code below: Uri uri = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, Long.parseLong(P...

Need Help on the scrolling Bar in Android?

Hai Friends, I have created a simple application which has a scroll bar as shown in image attached. The scroll bar has 5 textviews such as AllArticles, Top10 and so on , also the scroll bar has 2 arrow images, when i click the arrow image the textviews has to be scrolled. can any one help me regarding on th...

Advice on app using gps-sensor, compass-sensor and webservices via SOAP messages.

Hey folks, I really like your site and I think this is the place where I find answers to my questions! I am planning an app, which shall do a couple of things but since I'm kind of lost in all the information conserning Android I really need some advice what I have to look out for and which of my goals might turn out tricky. I want to do...

Detect my own app's version or use existing update notifier when publishing on my website and not the market

I would like to notify the users when there is an update because the updates will be coming from my own website and not the market. However, do not want to have to update two places. Either that or I would like to share the existing update notifier that is included with android. I am planning on uploading the app to one of our websites ...

Android Listview Row Layout

I'm developing what I thought would be a simple listview row layout, but I'm having some trouble getting my views to line up properly. There are 4 TextViews all using layout_weight within a LinearLayout to size themselves appropriately. What I can't figure out, however, is how to align them consistently so that each TextView begins in ...

Easy way to rename a project in android

I have downloaded an Android project. To avoid name conflicts I want to move it from com.android.zzz to com.my.zzz. At the moment I'm using Ecplise with the standard android toolkit. Is there a better way to do the rename than to go manually through the files? ...

Making small changes to referenced library classes with minimal copying

I have a library project and two application projects (free and pro versions) referencing it. I want to prevent duplicating code as much as possible, so only the differences are in the app projects and little else. In this case I'm talking specifically about the Java source. I recently figured out how extends works and I'm sure it will ...

[Android] How to open new browser from WebViewClient??

Hi all, Short question that i cannot get my finger on, i'd like to launch a new browser from my WebView after people click a hyperlink. But how can i set that target of that link to escape the WebViewClient?? Here's my code, any help is greatly appreciated: WebView site = (WebView)findViewById(R.id.WebView); site.setWebViewClient(n...

does textview not like to be placed to left of another widget

This is more out of curiosity than anything else, as I have solved my original problem. I wanted a button the horizontal centre of the screen, with a text box to the left of it, using a Relative Layout. I am curious to know why if I have the following layout: <Button android:id="@+id/pickTime" android:layout_width="wrap_content"...

How to place Logo or Picture instead of label in android

Hi all, Below the RSSI bar we will have label..android:label="string/app_name" Instead of this label how to place logo or picture.? ...

Problem with creating new xml files..

I'm trying to create a new xml file in /res/drawable (developing for android in eclipse) the message i get is ; Multiple annotations found at this line: - Premature end of file. - error: Error parsing XML: no element found When I'm in the right folder i press New>File , then I name it to ic_tab_artists.xml, and rig...

Android Taking picture crashes on HTC Desire

Hi! I have done a small camera app with autofocus in Android. On my nexus one everything works fine but on the htc desire it crashes when i call takePicture() from a Camera object. Here is the stacktrace: 10-02 11:53:58.476: DEBUG/QualcommCameraHardware(19448): takePicture(479) 10-02 11:53:58.476: DEBUG/QualcommCameraHardware(19448): v...

Reading defining line of text file in java

I am trying to develop application for android . how I can get the defining line of textfile ? For instance I have to read 15. line of textfile. how I can do that? ...

android map overlay question

Hello I have made a map overlay class and have overridden the onTouchEvent method that looks like this : @Override public boolean onTouchEvent(MotionEvent event, MapView mapView) { //TO-DO here we will capture when the users //has pointed a point to go.. if(event.getAction() != MotionEvent.ACTION_MOV...

How to crop an image in android?

Hello friends I am in a serious problem I have an image in my res/drawable folder. I want to crop the image when loading in an imageview. But i don't know how to do that. i.e i want to slice out some part of the image. Please anyone help me to do that Thankyou. ...

Android: startActivityForResult gives no output

Hi, I need to start a dialogbox automatically when my activity is launched. I could not do that.. need information on that. But when I put the same code on a button's listener it works fine but if i want to start it onResume of an activity How will I do it. The code is Intent AppinfoToInputBox = new Intent(AppInfo.this, InputBox.clas...

Android app using data from internet resource

Hi, I want to write an Android application that can display some data received(polled) from an internet resource. I guess that I need to write some logic that will periodically call and get data from some endpoint, parse the response and display it. Is there a good tutorial for all this steps? I know very little about Android programm...

Can't get ListView items to show up in android program!

I have a listview that I would like to use to display a list of strings. The problem is the items don't show up. Can anyone tell me what I am doing wrong? Here's my code: import java.io.File; import java.io.FileFilter; import java.util.ArrayList; import android.app.Activity; import android.os.Bundle; import android.os.Environment; imp...

Problems with ListViews

Hi, I'm having a several issues with ListViews. The first problem is the layout that I use for every row of the listview. When I click in a row I've programmed that it expands with some other views. All works fine, but when I try to click again for shrink it, it seems that it's no focusable and doesn't highlight and, of course, it doesn...

How to create Custom Text Views in android?

Hai Friends, I am parsing the url to display the contents in it, my requirement i have to display the each content in separate textviews. For Instance: Let us assume the contents in that url are FootBall, Carom , chess, VolleyBall and so on . I want to display FootBall as a individual textview similarly others....