android-sharing

Share Intent of Google+ can not access image

十年热恋 提交于 2019-12-02 19:27:45
i am calling an intent to share an image. this works with most providers, BUT with Google+. Google+ opens the post activity without the image and displays the toast "You can only post photos stored on your device." at the same time. File f = storeImage(image); // f = /data/data/com.myapp/files/1333070776978.jpg Uri uri = Uri.fromFile(f); Intent share = new Intent(Intent.ACTION_SEND); share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); share.setType("image/jpeg"); share.putExtra(Intent.EXTRA_STREAM, uri); share.putExtra(Intent.EXTRA_TITLE,"Share that title"); share.putExtra(Intent.EXTRA

Intent.createChooser: How we can check sharing image intent count?

旧时模样 提交于 2019-12-02 14:10:15
问题 1) How we can check which app was selected by an android sharing intent?And how can we know the image shared successfully or not? Is there a way to confirm if a Share intent in Android was successful or unsuccessful? (For example, if I share a hangout post, I'd like to know if it was successfully posted or know if it was cancelled.) i have tried out with onActivityResult but when i clicked on share button then next i clicked on outSideTouchListener (when am selecting an image and when i

Unable to receive share image - Android 6.0

谁说我不能喝 提交于 2019-12-02 04:55:36
I am using the code provided by aFileChooser to get able to get the shared image inside my application. Images from the gallery work OK but if i use an image say inside Google Chrome and try to share it, it gives me a NPE as my imagePath is null. String imagePath = getPath(getActivity(), imageUri); My uri is identified as MediaStore (and) general from this code: else if ("content".equalsIgnoreCase(uri.getScheme())) { if (isGooglePhotosUri(uri)) return uri.getLastPathSegment(); return getDataColumn(context, uri, null, null); } However inside getDataColumn() my cursor dump is as follows: 08-24

Intent + Share + Action_Send_Multiple + Facebook not working

╄→гoц情女王★ 提交于 2019-12-01 08:56:53
I am trying to use Intent for sharing.It works well with single image or when I use Intent.ACTION_SEND. But when i use Intent.ACTION_SEND_MULTIPLE It does not seems to work on Facebook for e.g I am using below code. ArrayList<Uri> files = new ArrayList<Uri>(); File a = new File(FileUtil.getDefaultMediaFolderPath(), "a.jpeg"); File b = new File(FileUtil.getDefaultMediaFolderPath(), "b.jpeg"); files.add(Uri.fromFile(a)); files.add(Uri.fromFile(b)); if (a.exists()) { if (b.exists()) { System.out.println("Both present."); } } Intent shareIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);

Intent + Share + Action_Send_Multiple + Facebook not working

怎甘沉沦 提交于 2019-12-01 05:40:54
问题 I am trying to use Intent for sharing.It works well with single image or when I use Intent.ACTION_SEND. But when i use Intent.ACTION_SEND_MULTIPLE It does not seems to work on Facebook for e.g I am using below code. ArrayList<Uri> files = new ArrayList<Uri>(); File a = new File(FileUtil.getDefaultMediaFolderPath(), "a.jpeg"); File b = new File(FileUtil.getDefaultMediaFolderPath(), "b.jpeg"); files.add(Uri.fromFile(a)); files.add(Uri.fromFile(b)); if (a.exists()) { if (b.exists()) { System.out

photo share intent in android

我只是一个虾纸丫 提交于 2019-11-28 14:32:50
Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); shareIntent.setType("image/*"); Uri uri = Uri.parse(pathToImage); shareIntent.putExtra(Intent.EXTRA_STREAM, uri); return shareIntent; i was used above code for sharing image on social sites.when i posting image on facebook only text is posted and image is not coming.how can we get the image and pathtoimage is string variable i am getting sever image path and stored in string variable.but it is not working.please give any solutions for my above question.? Vaibs_Cool Try this

How to Share Image + Text together using ACTION_SEND in android?

我的未来我决定 提交于 2019-11-27 12:36:59
I want to share Text + Image together using ACTION_SEND in android, I am using below code, I can share only Image but i can not share Text with it, private Uri imageUri; private Intent intent; imageUri = Uri.parse("android.resource://" + getPackageName()+ "/drawable/" + "ic_launcher"); intent = new Intent(); intent.setAction(Intent.ACTION_SEND); intent.putExtra(Intent.EXTRA_TEXT, "Hello"); intent.putExtra(Intent.EXTRA_STREAM, imageUri); intent.setType("image/*"); startActivity(intent); Any help on this ? you can share plain text by these codes String shareBody = "Here is the share content body

How to Share Image + Text together using ACTION_SEND in android?

亡梦爱人 提交于 2019-11-26 18:12:30
问题 I want to share Text + Image together using ACTION_SEND in android, I am using below code, I can share only Image but i can not share Text with it, private Uri imageUri; private Intent intent; imageUri = Uri.parse("android.resource://" + getPackageName()+ "/drawable/" + "ic_launcher"); intent = new Intent(); intent.setAction(Intent.ACTION_SEND); intent.putExtra(Intent.EXTRA_TEXT, "Hello"); intent.putExtra(Intent.EXTRA_STREAM, imageUri); intent.setType("image/*"); startActivity(intent); Any

Image share intent works for Gmail but crashes FB and twitter

自古美人都是妖i 提交于 2019-11-26 07:37:15
问题 I am trying to allow the user to share an image to other apps on the device. The image is inside the files/ subdirectory of my app\'s internal storage area. It works just fine with Gmail, but Facebook and Twitter both crash when responding to my intent. EDIT: Google+ also works fine. Here are the relevant sections of code. In Application.xml <provider android:name=\"android.support.v4.content.FileProvider\" android:authorities=\"org.iforce2d.myapp.MyActivity\" android:exported=\"false\"

Share Text on Facebook from Android App via ACTION_SEND

隐身守侯 提交于 2019-11-25 23:54:16
问题 I have an Android app and it supports sending text via other apps. It therefore uses the ACTION_SEND intent and the EXTRA_TEXT field. The chooser presents me with all apps that can handle such an intent. Those are Twitter, Email, ... and Facebook. But when I select Facebook it opens the browser and goes to the following page: http://m.facebook.com/sharer.php?u=mytext It shows my text and the submit button. But when I press the submit button nothing happens. The page just loads again. I think