Hi,
i tried to create a contentobserver for database,but when the
tables changed, it did not work in my activity.
is the Uri wrong?
here is a mycode:
public static final String AUTHORITY =
"com.app.provider.myapp";
public static final Uri CONTENT_URI= Uri.parse("content://" +
AUTHORITY + "/mytable");
class DownloadsChangeObserver extends ContentObserver {
public DownloadsChangeObserver(Handler handler) {
super(new Handler());
setTitle("enter!");
}
@Override
public void onChange(boolean selfChange) {
setTitle("changed!");
}
}
getContentResolver().registerContentObserver(CONTENT_WIFI,true,new
DownloadsChangeObserver(new Handler()));
I don't know where is wrong in my code,hope for help !Thank you!
--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---