How to share device gallery or captured images in social media like Facebook, watsapp by using titanium studio? - titanium

I want to share device gallery images to social media like (Facebook, WhatsApp, Twitter, Google+) by using Titanium Studio.
I have a button to capture the images. When image is captured i want to share that image through device supported sharing applications.

There are several ways to do this:
Use built-in modules like Facebook. See more in Appcelerator documentation
Use some of the modules created by others, e.g. social.napp.dk - you can also browse/search for more options on gitt.io :-)
/John

Related

How to implement customized unfurling (preview snippets) with Branch.io quick links?

We generate quick links in our iOS app that are supposed to point to specific content within the app. When a quick link is shared via a messaging app that supports preview snippets, we want the snippet to display custom content depending on the parameters passed when our iOS app generates a link.
For example, user wants to share an audio, the app generates a link which is then posted in a messaging app or social media. We want the preview snippet to reflect specific title/subtitle and image related to that audio.
We use a custom domain name for Branch links if that matters.
What is the right way to achieve this?
You can use Link Preview for achieving this functionality. It will enable the link to display content as a preview card in Facebook, Twitter, Pinterest, iMessage, etc. This card can contain a title, description and image (that you append in the link as OG Tags such as $og_title, $og_description, and $og_image_url) .

Shaka player social share

I'm using shaka player as my html5 DASH player, and i want to allow social network integrations.
For instance, share a clip to whatsapp/facebook or as a link for forums/websites.
Is it possible using Shaka player? (I can easily switch to working with DashJS if that is more flexible)
Sharing the link is pretty much independent from the player itself.
You will have the URL for the video stream already as this is what you will be giving to the player, so you really just need to use the standard social network API's to share this link.
Some players will have this functionality included as an overlay or control on the video, which may be what you mean - however, you can still share the link your self by just adding your own share button below it on your web page.
I'm not aware of any Shaka Plugin to allow it be included in the controls, but if you wanted to add it yourself all the controls are grouped in:
https://github.com/google/shaka-player/blob/7169c7a5902696a42419b67a9c8e091e7f06c95d/demo/common/controls.js
For example you can see how the mute button is handled when it is clicked here:
/** #private */
ShakaControls.prototype.onMuteClick_ = function() {
if (!this.enabled_) return;
this.video_.muted = !this.video_.muted;
};
You could add a control to call the required social network sharing API for your case.

Playing youtube/vevo videos on iOS

I've seen the Google blog article explaining the way to embed youtube videos in an iOS app. I've successfully embed videos in my iOS app. BUT, I've seen the WhoSampled app where they are able to play Vevo/youtube videos. Somehow they are able to play those videos and my app is not able to play them. (In my app, there is a blue play circle with a line through it showing that is not playable.)
How do I allow those videos to be playable?
Do I have to setup the youtube link in a specific way or is there a way I need to setup the developer key?
There is a way to get the actual video stream for a given YouTube video instead of the HTML-embedded one. See this project:
https://github.com/hellozimi/HCYoutubeParser
The problem with this approach is that it will likely violate the EULA of YouTube APIs, especially if you are releasing it in a paid application:
In addition, please remember that attempting to play a YouTube video outside of either the YouTube embedded, custom or chromeless player is strictly prohibited by the API Terms of Service.
(source: https://developers.google.com/youtube/creating_monetizable_applications)
You just have to use the iframe embed as opposed to the Flash one.

How do access native APIs with Sencha Touch?

If I wanted to create a mobile app that allows the user to take pictures with their phone, record audio notes and record video, how would I do that?
I was browsing through the Sencha Touch 2 API and while I see documentation on video and audio files, it seems like it is just providing a way for me to access files stored on the phone - not actual triggers to record, or take pictures.
Am I missing something?
How would I do what I want?
In order for Sencha Touch to have access to your phone capabilities, you need to use a product like Phone Gap
Unless there is a HTML5 api for doing those sorts of things I don't think you can do that. I know on PhoneGap there are native extensions added into that platform for access to things like microphone, camera, etc. I don't know if Sencha Touch has added any of those sorts of extensions in order for you do this.
Just thinking out of the box here, but you might be able to put Sencha javascript into a Web View from within an Android Java process. Then the Java code could expose an object in its process as an extension point to the Javascript engine for access to Camera, Microphone, what not.

Play brightcove videos

I want to play a remote video hosted in Brightcove. As Brightcove URLs are links to players not direct links to video files the AVPlayer won't do it.
I know Brightcove provides an API but can't find any good examples for iOS nor documentation.
Any help/pointing direction appreciated.
I haven't used Brightcove, but poking around their site, I see they have two APIs: a Player API and a Media API. It sounds like the Media API is what you want — it's documented as giving direct references to the videos. The page has a link to several examples.
You can also lift alot of the code from their Oneplanet demo source. In fact the whole playlist and video player mechanism can be practically copied into your project so all you need to do is pass a video or playlist ID into their initwithnibandplaylist function in their view controller and you're good to go.
I hope this helps your question. There is a renditions which contain direct video link.
Here is a link for api link.
http://support.brightcove.com/en/video-cloud/docs/accessing-video-content-media-api
renditions is a javascript object containing multiple video links based on resolutions such as 360,460, 720.
You can find the direct link to the video via the media api, bypassing the player API entirely. You need a pro account and a token:
http://support.brightcove.com/en/docs/getting-started-media-api
Alternatively, you can create a simple "player" without any controls (just a video window actually) and make your own HTML controls totally outside of Brightcove to trigger almost anything you'd want to do via the player API.
There is also a Brightcove iOS SDK. It is really two SDKs one for the Media API and one that includes a MediaPlayer. If you want to use the AVPlayer you can use the Media API iOS SDK. Here is the docs for that:
http://docs.brightcove.com/en/video-cloud/mobile-sdks/brightcove-player-sdk-for-ios