Can Intent be used to provide data to a ContentProvider? Why or why not?

1 votes
124 views
Harsh kumar srivastava asked 10-Jan-2018 in Technology by Harsh kumar srivastava

Can Intent be used to provide data to a ContentProvider? Why or why not?

1 Answer

1 votes
Prateek sharma answered 10-Jan-2018 by Prateek sharma

no the data to content provider can be provided by the use of content resolver, not by an intent.

the reason is that intent can be used to provide data to other activity and a content provider can only accept data in the form of content URI. so you need to build a content URI which may be in the form -

content://com.example.app.provider/table