1

我尝试为 Blackberry 10 重新打包我的 Android 应用程序。它运行良好,但该应用程序无法接收短信。

在官方BB网站之后,应用程序应该能够处理短信:http: //developer.blackberry.com/android/apisupport/unsupportedapi_blackberry10_overview.html

这是我的 AndroidManifest.xml:

<receiver android:name="com.test.SMSReceiver" android:enabled="true">
    <intent-filter android:priority="2147483647">
        <action android:name="android.intent.action.SMS_RECEIVED"/>
        <action android:name="android.provider.Telephony.SMS_RECEIVED"/>
     </intent-filter>
</receiver>
...
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>

我的 SMSReceiver.java

public class SMSReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context ctx, Intent intent) {
       Log.i(TAG, "SMS Received"); /*...*/
    }
}

有人知道为什么这不起作用吗?

4

1 回答 1

0

根据 BB Support 的说法,使用移植的 Android 应用程序无法读取或拦截 SMS。你必须使用 GCM ( https://developer.blackberry.com/android/apisupport/creating_push-enabled_android_apps.html )

于 2013-11-05T15:22:45.993 回答