공유 의도가 있습니다. 사용자는 다른 앱의 이미지, 비디오 및 텍스트를 공유 할 수 있습니다. 사용자가 사용자의 사진 갤러리에서 10 개 이상의 이미지를 선택하지 못하게합니다.Android 사진 갤러리에서 공유 사진 옵션을 변경하려면 어떻게해야하나요?
ShareActivity 내부에서 (sharedMessagesControl)이 함수를 조사했지만 다른 실용적인 솔루션을 확인하고 싶습니다. 활동 화면이 열리기 전에이를 어떻게 확인할 수 있습니까? 사진 갤러리 화면에서 이것을 제어 할 수있는 방법이 있습니까? 어떻게해야합니까?
매니페스트 :
ShareActivity(){
private void sharedMessagesControl() {
sharedIntent = getIntent();
try {
if ((sharedIntent != null) && (sharedIntent.getType() != null) &&
((sharedIntent.getPackage() == null) || (!sharedIntent.getPackage().equals(getPackageName())))) {
String receivedType = sharedIntent.getType();
String action = sharedIntent.getAction();
if (action != null && (action.equalsIgnoreCase(Intent.ACTION_SEND_MULTIPLE) || action.equalsIgnoreCase("android.intent.action.SEND_MULTIPLE"))) {
ArrayList<Uri> uris = sharedIntent.getParcelableArrayListExtra(Intent.EXTRA_STREAM);
if (uris != null && receivedType.contains("image/")) {
if (uris.size() > MAX_IMAGE_MEDIA_LIMIT) {
sharedIntent = null;
new MyToast(R.string.max_limit_image, MyToast.Length.Short);
}
}
}
}
} catch (Exception e) {
Mylog.printStackTrace(TAG + " shareMessageControl error ", e);
}
}
무엇을 의도적으로 확인합니까? –
다른 실용적인 솔루션. 내 편집 된 답변을 보시기 바랍니다 – propoLis
갤러리의 의도가 실제로 열리기 전에 갤러리에 10 개 이상의 이미지가 있는지 확인하고 싶다는 의미로 문제가 발생하지 않습니까? –