Android Eliminate Complete Action Using dialog

时间秒杀一切 提交于 2019-12-22 13:48:03

问题


I have 2 apps and both integrate a package containing an activity. My problem is that when I launch any one app, and when it calls the activity inside the package, it shows me a dialog:

Complete action using:

App1

App2

I want to eliminate this dialog, so it just launches the activity from its own integrated package.

Currently, my AndroidManifest.xml contains for the package activity:

        <intent-filter>
            <action android:name="com.example.test.TestActivity" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>

Thanks Chris


回答1:


You will need to change the <intent-filter> for one of those two copies of the activity. Right now, both are advertising that they support the same action string. Change one to use a different action string. Or, don't use the action string in the Intent -- use new Intent(this, TestActivity.class) if the Java code is part of your application.



来源:https://stackoverflow.com/questions/3082077/android-eliminate-complete-action-using-dialog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!