forked from androidannotations/androidannotations
-
Notifications
You must be signed in to change notification settings - Fork 0
Enhancing the Application class
pyricau edited this page Jan 26, 2012
·
6 revisions
Since AndroidAnnotations 2.3
You can enhance your Android Application class with the @EApplication annotation:
@EApplication
public class MyApplication extends Application {
}You can then start using most AA annotations, except the ones related to views and extras:
@EApplication
public class MyApplication extends Application {
public void onCreate() {
super.onCreate();
initSomeStuff();
}
@SystemService
NotificationManager notificationManager;
@Inject
MyEnhancedDatastore datastore;
@RestService
MyService myService;
@Background
void initSomeStuff() {
// init some stuff in background
}
}14/06/2012 The 2.6 release is out
- Get started!
- Cookbook, full of recipes
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow