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');
}
});
Related
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()
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
I'll just want to ask if someone here know the step by step process of creating a deep link for an IOS app? I've tried to read some articles but it did not give me absolute answers. Thank you :)
Deep linking is basically just setting up url to your app so that other apps can launch it with information. The can launch to certain parts of the app if you set it up so that your app reacts to certain urls. So there are a few things that you have to do. For this example I will use two apps. If you are trying to integrate with an existing app you just have to find out what their url schemes are. So for this example I will use 'Messages' as one app and 'Schedule' as another.
First: in the 'Messages' app we will need to setup the schemes our Schedule app to call.
So open up your first app we need to add schemes so other apps can open it. Go to your info.plist click the little + and type URL types hit the triangle to expand and hit the + type URL Schemes and within that one add an item and put your apps name in it. Also add URL identifier along with $(PRODUCT_BUNDLE_IDENTIFIER) as the value. `
Then we just have to add the apps that we can open so hit the top level + again and add LSApplicationQueriesSchemes This whitlists the apps so we can evaluate weather or not they are installed on the device.
Now we can jump over to the other app and create a way to call this. For this example lets make it happen when we press a button.
IBAction launchMessagesApp() {
let url = NSURL(string: "Messages://") where UIApplication.sharedApplication().canOpenURL(url) {
self.launchAppWithURL(url, name: "Messages")
}
The canOpenURL(url) checks to see if the application is on the device. If you wanted to you could launch the app store to your app if that retuned false. then launchAppWithURL actually launches it. That is the basic setup you may also want to have multiple things happen so you may have multiple url schemes that launch the same app but take it to different parts of the app. In the app delegate of the app in the function
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
print(url)
//Any customizations for the app here
}
You can do anything you can imagine.
Have you checked out Turnpike? It's an open source tool for enabling deep linking in iOS apps. http://urxtech.github.io/#GettingStarted
If you want to create a deeplink you might need to do some server code to detect the user device/browser and do some actions based on this.
I've created a tool that simplify this process, you can check it here:
http://www.uppurl.com/
It's mainly a short link tool that checks for user device and give him the right url based on his devices. With this tool you don't need to write any server code and it also takes care of different devices, operating systems and browsers.
I'm making a Spotify app and I want to be able to drop something onto the app icon. There are examples of dropping things to the app, but how do I get the icon to react to dropping?
Adding the event listener
models.application.addEventListener('dropped', function() {
doSomething();
});
doesn't seem to do it. Other apps have it though, so there is a way.
You need to add the AcceptedLinkTypes attribute to the manifest.json file of your Spotify app.
For instance, if your app wants to react to drag&drop of playlists, you would do:
{
"AcceptedLinkTypes": ["playlist"],
...
}
Currently, album, artist, playlist, track and user are supported.
If the changes in AcceptedLinkTypes don't take any effect, try restarting the client.
I am writing a metro app using javascript and HTML that implements the Share Contract. I want the users of my app to post data to Social networking sites like Facebook. I have configured the People app in my system, but i am not getting it(People app option) in the share pane in the charms bar. I am seeing the People app option in other apps that i have downloaded from the store.Any help in this regard would be highly appreciated.
Thanks
People app of Windows 8 Release Preview supports only Share Link.
People App of Windows 8 RTM Supports both Text & Link Sharing.
To Share Text:
request.Data.Properties.Title = "Share Text Example";
//Description is Optional
request.Data.Properties.Description = "A demonstration that shows how to share text.";
request.Data.SetText("Hello World!");
To Share link:
request.Data.Properties.Title = "Share Link Example";
//Description is Optional
request.Data.Properties.Description = "Demonstrates how to add a link (URI) to share.";
request.Data.SetUri(new Uri("http://www.google.com"));
Which apps that show up in the Share list are determined by what types of data you are sharing. Each target app informs Windows 8 what data types it is capable of accepting. Windows will only show those apps that support the data types being shared from the source application. For example, if I only share plain text on a clean install system
request.data.setText("some plain text to share");
I will only see the Mail app show up.
However, if I also share a URI, I will now see both the Mail and the People app show up.
request.data.setText("some plain text to share");
request.data.setUri(new Uri("http://slickthought.net"));
I suspect that whatever set*() calls you are making are not one of the data type's that the People app supports.