How can i share apk file in my app (send app itself)
问题 I am trying to use this code to send my application apk file to another device: public static void sendAppItself(Activity paramActivity) throws IOException { PackageManager pm = paramActivity.getPackageManager(); ApplicationInfo appInfo; try { appInfo = pm.getApplicationInfo(paramActivity.getPackageName(), PackageManager.GET_META_DATA); Intent sendBt = new Intent(Intent.ACTION_SEND); sendBt.setType("*/*"); sendBt.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + appInfo.publicSourceDir));