0

在我的 Android 应用程序中,我需要通过 Google 让手机“签入”以获取市场更新。这可以由用户通过打开拨号器并键入“ *#*#CHECKIN#*#*”来手动完成。我的应用程序需要能够做同样的事情。

我很肯定这是使用 Intent 完成的。一些挖掘表明警报管理器有这个待处理的意图等待:

  RTC_WAKEUP #5: Alarm{44b1ee18 type 0 com.google.android.server.checkin}
    type=0 when=1277981220358 repeatInterval=40212000 count=0
    operation=PendingIntent{44b256c0: PendingIntentRecord{44c26a80 com.google.android.server.checkin broadcastIntent}}

现在的问题是,如何让我的应用程序广播这种相同类型的 Intent?我在活动中尝试了 this.sendBroadcast(myIntent) 没有运气,所以我现在很困惑。

有什么想法吗?

4

2 回答 2

1

科利诺德尔,

startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:*%23*%232432546%23*%23*")));

我今天通过对 # 进行十六进制编码并调用拨号器得到它。Root66 给了我小费

案例

于 2010-07-06T00:35:14.927 回答
0

您不应该依赖此功能。这是一个未记录的 API,它没有记录是有原因的。

这可能(并且可能会)在 Android Market 应用程序的未来版本中发生变化。由于您的应用程序依赖于此功能,这意味着您的应用程序将中断。

于 2010-07-01T00:42:50.773 回答