Przycisk udostępniania jest wyszarzony i wyłączony

Mam następujący kod do otwarcia udziału, ale jest on wyłączony i nie można kliknąć.

@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.share, menu);

        return true;
    }
@Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home: 
                onBackPressed();
                break;
            case R.id.action_share:
                Intent share = new Intent(Intent.ACTION_SEND);
                share.setType("image/png");
                File folder = new File(Environment.getExternalStorageDirectory() + "/TESTFOLDER");
                if (!folder.exists()) {
                    folder.mkdir();
                }
                try {
                    if (file.exists()) {
                        share.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
                        startActivityForResult(Intent.createChooser(share, "Share Chart"), 1);
                    }
                    else {
                        //displayToast("Please save your image before sharing.");
                    }
                }
                catch (Exception e) {
                    e.printStackTrace();
                }
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
        return true;
    }

udostępnij xml:

<menu xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:id="@+id/action_share"
        android:showAsAction="always"
        android:title="Share"
        android:actionProviderClass="android.widget.ShareActionProvider" />
</menu>

Ikona udostępniania jest wyłączona na moim pasku działań:

questionAnswers(1)

yourAnswerToTheQuestion