Hello group:
                 I`m trying to develop an application, just to test
the ability of android to call an activity with an intent based not in
the specific class name but specifying the action, category and data
information. Acording to this link

http://developer.android.com/guide/topics/intents/intents-filters.html

 only three aspects are consulted when comparing an intent object to
select the future activity to run.
I created two android projects (and two activities),  the first is the
main project who sends the request and the second can be called
directly or through the filter.
This is the call of the activity in the main project:

        Intent t3 = new Intent();
                        t3.setAction(Intent.ACTION_EDIT);
                        t3.addCategory(Intent.CATEGORY_HOME);
                        t3.setData(Uri.parse("http://www.yahoo.com.ar";));
                        try{
                        startActivity(t3);
                        }catch(ActivityNotFoundException e){
                                e.printStackTrace();

                        }

This is the part of the manifest that specifies (or at least I try to
specify) in the secondary activity that it`s available to be selected
to run with that information:

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                                <action 
android:name="android.intent.action.EDIT" />
                                <category 
android:name="android.intent.category.HOME" />
                                <data android:scheme="http"/>
                        </intent-filter>

I installed both separatelly and I was expecteing to see the second
activity after the called but instead I got an
ActivityNotFoundException. By the way if I comment the t3.addCategory
(Intent.CATEGORY_HOME); line and change the t3.setAction
(Intent.ACTION_EDIT); to t3.setAction(Intent.ACTION_VIEW); the browser
is executed so I think the problem is in the manifest of the second
activity.
If you know what the problem may be I ll  apreciate any comments
If you need more information to help me pls do not hesitate to ask
Thanks in Advance
Claudio
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to