android-widget

How to broadcast an intent to a specific appwidget?

I am creating a appwidget which needs to update on a specific interval. I use AlarmManager for this. I want to have the alarm run the onUpdate() method in the AppWidgetProvider. //Create the intent Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE); pendingIntent = PendingIntent.getBroadcast(context, 0, in...

How to make button that shows a list of options on long click, like on the Soft Keyboard

I want to use/create a button that works like the one on the (HTC Desire) Soft Keyboard. So that when you make a long click, it will show a list of options, and by sliding your finger to the left or right, you select which option you want to choose. Example: When I hold down the "12#" button on the keyboard, it presents the list: [: /...

I dont want change vertical-horizontal rate...:) Circle becomes ellipse.... HELP!!

I want horizontal-vertical rate unchanged. How can ı Do this?? my picture is rate is 320x70. for example, in my phone(samsung galaxy-s GT-I9000) it looks like 320x100. originally I have a circle but it look ellipse... ı have to fix it, but how can ı do?? its my code.` <?xml version="1.0" encoding="utf-8"?> <LinearLayout an...

android: efficient way to get an approx location

i have a widget that needs an approximate location. this is what i'm doing ... in onUpdate(), get the best provider, set a location listener on it, and return in location listener's onLocationChanged(), update the remote views based on the location, and unregister the listener this works, and on the emulator things wait until i send ...

RemoteViews and setOnClickPendingIntent

I try to write my first widget application and i got a problem. So, i have 2 arrows: switch to left and switch to right. For both of them I want to use a single Service, which changes the view of my homescreen widget according direction of arrow. For distinguish the direction of arrow i put an extra data to each intent i use. This is my ...