ACTION_TIME_TICK for every Second required.

by Ravi » Fri, 26 Jun 2009 18:47:12 GMT


Sponsored Links
 ACTION_TIME_TICK occurs every minute. I need an action which will
occur every second because I'm trying to display the 'Seconds' needle
in AppWidget.

Do help me even if it means modifying the framework source code.

ACTION_TIME doesn't occurs & it's docs are not clear.
--~--~---------~--~----~------------~-------~--~----~



ACTION_TIME_TICK for every Second required.

by Peli » Fri, 26 Jun 2009 19:19:31 GMT


 why don't you simply write a service and send your own broadcast
intent as often as you want?

Peli
www.openintents.org



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


ACTION_TIME_TICK for every Second required.

by Jeff Sharkey » Mon, 29 Jun 2009 13:56:32 GMT


 Implementing a clock widget with seconds as an AppWidget would be
/extremely/ inefficient.  The update code would be creating a new
RemoteViews object, and marshaling it across two IPC boundaries every
second.

The best way to write something like this would be to integrate it
directly into a custom home screen, so you could bypass the IPC costs
and only invalidate when the home activity is actively being shown.

j






-- 
Jeff Sharkey
jshar...@android.com

--~--~---------~--~----~------------~-------~--~----~



ACTION_TIME_TICK for every Second required.

by Ravi » Mon, 29 Jun 2009 21:21:02 GMT


 HTC Hero phone is able to display Analog Clock with Seconds Hand. Is
it done thro flash player or by changing Android Source code?




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. combining views

I'm trying to take an imageview and a textview and wrap it with
another view, so that I can call something on this super-view [such as
a 3d transformation that changes the text and image into a single
picture] and have the effect applied to all the stuff in it. Is that
possible? Is there some standard generic view that I can use to
encapsulate a variety of view types?




<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <TextView android:id="@+id/entry"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"      />

   <ImageView android:id="@+id/image"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"/>


</RelativeLayout>

--~--~---------~--~----~------------~-------~--~----~

2. APIDemos Gallery1 Next Question

Is there any way to get the name of the active image displayed?
Right now the images are referred to by their index number. What I
want to do is display the name of the image. For example when the
image at index 3 is active, I would want to display the name
"gallery_photo_4"

        private Integer[] mImageIds = {
                R.drawable.gallery_photo_1,
                R.drawable.gallery_photo_2,
                R.drawable.gallery_photo_3,
                R.drawable.gallery_photo_4,
                R.drawable.gallery_photo_5,
                R.drawable.gallery_photo_6,
                R.drawable.gallery_photo_7,
                R.drawable.gallery_photo_8
        };
--~--~---------~--~----~------------~-------~--~----~

3. canvas outside of onDraw()

4. Disabling Chat Notifications.

5. Relative Layout for a List Item

6. Spinner, how to change item text?

7. FTP use from Android