工作空间 v3.6.5.2版本的 MD5 值为:58e65af156c65a63bf64ed2e64960853
以下内容为反编译后的 ShareUtil.java 源代码,内容仅作参考
package com.uusafe.filemanager.Utils;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import com.uusafe.h5app.library.api.IConstants;
import java.util.ArrayList;
public class ShareUtil {
private static final String EMAIL_ADDRESS = "1234@163.com";
public static void sendEmail(Context context, String str) {
context.startActivity(Intent.createChooser(new Intent("android.intent.action.SENDTO", Uri.parse("mailto:1234@163.com")), str));
}
public static void sendMoreImage(Context context, ArrayList<Uri> arrayList, String str) {
Intent intent = new Intent();
intent.setAction("android.intent.action.SEND_MULTIPLE");
intent.putParcelableArrayListExtra("android.intent.extra.STREAM", arrayList);
intent.setType(IConstants.ACCEPT_TYPE_IMAGE);
context.startActivity(Intent.createChooser(intent, str));
}
public static void shareFile(Context context, Uri uri, String str) {
Intent intent = new Intent("android.intent.action.SEND");
intent.setType(IConstants.ACCEPT_TYPE_ALL);
intent.putExtra("android.intent.extra.STREAM", uri);
context.startActivity(Intent.createChooser(intent, str));
}
public static void shareFileList(Context context, ArrayList<Uri> arrayList, String str) {
Intent intent = new Intent("android.intent.action.SEND_MULTIPLE");
intent.putParcelableArrayListExtra("android.intent.extra.STREAM", arrayList);
intent.setType(IConstants.ACCEPT_TYPE_ALL);
context.startActivity(Intent.createChooser(intent, str));
}
public static void shareImage(Context context, Uri uri, String str) {
Intent intent = new Intent("android.intent.action.SEND");
intent.setType(IConstants.ACCEPT_TYPE_IMAGE);
intent.putExtra("android.intent.extra.STREAM", uri);
context.startActivity(Intent.createChooser(intent, str));
}
public static void shareText(Context context, String str, String str2) {
Intent intent = new Intent("android.intent.action.SEND");
intent.setType("text/plain");
intent.putExtra("android.intent.extra.TEXT", str);
context.startActivity(Intent.createChooser(intent, str2));
}
}