This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
Enhance contentproviders
PerfectCarl edited this page Dec 29, 2013
·
8 revisions
Since AndroidAnnotations 2.4
You can enhance an Android Content Provider with the @EProvider
annotation:
@EProvider
public class MyContentProvider extends ContentProvider {
}
You can then start using most AA annotations, except the ones related to views and extras:
@EProvider
public class MyContentProvider extends ContentProvider {
@SystemService
NotificationManager notificationManager;
@Bean
MyEnhancedDatastore datastore;
@OrmLiteDao(helper = DatabaseHelper.class, model = User.class)
UserDao userDao;
@UiThread
void showToast() {
Toast.makeText(getContext().getApplicationContext(), "Hello World!", Toast.LENGTH_LONG).show();
}
// ...
}
19/11/2020 The 4.8.0 release is out !
- Get started!
- Cookbook, full of recipes
- Customize annotation processing
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow
- Ask on Gitter