【发布时间】:2015-07-27 07:34:05
【问题描述】:
我知道如何使用 Manifest 文件中的秘密代码,它与此源代码配合得很好:
<receiver android:name="receivers.SecretCodeReceiver">
<intent-filter>
<action android:name="android.provider.Telephony.SECRET_CODE" />
<data
android:host="666"
android:scheme="android_secret_code" />
</intent-filter>
</receiver>
但是,我如何从源代码更改主机?可能吗 ?我试过这个:
sendBroadcast(new Intent("android.provider.Telephony.SECRET_CODE", Uri.parse("android_secret_code://"+code)));
但没有运气。
【问题讨论】: