forked from androidannotations/androidannotations
-
Notifications
You must be signed in to change notification settings - Fork 0
Enhancing the Application class
Pierre-Yves Ricau edited this page Feb 2, 2012
·
3 revisions
Since AndroidAnnotations 2.4
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;
@Bean
MyEnhancedDatastore datastore;
@RestService
MyService myService;
@Background
void initSomeStuff() {
// init some stuff in background
}
}03/30/2012 The 2.5.1 release is out
- Get started!
- Cookbook, full of recipes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue