首页 > 代码库 > temp

temp

 

 

    public boolean isUriReturnedForThirdApp() {
        String action = getIntent().getAction();
        if (action != null) {
            return action.equals(Intent.ACTION_GET_CONTENT)
                    || action.equals(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
        } else {
            return false;
        }
    }

 

    private void selectFile() {
        Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
        intent.addCategory(Intent.CATEGORY_OPENABLE);
        intent.setType("text/comma-separated-values");
        intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
        startActivityForResult(intent, CODE_SELECT_FILE);
    }

 

temp