android.provider.Telephony.SMS_RECEIVED怎么在api中找不到呢

GeekQing 2011-08-12 08:05:56
如题....
android.provider这个包里面根本就没有Telephony这个类啊...求高手指点...
还有android.intent.action.BATTERY_CHANGED 、 android.intent.action.BOOT_COMPLETED
...全文
3734 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wenzheng38 2011-08-13
  • 打赏
  • 举报
回复
顶++

一般所有的广播都在Intent里定义了的
DrSmart 2011-08-13
  • 打赏
  • 举报
回复
ACTION_PRE_BOOT_COMPLETED是公开的,涉及电话的一般为隐藏类
hijovi 2011-08-13
  • 打赏
  • 举报
回复
汗!!!!

隐藏不是说文件隐藏。。

是使用了9
/**
40
* The Telephony provider contains data related to phone operation.
41
*
42
* @hide
43
*/

@hide 隐藏标签。。
表示不对外公开 内部使用

文件应该在 /frameworks/base/core/java/android/provider/Telephony.java
GeekQing 2011-08-13
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 hijovi 的回复:]

呃。。这个在源码里。

android-2.2-froyo/android/provider/Telephony.java
Telephony.java 是隐藏的。。所以看不到


请问我把源码调出来,然后文件查看调成隐藏可见,为什么还是看不到这个类呢,而且为什么这个action常量要定义在Telephony中啊?
hijovi 2011-08-12
  • 打赏
  • 举报
回复
呃。。这个在源码里。

android-2.2-froyo/android/provider/Telephony.java
Telephony.java 是隐藏的。。所以看不到

/***
0519
* Broadcast Action: A new text based SMS message has been received
0520
* by the device. The intent will have the following extra
0521
* values:</p>
0522
*
0523
* <ul>
0524
* <li><em>pdus</em> - An Object[] od byte[]s containing the PDUs
0525
* that make up the message.</li>
0526
* </ul>
0527
*
0528
* <p>The extra values can be extracted using
0529
* {@link #getMessagesFromIntent(Intent)}.</p>
0530
*
0531
* <p>If a BroadcastReceiver encounters an error while processing
0532
* this intent it should set the result code appropriately.</p>
0533
*/
0534
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
0535
public static final String SMS_RECEIVED_ACTION =
0536
"android.provider.Telephony.SMS_RECEIVED";
0537




public static final String ACTION_BATTERY_CHANGED = "android.intent.action.BATTERY_CHANGED";
public static final StringACTION_PRE_BOOT_COMPLETED="android.intent.action.PRE_BOOT_COMPLETED";
都是在Intent类里啊


80,351

社区成员

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

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