temp

 http://blog.csdn.net/ai_ma_ai/article/details/68067756?locationNum=8&fps=1

 

    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;
        }
    }

 

        Intent intent = getIntent();
        String action = intent.getAction();
        Log.i(TAG, "action:" + action);

 

 

 

    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);
    }

 

posted @ 2017-05-23 23:46  牧 天  阅读(186)  评论(0编辑  收藏  举报