I am porting an application to SDK 1.5 and I have problems with Intents .
In one activity I want to send an intent and I write :

Intent intent = new Intent(REFRESH_SEARCH_LIST);
intent.putExtra("searchResults", this.placeMarks);
PendingIntent.getBroadcast(this.activity, 0, intent, 0);

In another activity I want to cath this intent and first I write in
onCreate of this activity :

this.myIntentFilter.addAction(REFRESH_SEARCH_LIST);
this.myIntentReceiver = new MyIntentReceiver();
this.registerReceiver(this.myIntentReceiver, this.myIntentFilter);
Log.e("SendIntent", "REFRESH_SEARCH_LIST");

And I define the class MyIntentReceiver as :

class MyIntentReceiver extends BroadcastReceiver {
                private boolean active;

                @Override
                public void onReceive(Context context, Intent intent) {
                        String action = intent.getAction();
                        if (action.equals(REFRESH_SEARCH_LIST)) {
                                Log.e("INTENTRECEIVER", "REFRESH_SEARCH_LIST");
                         }
               }

Then I launch the app and I open log by adb logcat in a window

I get SendIntent REFRESH_SEARCH_LIST
but not INTENTRECEIVER REFRESH_SEARCH_LIST

Any Idea welcome

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to