Catch system events

Put your problem here if it does not fit any of the other categories.

Catch system events

Postby lukkee » Tue Jun 22, 2010 2:22 pm

Hi all,

I'm a newbie in java development, but i'm a expert in c# .. So I hope there aren't to much differents between these two languages. ;)

My Questions.. Is it possible to intercept the System Events when i add a new contact or a task.

For example i add a new contact once my app should catch the event.. -> a new contact added. or if its a new task.. -> a new task added.

Is it possible ?If yes, could u give me some tips?

Would be great ands sry for my english

best regards
luke
lukkee
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Jun 22, 2010 1:53 pm

Top

Re: Catch system events

Postby anarche » Wed Jun 23, 2010 12:45 am

There are no system events when you add a contact - the contacts are written directly to database.

There is a listener you can register for a ContentProvider dataset, but that is the dataset returned from a query to the database, not actual changes to the DB itself.

See http://developer.android.com/guide/topi ... iders.html for how to access the system databases

Lastly - to answer the original question - I do not think you can register any listener for any system events - that would be a bit of a security issue. ADB can catch system events, but on a non-rooted phone I don't think you can do this programmatically.

Any correction welcome here, guys.
anarche
Master Developer
Master Developer
 
Posts: 369
Joined: Sun Apr 11, 2010 5:21 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 22 guests