android

Using PreferenceScreen/PreferenceActivity to configure home screen widgets

Hi, I'm creating an appwidget, where the user should be able to configure it before it is added to the home screen. To me, PreferenceScreen/PreferenceActivity seems perfect for the task, but the intention behind these classes seem to be configuring an actual application. I've searched, but cannot find any documentation or tutorials which...

setting ringtone for a specific application only.

I want to be able to set a ringtone which is associated to a particular application only. If the message with a special prefix arrives, my application intercepts it and does whatever it has to do. On message arriving, i want to be able to tell the user that the 'special' message has arrived, through a ringtone( which exclusively plays u...

How to remove cookies using CookieManager for a specific domain?

I know about the existince of CookieManager, but how do I remove cookies of a domain only? Can someone help me with some code fragment? ...

Bitmap in ImageView is cropped off the screen

I'm working on an Android application that needs to download an image and display it inside an image view. The Bitmap is passed to the main java file and added to the image view like this: comic = (ImageView) findViewById(R.id.comic); comic.setImageBitmap(c.getImageBitmap()); This works, except that the left side of the image disappea...

XML-RPC or MetWeBLog support?

I've search how to use XML-RPC or MetaWeBlog in Android. But, until now, I couldn't find any useful library. I've been trying to use Apache XML-RPC in Android, but I gave up to use it. Is there anyone who can tell me what should I do? ...

How to add add icons and Intents in the QuickContactBadge menu for my android program ?

Hello, I'm a writing a program to add a new way of communication such as MMS/SMS or SIP phone to Android. Is there a way to add an icon in the QuickContactBadge menu, when clicking on a contact photo in the Contacts application ? I wasn't able to fully understand how it works from android sources ... Is the list of icons only popula...

Update function

Hello everyone! I try to learn java for android devices.. i have to create the update function. But still have one question: How???? in class root public void update(){ maindebug("update"); // This is my debug function } public void run(){ while(isRunning){ // isRunning is a boolean variable SystemClock.sleep(100); update();...

ExpandableListView context menu

I'm trying to add a context menu to my ExpandableListView. I've implemented onCreateContextMenu() and onContextItemSelected() but if I hold my finger on a menu item context menu doesn't appear. What's my mistake? Thanks, Aleksander ...

How to use the date format that has been setup as default in Settings?

As you probably know, you can setup date format in the Settings of an Android device. In code how do we make sure that we use that format for date display? ...

Not able to add android platform using AVD manger - not able to fetch the url from AVD

Hi, I wanted to start working on android but having installation issues. When i start the AVD Manager and check the repository.xml url it gives me an error "... not able to fetch the url. Connection timeout." the same thing happens if I use http or https but if i try to open the url in my browser, it returns the response. I do not have ...

What's the difference between setWebViewClient vs. setWebChromeClient ?

What's the difference between setWebViewClient vs. setWebChromeClient in Android? ...

is it possible to specify an apn setting for a connection in Android?

I just want my connection to use this apn, i.e. I don't want to set the global apn. ...

Android HTTP get methods

I have written a number of applications for blackberry and am just starting in Android. It seems to me that android has a lot more built in functions. I am starting by recreating some of my BB apps on Android and on one I take a few xml sites and parse them out. On blackberry I implemented this by creating a class that extended a thre...

android playback suddenly stopping...

I have an app that is streaming audio content and sometimes it just stops all of the suddent. the logcat windows shows -- AudioHardware pcm playback is going to standby and that's it. I saw on another thread (pun intended) that someone was saying it was because he was using too many threads. Could that really be causing this? Could...

How to fill a Path in Android with a linear gradient?

Given a closed Path object result is like this: http://www.tutorialguide.net/images/adobe_photoshop/0043/001.jpg. Although that is a rectangle I'm looking for something which works with any closed Path. ...

Is there a black progress bar to be visible on a white background?

The default progress wheel on Android doesn't display well when the background is white, it's barely visible. How can I fix this? ...

Passing enum or object through an intent (the best solution)

I have an activity that when started needs access to two different ArrayLists. Both Lists are different Objects I have created myself. Basically I need a way to pass these objects to the activity from an Intent. I can use addExtras() but this requires a Parceable compatible class. I could make my classes to be passed serializable bu...

How can I specify different dimension of layout for different density

Hi, Can you please tell me how can I specify dimension of layout for different density of screen? i.e. the layout are the same across different densities, but some dimension are different. how can I do that? Thank you. ...

How Can I control the nunmber of tabs raws inAndroid 1.5

Hi, I'd like to divide my tabs to 3 diffrent raws so each raw will have tabs of a similar activity( E.g. action games, board games, shooters games) How it can be done? Thanks, Eyal. ...

Multiple map activies in an application

Hi, I'm having a bit of a problem with my Android application. I have 2 activities (among many others) which are Map activities. The problem is that whenever I call the 2nd map activity and if the map view changes from that which was on the 1st map activity, the app crashes when returning to the first. Well not really crash, since it's...