简体   繁体   中英

Remove my application from “Complete action using”

In my application I have two buttons, one is to open the device's camera and the other to open my applications camera. I'm giving the user the option to choose which one they would like to use.

This is how I open the devices camera:

Uri videoUri = FileProvider.getUriForFile(this, getApplicationContext().getPackageName() + ".provider", filePlusName);
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.putExtra(MediaStore.EXTRA_OUTPUT, videoUri);
startActivityForResult(intent, VIDEO_REQUEST_CODE);

a "Popup" will appear, asking me to choose a camera application - Complete action using .

The problem is that my applications camera is one of the options. I would like to remove my app's camera from this options.

Is it possible to remove my application from the Complete action using popup?

Check you AndroidManifest. I think one of your app activity is registered to do the capture intent action.

Look for these intent actions- if anyone exists, remove it-

    <intent-filter>
        <action android:name="android.media.action.IMAGE_CAPTURE"/>
        <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>
    <intent-filter>
        <action android:name="android.media.action.STILL_IMAGE_CAMERA"/>
        <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>
    <intent-filter>
        <action android:name="android.media.action.VIDEO_CAMERA"/>
        <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>

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