Thank you Xavier. I was able to install the program manually using the
adb tool. I verified that it was installed using the package browser
in the dev tools program. I still cannot get the program to verify SMS
intents. I modified the manifest file to include logisic's above
mentioned change as well as insert log messages into the onReceive
method before any checks are done. Still nothing. I can't even verify
that the intent if firing at all by viewing the DDMS log cat screen.
Is there a way to monitor intents whether they have a registered
receiver or not? Here's my new code:

Manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
    package="org.androidforgods.samples.SMSCapture">
    <application android:icon="@drawable/icon">
            <receiver android:name=".SmsIntentReceiver"
android:enabled="true">
                    <intent-filter>
                                <action
                                        
android:name="android.intent.action.GET_CONTENT"
                                        
android:value="android.provider.Telephony.SMS_RECEIVED" />
                        </intent-filter>
                </receiver>
        </application>
        <uses-permission android:name="android.permission.RECEIVE_SMS">
        </uses-permission>
</manifest>

SmsIntentReceiver.java

package org.androidforgods.samples.SMSCapture;

import android.content.Context;
import android.content.Intent;
import android.content.IntentReceiver;
import android.util.Log;

public class SmsIntentReceiver extends IntentReceiver {

        private final String ACTION =
                "android.provider.Telephony.SMS_RECEIVED";

        @Override
        public void onReceiveIntent(Context context, Intent intent) {
                Log.i("test", "SMS Intent Receiver onReceive started.");
                if(intent.getAction().equals(ACTION)) {
                        Log.i("test","Intent detected as being SMS");
                }

        }

}


On Apr 11, 4:05 pm, "Xavier Ducrohet" <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 11, 2008 at 11:02 AM, jcmb <[EMAIL PROTECTED]> wrote:
>
> >  I am trying to install an app that only contains an SMS intent
> >  receiver, but I cannot get it to fire when I send the device a test
> >  message. If I try to run an intent receiver in Eclipse, it
> >  gives me an error "The Manifest defines no activity! Launch aborted!"
>
> This is a known limitation of the current plugin. The next version
> will let you work with projects that have no activities.
>
> Xav
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to