안녕하세요. 최근 안드로이드 api 24 이후, 예전에는 wechat에서 동영상 파일이 share 되었었는데 지금 안되어 다시 구현하고 있습니다.
바뀐 방법으로 카카오톡, Line 등에서는 잘 공유되는데 wechat 에서는 파일이 공유되지않고 있습니다.
이용하고 있는 코드는 아래와 같습니다.
public void ShareVideo(String path) {
Intent shareIntent = new Intent(Intent.ACTION_SEND);
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) + "/" + path);
Uri uri = FileProvider.getUriForFile(this, getString(R.string.file_provider_authority), file);
shareIntent.setType("video/*");
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(shareIntent, "test"));
}
구글링등을 해보면 wechat 에서 action_send 에 대응하는 것이 다르다고만하고 어떻게 처리해야할 지에
대해서는 찾지를 못하겠네요.
아시는 분 계시면 좀 도와주시기 바랍니다.
감사합니다~