As i saw this in "Viber" application. There is media sharing button which opens all the albums as shown in photos native application. Can we do this ? I found UIImagePickerController cannot shows both simultaneously. How show both photo gallery and video gallery simultaneously ?
You're right about UIImagePickerController here great guide, and github project for picking media.
If you want to share your media here's some cool examples:
Check this tutorial on how to share pictures via email.
If you want to share via mail -
First of all you have to Create NSData object from your PNG/JPEG image data and then implement the method: Send addAttachmentData:mimeType:filename: to your MFMailComposeViewController instance.
Also i think the best thing to use in your case to share stuff like text, pictures etc is Sharekit.
Related
I'm using a UIActivityViewController to enable the user to share photos and videos created with my app. I attached two UIActivityItemProviders to it: one for the media and one for a default text to use ("Created with...").
This works well for all share extensions I tested—except for WhatsApp. WhatsApp only shows the text in the message dialog—no photo or video. When I leave the text blank, however, it will show the media file.
Is there any way I can share a photo or video with a default text/caption via WhatsApp?
I'm facing the same challenge. I implemented my own extension using https://github.com/sascha/SSCWhatsAppActivity. The downside is that you'll get two WhatsApp entries when sharing. WhatsApp's own one, and the custom one. I tried excluding WhatsApp's own extension using UIActivityViewController.excludedActivityTypes with the activityType net.whatsapp.WhatsApp.ShareExtension but since iOS 8.1 this is not possible anymore (on purpose or a bug). More on that here: http://johnszumski.com/blog/excluding-third-party-apps-from-ios-8-share-sheet
My conclusion, there is no way to provide both text + media to WhatApp own sharing extension. I decided to keep my custom WhatsApp sharing extension and name it "WhatsApp (+Image)" so the user can distinguish the two.
I would like to let users browse photos in their photo albums, tap the action button, and share/open selected photos in my app. Some apps (like Viber and WeChat) provide a custom view to handle this. This is the WeChat screen:
What is the name of this feature and which class do I have to use to achieve this behavior?
You need to do check for share option in the ioS extensions
app extensions
extension programming guide
EDIT:
Removed 3 & 4 links, which are not working. thanks to Daniel.
Share extension can be found inside the Extension programming guide(2nd link > App Extension Types > Share)
You can use UIImagePickerController for the purpose. Find Class reference here Here is a Sample code
I am developing an iOS app that uses the UIActivityViewController to share some text and a Url. In the Facebook and Twitter services it shows a thumbnail of the site located at the URL.
Unfortunately, the site in question does not look very good at all in the thumbnail. So currently the thumbnail has a negative value in the share dialog. I would either like to prevent the thumbnail from displaying, or supply my own image for the thumbnail. What is the best method to do this?
I would like to avoid having to create my own service and/or dialog.
I have tried adding an image to the item list, however that adds a bunch of services I don't want and adds the Image to the email action and adds the image to a photo album on facebook. The first problem I can get around by blacklisting actions I don't want. And I can make my own UIActivityItemProvider to stop the email problem. However, I have no idea how to prevent the facebook problem. (See How do I customize a UIActivityViewController to show a URL link when posting to facebook and twitter?).
Here is a screenshot of the facebook sharing dialog:
I'm writing an iOS app that produces an image, and we'd like the user to be able to post that image to their Facebook wall using the standard facebook dialog.
The Facebook iOS SDK provides a dialog for posting to a user's wall, using the dialog:withParams:andDelegate: method, and you can provide the URL of a picture in the params argument. However, that's no good to me - I want to send off an image that exists only on the phone.
The SDK also provides a way to post an image to a user's wall, using the requestWithGraphPath:andParams:andHttpMethod:andDelegate: method. But that's no good to me either - I want to use the standard dialog.
Is there a way for me to send the image data with an FBDialog?
You need to do a photo upload first, with a graph call to '/me/photos' - this will be in an album that your app will have to create, not an existing one (unless your app created it).
That will return you the photo id, which you can then hit the graph again with a call to that specific id: 'https://graph.facebook.com/RETURNING_PHOTO)ID'
This will return name, picture, source, link (and a bunch of other stuff) - you can then use the picture (which is a thumbnail) in your wall post as the picture and add the URL to the source (big image) or use the link to the photo in the album (link) inside your message text.
Hope this helps,
-J
I have an app that records a video and saves it straight to the photo library on the iPhone. I want to, as soon as the user finishes recording, have the app open up in mail, with the video attached. How should I go about doing this?
I am using this basic idea: http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email/
How do I get the file path for the video?
You could either store the video in your app and then attach that into the email before copying it to the photo library or show the user their photo library in the app via UIImagePicker - This may help or just google it ...
http://developer.apple.com/library/ios/#samplecode/MyImagePicker/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010135