I face really frustrating problem.
I created SMS receiver as most online and book's tutorials say.
AndroidManifest.xml:
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<application android:name="roboguice.application.RoboApplication"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:debuggable="true" >
<!-- ... other stuffs here ... -->
<receiver android:name=".receivers.SmsReceiver">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
</application>
SmsReceiver.java:
public class SmsReceiver extends BroadcastReceiver {
public static final String TAG = "SmsReceiver";
@Override
public void onReceive(Context context, Intent intent) {
Log.d(TAG, "SMS received!");
Toast.makeText(context, "SMS received.", Toast.LENGTH_LONG).show();
}
}
While it works correctly on Emulator (Android 2.2) it doesn't work on my HTC Wildfire (Android 2.2.1, not rooted).
The main problem is that I'm new into Android deveopment and I have completely no idea how to debug it.
Can I find out something usefull with LogCat logs sendt from my HTC device while it receives SMS message? Why is my device different!?