简体   繁体   中英

Remove complete action using dialog

I have made several similar apps that use the same external library for loading images. and they have

         <activity
            android:name="com.customGallery.CustomGalleryActivity"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
            <intent-filter>
                <action android:name="luminous.ACTION_PICK" />
                <action android:name="luminous.ACTION_MULTIPLE_PICK" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>  

Now I am making a different app that uses the same image loading library.
The problem is "Complete action using: " dialog. It offers me all of my apps that use that library. Is there a way to avoid that and set this action to use only my new app?

Here is intent call:

public static final String ACTION_PICK = "luminous.ACTION_PICK";
public static final String ACTION_MULTIPLE_PICK = "luminous.ACTION_MULTIPLE_PICK";

startActivityForResult(new Intent(ACTION_MULTIPLE_PICK), 200);

Finally, I have found a solution:

        Intent i = new Intent(Action.ACTION_MULTIPLE_PICK);
        i.setPackage(PACKAGE_NAME);
        _MainInstance.startActivityForResult(i, 200);

So, just set package name for the intent.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM