android

How to update widget every minute

Hi, can anyone tell me the best way to update widget every minute. Now i'm using thread inside the AppWidget, but sometimes i get error FAILED BINDER TRANSACTION !!! After that error, i always got a lot of error like that all the time and i can't change the view in my widget again. Thanks ...

Alert in android.

I am having a bitmap image. Can i show it in a Alert Dialog in android? ...

Rotate Animation code works on Emulator but not Device .....

Hi Friends, I have implemented rotation of a custom view which runs perfectly on Emulator,but the screen goes blank without any error. When i disable the animation in code[commenting the lines] the view appears on device. Please help me out...if there is any fox for this... ...

Receive images from server through GPRS and display

Hi guys, I need an android application that needs to receive images from a server through GPRS(by http connection) and display it. am having the url of the server ...

Include a second layout resource in my first one

Is there a way to include one resource in another (for example a header design in multiple activities' layouts). I know I can add it at run time, can it be done in the XML? ...

how to refresh a dynamic listview in ActivityInstrumentationTestCase2

I am testing an android activity that has a listview that dynamically changes. The problem is that the listview in my test app does not update when the one in the application changes. I've tried the various refresh methods but no lock. I need to verify the contents of the list as it changes ...

how can I display saved data when I restart Activity

In my Project I want to play audio files in mediaplayer and displays progressbar. If I exit the application then also player have to play audio file. If I restart The Activity I have to display progress bar with last activity progress. Here I tried using onSaveInstanceState() method. But I cant display progress bar with last progress. w...

Is it possible to change the scale of the sp unit

In my XML I can set textSize="18sp". Is it possible to change the scale of the sp unit which would affect all sp sizes but not affect dp sizes? ...

Align buttons inside a TableRow

Hello. I'm developing an Android application. I have this: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="200px" android:orientation="vertical"> <TextView android:id="@+id/gameTitle" andr...

Android send SMS which is visible in SMS thread (no GUI)

What I need: - Send SMS with no GUI interaction (choosing a client to send SMS is out) - SMS has to be visible in a thread queried from "content://mms-sms/conversations/"+threadId Currently I'm using SMSManager: SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phone, null, message, null, null); Is there any ways to do ...

how to customize thumb of seek bar

I want to display a text view just above thumb of the seek bar that will display the current progress of seek bar. As we move the thumb forward and backward the text view will also move with thumb ( the text view should also be above the thumb). Please provide any clue ,code snippet are always welcome. Thanks. ...

(best) Ways to deliver control messages to custom content provider

The android content provider has methods for the normal suspects {insert, delete, query, update} but if I want to send control messages there is no obvious mechanism. Suppose one of the tables managed by the needs to be reset, cleared and reloaded. How can this be done? I have several approaches each of them seems a bit hackish. 1) cre...

Android: Center an image horizontally based on another image (not on parent)

Is there a way to center an image horizontally based on another image? Could be from xml or coded. For example one button on top and another button below (i.e. android:layout_below="@+id/button1"), but centered horizontally based on the first one. ...

Android emulator application load/start time

I’m working with Eclipse and writing an Android application. I’ve noticed that the load times to the Android emulator can vary significantly. Recently, I found that manually going back to the main menu of the emulator helps my application load much faster. This brings up two questions. Is there a quicker way (read: automatic way) to ...

How to get image path from images stored on sd card

Hello , is it possible to get the path of all the images that are stored on the sd card of my android phone? also is it possible to check for other images stored on sd card or in the internal memory? I am currently doing this: Cursor cur = this.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null,nul...

Add description to Android Gallery - (Pictures and text)

Hi to all! I'm working on my new project but I can't figure out how to add a text under my Gallery. I have 3 pictures, if I slide on picture 2 I can see under picture 1 and 3 the correct description but it doesn't appear the description under the selected picture (in this case the number 2). This is my code: public void onClick(View ...

android supporting app on 2.2 till 1.5

i want to support our app for 2.2 and while being able to run on 1.5 that means minsdkversion = 3 the problem is that to support all platform i have cut and paste all resorces from mdpi to drawable as 1.5 has different mechanism for choosing resources, now the problemn is that for some resources it says resource not found which i can pi...

Android: How can I get the current foreground activity (from a service)?

Is there a native android way to get a reference to the currently running Activity from a service? I have a service running on the background, and I would like to update my current Activity when an event occurs (in the service). Is there a easy way to do that (like the one I suggested above)? ...

Problem with Memory Management in Android image processing with http protocol.

Hi friends, I have a problem with a memory management. I'm downloading some data through mine HTTP client. Next thing I want to display data to the user. The problem is not stable, on some files of the same type it occurs, on some not. Stable thing is, that it is occurring on the same file. Here is LogCat input. Technically I have no...

Java Web Start - Does it work with Android?

As the title says, is deploying/using applications through Java Web Start a viable option? I found a few posts online from years ago saying that the JavaME applications are only available. ...