Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android: questions about ContentProvider

As I understand it, ContentProvider - is the data on the global level of the whole device?

The questions:

1) Is it possible to develop and distribute only ContentProvider (no Activity, ie not as a complete application, but only as data)? Does anybody do so? And when? As for the user it will look like? What is the difference between build of ContentProvider and build of normal application?

2) If another developer wants to use my ContentProvider, then how he will be able to access the column names and other data necessary to work with my ContentProvider? I have to give the library?

Sorry for my English.

Thanks

like image 313
leonidandand Avatar asked Feb 23 '26 23:02

leonidandand


1 Answers

1) Is it possible to develop and distribute only ContentProvider (no Activity,...

You have to add at least one Activity to your App to be launched by user.In fact forsecurityreason all services,receivers,... that you declare in manifest,will not register unless your App run explicitly by user and this needs to a Main/Launcher Activity.So you have to add such Activity to your App.

2) If another developer wants to use my ContentProvider,...

You have to publish documentation in about your App.

like image 130
hasanghaforian Avatar answered Feb 26 '26 15:02

hasanghaforian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!