1
내 응용 프로그램을 통해 whatsapp에 텍스트 + 이미지를 공유하려고합니다. 하지만 이미지를 공유 할 수 없으며 텍스트 만 공유됩니다. 이미지 영역은 공백으로 표시됩니다. 여기
내 코드 여기whatsapp에서 이미지와 텍스트를 함께 공유하십시오.
Uri uri = Uri.fromFile(new File(fname));
Intent share = new Intent();
share.setAction(Intent.ACTION_SEND);
share.setPackage("com.whatsapp");
share.putExtra(Intent.EXTRA_TEXT,ci.description);
share.putExtra(Intent.EXTRA_STREAM,uri);
share.setType("image/*");
share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
try {
context.startActivity(share);
}catch (Exception what){
Toast.makeText(context,"Whatsapp have not been installed",Toast.LENGTH_LONG).show();
}
내 스크린 샷이 사람이 나를 도울 수
이다?
Intent i = new Intent(Intent.ACTION_SEND);
i.setPackage("com.whatsapp");
i.setType("image/*");
i.putExtra(Intent.EXTRA_STREAM, getLocalBitmapUri(context, bitmap, id));
i.putExtra(Intent.EXTRA_TEXT, text);
context.startActivity(Intent.createChooser(i, "Share News"));
비트 맵 URI 코드 :
을 (있는 경우 파일 URI이를 건너) .고맙습니다 – Rajkumar