T
T
TimkaTV2015-05-17 23:15:11
Android
TimkaTV, 2015-05-17 23:15:11

How to implement multiple actions for 1 activity?

Good afternoon, I would like to ask a question. Is it possible to implement multiple actions for one Activity?
Tried like this:

<activity
            android:name="project.cvnbn.sdfsdg.tessdf.HomeActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN|android.intent.action.VIEW" />
                <category android:name="android.intent.category.LAUNCHER|android.intent.category.DEFAULT" />
                <data android:scheme="content" android:host="project.space.open.openspace.hash"/>
            </intent-filter>
        </activity>

He does not like this design (android.intent.action.MAIN | android.intent.action.VIEW)
Thanks for the help!
%%%%%%%
Thank you for your reply! It works without errors, but the application shortcut is not created (apparently it overlaps
android.intent.action.MAIN and android.intent.category.LAUNCHER). How can this be avoided?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
TimkaTV, 2015-05-17
@TimkaTV

Thanks for the answers Scorpi .
Managed to do this:

<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.VIEW" />
                <category android:name="android.intent.category.DEFAULT"/>
                <data android:scheme="content" android:host="project.space.open.openspace.hash"/>
            </intent-filter>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question