[android-developers] Re: sharing database across applications

2009-08-21 Thread Lukeci


why no accessing contacts.db by ContactsProvider directly?
If any changed , using   ContentObserver to receive changes.


On 8月11日, 下午1時13分, Acchao blazin...@gmail.com wrote:
 What's the most convenient way to share adatabaseacross
 applications?
 For example, I want my application's dbadapter to query theandroid's
 native contactdatabaseso when a contact on the phone is deleted,
 similarly that contact is removed from my application.

 Should i use anattachstatement toattachthe table? Or would the
 better/more secure approach be to create a custom contentprovider
 query onCreate of my app to verify all contacts in my application
 still reside on the Contacts.db ?

 Any help or suggestions would be appreciated. Thanks in advance.

 Best,
 Acchao

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sharing database across applications

2009-08-16 Thread Kenny

How to make a custom content provider? Can you give me an example?

Now I am trying to extend ContactsProvider, because it can't give me
the approach to the last modified contact record. So I wonder if I can
create a custom contact provider.

Or anyone knows how to find out the last modified contact?

On Aug 11, 2:01 pm, Sujay Krishna Suresh sujay.coold...@gmail.com
wrote:
 My suggestion'd be to go for the custom content provider.
 That'd make things much easier for u...
 But thats me. It depends on ur application  its current architecture.





 On Tue, Aug 11, 2009 at 10:43 AM, Acchao blazin...@gmail.com wrote:

  What's the most convenient way to share a database across
  applications?
  For example, I want my application's dbadapter to query the android's
  native contact database so when a contact on the phone is deleted,
  similarly that contact is removed from my application.

  Should i use an attach statement to attach the table? Or would the
  better/more secure approach be to create a custom contentprovider
  query onCreate of my app to verify all contacts in my application
  still reside on the Contacts.db ?

  Any help or suggestions would be appreciated. Thanks in advance.

  Best,
  Acchao

 --
 Regards,
 Sujay
 Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html
 - Computers are useless. They can only give you answers.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sharing database across applications

2009-08-11 Thread Sujay Krishna Suresh
My suggestion'd be to go for the custom content provider.
That'd make things much easier for u...
But thats me. It depends on ur application  its current architecture.

On Tue, Aug 11, 2009 at 10:43 AM, Acchao blazin...@gmail.com wrote:


 What's the most convenient way to share a database across
 applications?
 For example, I want my application's dbadapter to query the android's
 native contact database so when a contact on the phone is deleted,
 similarly that contact is removed from my application.

 Should i use an attach statement to attach the table? Or would the
 better/more secure approach be to create a custom contentprovider
 query onCreate of my app to verify all contacts in my application
 still reside on the Contacts.db ?

 Any help or suggestions would be appreciated. Thanks in advance.

 Best,
 Acchao

 



-- 
Regards,
Sujay
Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html
- Computers are useless. They can only give you answers.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---