From: tobiasKaminsky Date: Mon, 2 Nov 2015 08:01:08 +0000 (+0100) Subject: wip X-Git-Tag: beta-20151124~7^2~9 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/bdf8a5cb8d4072bc5f6e3704184b2d08c913f59e wip --- diff --git a/res/values/setup.xml b/res/values/setup.xml index 76bdd9f8..7363b4db 100644 --- a/res/values/setup.xml +++ b/res/values/setup.xml @@ -46,7 +46,7 @@ true true http://owncloud.com/mobile/help - + / "mailto:" "mailto:apps@owncloud.com" "https://play.google.com/store/apps/details?id=com.owncloud.android" diff --git a/src/com/owncloud/android/files/FileOperationsHelper.java b/src/com/owncloud/android/files/FileOperationsHelper.java index e7d9dfe5..48fe1191 100644 --- a/src/com/owncloud/android/files/FileOperationsHelper.java +++ b/src/com/owncloud/android/files/FileOperationsHelper.java @@ -40,6 +40,7 @@ import com.owncloud.android.files.services.FileUploader.FileUploaderBinder; import com.owncloud.android.lib.common.network.WebdavUtils; import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.resources.status.OwnCloudVersion; +import com.owncloud.android.providers.FileContentProvider; import com.owncloud.android.services.OperationsService; import com.owncloud.android.services.observer.FileObserverService; import com.owncloud.android.ui.activity.FileActivity; @@ -243,11 +244,12 @@ public class FileOperationsHelper { String encodedStoragePath = WebdavUtils.encodePath(storagePath); Intent sendIntent = new Intent(Intent.ACTION_ATTACH_DATA); // set MimeType -// sendIntent.setType(file.getMimetype()); + sendIntent.setType(file.getMimetype()); + sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("content://" + FileContentProvider.AUTHORITY + file.getRemotePath())); // sendIntent.setData(Uri.parse(encodedStoragePath)); // sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(encodedStoragePath)); - sendIntent.setDataAndType(Uri.parse(encodedStoragePath), "image/*"); - sendIntent.putExtra("jpg", "image/*"); +// sendIntent.setDataAndType(Uri.parse(encodedStoragePath), "image/*"); +// sendIntent.putExtra("jpg", "image/*"); // sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + encodedStoragePath)); // sendIntent.putExtra("jpg", "image/*"); diff --git a/src/com/owncloud/android/providers/FileContentProvider.java b/src/com/owncloud/android/providers/FileContentProvider.java index 609c07ca..990d4b43 100644 --- a/src/com/owncloud/android/providers/FileContentProvider.java +++ b/src/com/owncloud/android/providers/FileContentProvider.java @@ -60,6 +60,7 @@ import android.text.TextUtils; public class FileContentProvider extends ContentProvider { private DataBaseHelper mDbHelper; + public static final String AUTHORITY = "org.owncloud"; // Projection for filelist table private static HashMap mFileProjectionMap;