android-widget

Launch Android Default Email application through btn click

Hello Experts, I posted this query here, but as usual, noone knows / no replies http://www.anddev.org/viewtopic.php?p=41513#41513 How can I launch the android default mail application through the click of a button in my code? I would also like to know, how this can be done to launch the contacts list also. Any help in this regard is...

How to make animated GIFs work from Android WebView

Animated GIF images rendered by Android's WebView do not seem to animate. Has anyone figured out how to make them work? I'm testing on an N1 with 2.1-u1. None of the web settings available seem applicable. ...

How do they do it? Dialogs over home screen.

Hi all, I'm writing an Android application and I would like to place a dialog or view over the home screen so that a user can enter text without jumping into my full application. I can't seem to get this to work. If I present a dialog (even in a transparent activity), my application launches. If you don't know what I'm talking about, t...

PendingIntent in Widget + TaskKiller

Hi, I've developed an Application (called Instant Buttons) and the app has a widget feature. This widget uses PendingIntent for the onClick of the widget. My PendingIntent code is something like this: Intent active = new Intent(context, InstantWidget.class); active.setAction(String.valueOf(appWidgetId)); active.putExtra("b...

How to launch activity from android home screen widget

Hi all, I am desperately trying to get my head wrapped around how to implement home screen widgets. Right now, I (finally) was able to get a button on my widget respond to a button press setting up an intent filter in the manifest. However, I cannot for the life of me figure out how to launch an activity when the button is pressed. B...

I need help with Widget and PendingIntents

Hi, I've asked here a question about Task Killers and widgets stop working (SO Question) but now, I have reports of user that they don't use any Task Killer and the widgets didn't work after a while. I have a Nexus One and I don't have this problem. I don't know if this is a problem of memory or something. Based on the API: A Pendi...

Cant delete more than 200 contacts in HTC HERO

I'm working on security application which will copy all contacts to some other database and delete all contacts from phonebook. I'm testing this on android HTC HERO. I'm successful to delete contacts from phonebook and create new contact info database, Till 200 it is working, but after 200 contacts its not working properly. After tht app...

How do I antialias the clip boundary on Android's canvas?

I'm using Android's android.graphics.Canvas class to draw a ring. My onDraw method clips the canvas to make a hole for the inner circle, and then draws the full outer circle over the hole: clip = new Path(); clip.addRect(outerCircle, Path.Direction.CW); clip.addOval(innerCircle, Path.Direction.CCW); canvas.save(); c...

Get preferences in AppWidget Provider

Hi all, I seem to be having trouble reading preferences from my AppWidgetProvider class. My code works in an Activity, but it does not in an AppWidgetProvider. Here is the code I am using to read back a boolean: SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0); boolean autoreplyon = settings.getBoolean("autoreplyon", fa...

Clickable widgets in android

The developer documentation has seemed to have failed me here. I can create a static widget without thinking, I can even create a widget like the analogue clock widget that will update itself, however, I can not for the life of me figure out how to create a widget that reacts to when a user clicks on it. Here is the best code sample th...

Force Android widget to update

Hi all, I respond to a button press on my appwidget in the onreceive method. When the button I pressed, I want to force the widget to call the onupdate method. How do I accomplish this? Thanks in advance! ...

Android widget different portrait and landscape orientation

Hi all, I have a (hopefully) a relatively simple question. How do I tell Android which layout to use for portrait and which layout to use for landscape orientation on my AppWidget? Thanks in advance! ...

Android: How can i print a variable on eclipse console

I wanted to print the value of a variable on the console for my debugging purpose but system.out.println doesnt work. Please help ...

Emulating Preference look/feel with LinearLayout

I really like the look and feel of the Preference UI items and want to replicate that in my application. Basically I've got an Activity with a couple LinearLayouts set to be focusable. When they are focused, I want them to turn green (like Preferences do). Any idea how to apply that style to my LinearLayouts? Note: The LinearLayouts ...

Is it possible to receive SMS message on appWidget?

Is it possible to receive SMS message on appWidget? I saw android sample source(API Demos). In API Demos, ExampleAppWidgetProvider class extends AppWidgetProvider, not Activity. So, I guess it is impossible to regist SMS Receiver like this, rcvIncoming = new BroadcastReceiver() { @Override public void onReceive(Context conte...

Enable GPS and network location programmatically on rooted phone?

I'd like to write a simple widget that toggles GPS and network location on and off. I've read that it's not possible to do that normally, but presumably on a rooted phone it must be doable. Does anyone know what the code would be? (I only need the code to toggle the location providers, I know how to make the widget.) It doesn't matter th...

layout alignment problem in multiple screen resolution

Hi all I am new in android, i am having few problem in layout alignment.I have divide the screen into three layout,as header, body and footer. I am giving the height dynamically for the three layout in java file, so i need to give 12% of height to header and footer layout, and the remaining 75% i need to assign height to body layout. ...

Android How to show loadingon widgetapp

I'll need to show "loading..." while my widgetapp get update, it will update from the activity. I need this because the update need a litle bit time while the widgetapp show an error to loading it self. Thanks ...

Dynamically creating Widgets on Android

Is it possible to create multiple widgets in runtime? Application (Activity) should generate in some cases new widget(or edit exist) with new name and label and do some primitive action on click, which should be available in desktop widgets menu. ...

Android number input with plus and minus sign.

Hi, I am developing in android and I would like an input field for numbers, where the user can select the correct number using the plus sign at the top and the minus sign at the bottom of the input field. I know this works for date picker. Is there some property or something similar to make this available for any integer number input fi...