关闭

AndroidAnnotations——Enhance broadcastreceivers优化广播接收器

标签: AndroidAnnotation
774人阅读 评论(0) 收藏 举报
分类:

Enhance broadcastreceivers优化广播接收器

Since AndroidAnnotations 2.4


You can enhance an Android BroadcastReceiver with the @EReceiver annotation:
你可以使用@EReceiver 优化Android广播接收器:

@EReceiver
public class MyReceiver extends BroadcastReceiver {

}

You can then start using most AA annotations, except the ones related to views and extras:
然后,除了Views和extras相关的注解,你可以使用大多数AA的其他注解:

@EReceiver
public class MyReceiver extends BroadcastReceiver {

  @SystemService
  NotificationManager notificationManager;

  @Bean
  SomeObject someObject;
  
}
1
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:65340次
    • 积分:1166
    • 等级:
    • 排名:千里之外
    • 原创:17篇
    • 转载:7篇
    • 译文:33篇
    • 评论:16条
    最新评论