怎样调用Android手机右上角状态栏的闹钟图标

dongge416 2012-06-15 09:42:26
最近在写一个闹钟的小应用,基本功能都可以实现了,但是不知道怎样显示Android手机右上角状态栏的闹钟图标,请各位高手帮帮忙,教教我,thanks!!!
...全文
1006 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
u010332838 2014-03-28
  • 打赏
  • 举报
回复
好使,牛逼,非常好,很好
Code271490 2013-12-23
  • 打赏
  • 举报
回复
引用 8 楼 huashuncai123 的回复:
[quote=引用 6 楼 laigb 的回复:] /** * Tells the StatusBar whether the alarm is enabled or disabled */ private static void setStatusBarIcon(Context context, boolean enabled) { Intent alarmChanged = new Intent("android.intent.action.ALARM_CHANGED"); alarmChanged.putExtra("alarmSet", enabled); context.sendBroadcast(alarmChanged); }
谢了![/quote] 楼主这个方法有用么?
华溢澄 2013-12-22
  • 打赏
  • 举报
回复
引用 6 楼 laigb 的回复:
/** * Tells the StatusBar whether the alarm is enabled or disabled */ private static void setStatusBarIcon(Context context, boolean enabled) { Intent alarmChanged = new Intent("android.intent.action.ALARM_CHANGED"); alarmChanged.putExtra("alarmSet", enabled); context.sendBroadcast(alarmChanged); }
谢了!
凉凉二点凉 2013-03-05
  • 打赏
  • 举报
回复
引用 3 楼 dongge416 的回复:
谢谢,但是百度上通过NotificationManager服务发送Notification的文章都是现实状态栏左上角的,这个我懂,就是不懂怎样调用状态栏右上角的图标,NotificationManager这个可以调用右上角的图标吗?
it's impossible 那是系统调用的,app只能弄弄notification.
laigb 2013-03-05
  • 打赏
  • 举报
回复
/** * Tells the StatusBar whether the alarm is enabled or disabled */ private static void setStatusBarIcon(Context context, boolean enabled) { Intent alarmChanged = new Intent("android.intent.action.ALARM_CHANGED"); alarmChanged.putExtra("alarmSet", enabled); context.sendBroadcast(alarmChanged); }
dongge416 2012-06-15
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

同学,通过NotificationManager服务发送Notification。
你百度一下相关内容。
[/Quote]
谢谢,但是百度上通过NotificationManager服务发送Notification的文章都是现实状态栏左上角的,这个我懂,就是不懂怎样调用状态栏右上角的图标,NotificationManager这个可以调用右上角的图标吗?
dongge416 2012-06-15
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 的回复:]

可以参考下系统自带的闹钟.apk的源码
[/Quote]


请问2楼,哪里有系统自带的闹钟的源码呢?
dongge416 2012-06-15
  • 打赏
  • 举报
回复
谢谢,但是百度上通过NotificationManager服务发送Notification的文章都是现实状态栏左上角的,这个我懂,就是不懂怎样调用状态栏右上角的图标,NotificationManager这个可以调用右上角的图标吗?
xueyouyi1986 2012-06-15
  • 打赏
  • 举报
回复
可以参考下系统自带的闹钟.apk的源码
huanai2000 2012-06-15
  • 打赏
  • 举报
回复
同学,通过NotificationManager服务发送Notification。
你百度一下相关内容。

80,492

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧