Open Facebook Messenger using Titanium on Android - titanium

I want to open the Facebook messenger on Android.
To do this on iOS, you simply need to do the following (as described here: https://github.com/appcelerator-modules/ti.facebook):
var fb = require('facebook');
fb.presentMessengerDialog({
title: "Appcelerator Titanium rocks!", // The title of the link
description: "Shared from my Titanium application", // The description of the link
link: "https://appcelerator.com", // The link you want to share
referal: "ti_app", // The referal to be added as a suffix to your link
placeID: "my_id", // The ID for a place to tag with this content
to: [] // List of IDs for taggable people to tag with this content
});
How would you do this on Android?

Actually, there's no such method for Android yet using native Ti.Facebook module. You can see at this link Ti.Facebook that it's only for iOS & starting from Ti SDK 5.4.0
In David's answer, he missed the very first line of that code file which says this:
if (Ti.Platform.osname == "android") {
Ti.API.warn("This feature is currently iOS-only.");
return;
}
But you can still try to open the messenger dialog on Android using Intents as described here Android Intents in Titanium
You can search Google for similar questions & I hope you can find plenty of them. Here's one such example FB Messenger Intent

Related

How to offer full app download link from app clip

How to offer the full app once user is done with app clip action?
In the following screenshot from What's new in App Clips WWDC 2022 video, once the users are done ordering food, they are given option to download the full app.
Is there a specific UI configuration to use?
From the What's new in App Clips WWDC 2022.
Is it possible to customize the download banner?
Say remove the Get the full app?
Screenshot from 2020 video.
With UIKit, refer to recommending your app to App Clip users with SKOverlay and SKOverlayAppClipConfiguration object.
With SwiftUI, appStoreOverlay() could be used to provide the download option.
Note: To find the App Identifier go to the AppStoreConnect.apple.com -> General -> App Information and locate Apple Id (An automatically generated ID assigned to your app.).
Use it to trigger the AppStoreOverlay.
struct ContentView: View {
#State private var showRecommended = false
var body: some View {
Button("Show Recommended App") {
showRecommended.toggle()
}
.appStoreOverlay(isPresented: $showRecommended) {
SKOverlay.AppConfiguration(appIdentifier: "1440611372", position: .bottom)
}
}
}
Credits: How to recommend another app using appStoreOverlay()

how to post video on fb timeline using share dialog with javascript sdk?

I have developed one application. I have to upload video on fb timeline, from developed application trough Facebook JavaScript sdk with help of FB.ui method.
i have shared part of my code, which i tried to post video on facebook timeline.when i used this code, video get upload as a link. it will navigate to new tab and play when i click on that link.(my video type is mp4.)
FB.ui({
method: 'feed',
display: 'popup',
type:'mp4',
source:filePath,
picture:filePath,
},function (response) {
if (response && !response.error_message) {
alert('Posting completed.');
} else {
alert('Error while posting.');
}
I expect the video to be play on my timeline instead of posting as a link.
I expect the video to be play on my timeline instead of posting as a link.
That expectation is simply unfounded – this isn’t supposed to work this way, and never has.
You would need to share a link to an HTML document, that has the video embedded via Open Graph meta tags, see https://developers.facebook.com/docs/sharing/webmasters#video
But Facebook has begun limiting the occasions on which they actually play such videos inline; so even if you implement this properly and technically correct, there is no guarantee any more it will play in news feed; users clicking on such a post might simply get redirected to your external site to play the video there.

App Video Preview link to itunesconnect

Can we post app video preview link in the itunesconnect app description section.
There's no definite exclusion in the App Review Guidelines concerning links in the description part of your app. https://developer.apple.com/app-store/review/guidelines/#metadata
But any links in your description will just show up as "text" and are not "clickable" for your users. They would have to manually type the URL into their browser. (It's not possible to copy & paste text from the App Store description)
As jacky suggested, you should upload an App Preview, which will appear "before" your screenshots. Apple put a nice page together, what is allow for App Previews: https://developer.apple.com/app-store/app-previews/
On a side note: You still can create a landing page for your app including the video and add that URL to the "Marketing URL field" in iTunes Connect.

Getting total unread notification count in Tizen and opening notification app on Gear 2

I am trying to add a notifications feature to my watchface.
I want to get total count of notifications on the Samsung Gear 2 and then when a specific areais clicked I would like to take the user to the "Notifications" app of the Samsung Gear.
Is this possible ?
How ?
Thanks.
At the moment Notification Web API is not available in wearable SDK. So you can't.
To launch application you have to know ID. There is example in documentation:
tizen.application.launch(ApplicationId id, optional SuccessCallback? successCallback, optional ErrorCallback? errorCallback);
or:
tizen.application.launchAppControl(
appControl,
appId,
function() {console.log("launch application control succeed"); },
function(e) {console.log("launch application control failed. reason: " + e.message); },
appControlReplyCallback );
You can find information in Tizen SDK help:
API References > Device API Reference > Application
and
Programming Guide > Device API Guides > Application Guides
You need the permission: http://tizen.org/privilege/application.launch
I want to launch "com.samsung.wnotification2". How ?
anybody who could help me to launch this ?
I hope you've found an answer already, though let me post an answer as I am stumbling into your question for fifth time ;)
var notificationsAppId = "com.samsung.wnotification2";
tizen.application.launch(notificationsAppId, function() {
console.log("launch success");
}, function() {
console.log("launch failed");
});
Please also take into account that this method of calling notifications screen will not work for Gear S - Samsung disabled ability to launch the "com.samsung.wnotification2" (though, if you try, the launch request will not indicate failure!)

equivalent to android's share intent concept for iPhone using titanium?

I want to add share content functionality in my iOS app. I am developing an app in titanium for iPhone. I want to add a share button that when a user clicks will open a dialog box contains many different option like Facebook, twitter, email , and print.
Unless this has been included in the Appcelerator Framework, you are going to have to write a module
"Share Screen" iOS 6
There is a module for this that wraps the Social.framework on iOS. Ive used it in my own apps and its quite nice. Find it here.
And a small example of how to make it work.
var Social = require('com.0x82.social');
Social.showActivityItems({
activityItems : ["http://stackoverflow.com"]
});
Social.addEventListener('activityWindowClosed', function(e) {
if (e.completed) {
alert('Shared successfully');
}
});