For the sake of completeness: this is some code that looks for new
subscription / invite events:

Handler handler = new Handler();
ContentObserver co1 = new ContentObserver(handler) {
  @Override
  public void onChange(boolean selfChange) {
    super.onChange(selfChange);
    Toast.makeText(Friends.this, "subscriptions updated",
Toast.LENGTH_LONG);
  }
};
getContentResolver().registerContentObserver(android.provider.Im.Subscriptions.CONTENT_URI,
true, co1);

ContentObserver co2 = new ContentObserver(handler) {
  @Override
  public void onChange(boolean selfChange) {
    super.onChange(selfChange);
    Toast.makeText(Friends.this, "invitations updated",
Toast.LENGTH_LONG);
  }
};
getContentResolver().registerContentObserver(android.provider.Im.Invitation.CONTENT_URI,
true, co2);

No Toasts are ever displayed ..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to