BroadcastReceiver and onRestart

by RyJan » Sat, 07 Mar 2009 10:53:19 GMT

Sponsored Links
 I have an app that has an integrated BroadcastReceiver to handle
incoming calls.  That BCR interacts with the NotificationManager to
post text to the notification bar on the top of the screen.

In previous versions it seemed that when the user would use the
Notification drag-down to get into my App, the onCreate method would
be called essentially re-initializing my app.

In 1.1 this doesn't seem to happen, i need to manually refresh my app
to list new data.

I was curious if its was ok to override the OnRestart() method in my
activity to refresh my data list?

or is there a better way to let my activity know through the
BroadcastReceiver that it needs to look for new data?


Other Threads

1. key code constant for question mark?

I don't see an android.view.KeyEvent.KEYCODE constant defined for
question mark (key code 76).  Is there a key code constant defined for
the question mark?

Best regards,

2. include xml argument

i have some layout xml that looks like this:

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

I want to include that in some other layout xml, so I do this --

== file2.xml ==
<include layout="@layout/file1.xml"/>

The question I have is how to pass arguments (and refer to them) from
file2.xml to file1.xml.

So, for example:

== file1.xml ==
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout ...>
  <TextView android:text="@text" android:layout_width="fill_parent"

== file2.xml ==
<include layout="@layout/file1.xml" text="abc"/>

is this possible?


3. Two applications, same package. How?

4. getApplitcationContext() vs this vs ActivityClassName.this

5. JOIN Contacts.People and Contacts.People.Phones

6. getApplitcationContext() vs this vs ActivityClassName.this

7. Getting the contents of android.R.attr.listPreferredItemHeight (& other dimensional system resources?)