I tried to repackage my Android App for Blackberry 10. It worked pretty well, but the app is unable to receive SMS.
After the official BB website the Apps should be able to handle SMS: http://developer.blackberry.com/android/apisupport/unsupportedapi_blackberry10_overview.html
This is my 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>
My SMSReceiver.java
public class SMSReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context ctx, Intent intent) {
Log.i(TAG, "SMS Received"); /*...*/
}
}
Does anybody have a clue why this does not work?
According to the BB Support reading or intercepting SMS is not possible using a ported Android application. You have to use GCM ( https://developer.blackberry.com/android/apisupport/creating_push-enabled_android_apps.html )