android

Thread or services

I'm confused between thread and service on android. If I have to download some file form server. It may be multiple files at a time. What i should choose in this situation thread or services? ...

populating mapOverlay

Does anyone know of any tutorials on populating a Mapview using an overlay at a specific point? e.g adding a marker at a specific lat / lng on your mapview? ...

Sending MMS with out any GUI ?

Hi I am writing an Android app where I need to send an image and text. I called intent with action Action_send, but it launches a GUI to compose a message. Can any one tell me how to send an MMS from code only with out triggering any GUI? Is there any intent action, where I can message directly? Thanks ...

How to call with credentials a .NET Webservice from Android?

I´m having trouble using .NET Web Services with the Android Platform because the web service i want to consume is locked behind Windows (NTLM) authentication. How can i to use NTLM authentication with an HttpClient request in a android application? Regards ...

How to create pdf files on android

Can't find any library to create pdf files on Android. Can any one help me? ...

Picture.writeToStream() not writing out all bitmaps

I'm using webview.capturePicture() to create a Picture object that contains all the drawing objects for a webpage. I can successfully render this Picture object to a bitmap using the canvas.drawPicture(picture, dst) api with no problems. However when I use picture.writeToStream(fos) to serialize the picture object out to file, and then...

FrameLayout + bg-image vs. ImageView

Simple question really: for very simple graphics such as dividers, is it cheaper in terms of layouting / rendering costs to use a FrameLayout and set the image as a background instead of using ImageView? The intuition was that FrameLayout is the simplest of all views (in terms of features), and ImageView does things like scaling and cro...

ViewStub vs. View.GONE

As far as I undestand, neither a ViewStub nor a View that's GONE participate in the measure and layout passes (or rendering anyway). Is there a difference in rendering performance? What's the best practice about when to use which? ...

Dialog from Service android

Hi friends, i want to show/pop-up dialog from service in android. can any one guide how to work around for that. Thanks, Dhaiwat. ...

Marquee in android

In my android application i need to scroll a marquee text continuously. in my Xml i have this code: <TextView android:id="@+id/widget28" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:singleLine="true" android:ellipsize="ma...

Restoring Android Application state

I understand that an applications state should be stored/restored in onPause/onResume, but: What data should be preserved? onCreate sets up the view but should it initialise module-wide app data? or should that be left to onResume? Where should the Intent that kicked off the activity be read? Are onStart/onStop/onRestart ever used for ...

How do I use webview to embed the web app in a native Android App?

I have a fully-working web app that is accessible using Android's browser. The annoying part is the url bar uses a lot of the screen. Is there a way to make this web app a native Android app? I've read that webview can be used to embed a web site within the Android App. Unfortunately, I only know web programming languages and have no Ja...

How to avoid scaling of android webview

hi Is there any way to prevent android webview to scale the rendered web page . I need to load an url which has links to other pages .When user clicks these links the rendered page is not aligned properly(i mean it cramps all the stuff within the screen width and height ) as compared to default handling of same web page by android browse...

Center text in a toast in Android

Hi guys, I was wondering if there was a way to display all text in a toast to be centered. For instance, I have a toast that has 2 lines of text in it. For purely aesthetic reasons, I would like the text to center-aligned instead of left-aligned. I've looked through the documentation and can't find anything about it. Is there a simple w...

android org.apache.http.httpclient package problem.

Hello,I am trying to import the code from this tutorial http://www.anddev.org/bbc_download.php?p=777&amp;item=7 into my eclipse,the tutorial is oldand I have trouble importing the packages that it referes. Are those packages deprecated? or I have to manually download and install them into my projects classhpath? if so can someone give ...

Android app compability

Hello, I've build my app under the version 1.6, 2.1 and 2.2 of android and it works. I'd like to know when I'll publish it what is the best : Build under 1.6 and so it will be compatible with newer version of android or Build under 2.2 and set "Target SDK version" to 8 and "Min SDK Version" to 4 Thanks ...

Should I be using something other than getResource().getStringArray() to populate a large array?

Following the Android sample for populating a ListView, I query an array from my strings.xml using Activity.getResource().getStringArray(): String [] mDefinitions = getResources().getStringArray(R.array.definition_array); The documentation for this method is pretty clear and I didn't expect to encounter any problems with it: Retur...

How to dynamically set textview height android

Hi all, In my application I need to set dynamic text to my textview so I want it to get resized dynamically. I have set: <TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="normal" android:text="Frontview" android:layout_weight="1" android:gravity="center_v...

Replace the previous image with new image

Hi I am displaying images in canvas.my question is how we replace the bitmap images on canvas depending on condition.and another question is how we remove the bitmap in canvas .Give me some suggestions.thanks in advance. ...

How to stream Raw AAC data to android mediaplayer?

Hi, Is there any way to stream raw AAC data to android media player? Or i there any work around for that?thanks in advance. ...