Launch other apps with Xamarin - facebook

I'm trying to create an app that has buttons to open other apps on an android device. Apps such as Facebook, Twitter and Instagram. How do I open another app on an android device by using xamarin?

You could try this with the app's package name.
Intent i = PackageManager.GetLaunchIntentForPackage("com.package.appname");
StartActivity(i);
For facebook it is
Intent i = PackageManager.GetLaunchIntentForPackage("com.facebook.katana");
StartActivity(i);

Related

How to suggest Flutter Mobile app on clicking flutter web app url?

How to succeed When user tap on Flutter web url we should suggest whether open in Chrome or Flutter installed app?
If you want to open a native application selection dialog, then you should enable deep linking for your application.
This will result with an app chooser dialog on Android when user opens a URL which mobile application has registered as deep link or a "Open in application X" banner in Safari for iOS
In Flutter , I have used uni_links package and followed document to succeed

How can I launch a deep link URL for another app in my flutter app

My flutter app allows users to link their other social media platforms in their profile. When another user views their profile in the app and clicks one of those links, I want the app to show an alert saying “open in app name?” and then use the deeplink to open the app directly instead of launching safari first. An example of this is tiktok where you can go to a profile and click their instagram and it will take you straight to the instagram profile. How can I do this in flutter using the deep links provided by users?
you can use https://pub.dev/packages/external_app_launcher
your code has to be like this
await LaunchApp.openApp(
androidPackageName: 'net.pulsesecure.pulsesecure',
iosUrlScheme: 'pulsesecure://',
appStoreLink: 'itms-apps://itunes.apple.com/us/app/pulse-
secure/id945832041',
);

How can I open my PWA app from other native app?

I am implementing a PWA application and a native application on Android. I need to open the native app from PWA app which I know how to do that. Basically I need a URL provided from the native app and open the URL from PWA which will bring the native application. This approach is pretty much like opening google map by clicking its url: http://maps.apple.com/?address=1,Infinite+Loop,Cupertino,California..
Now I have a requirement to open my PWA from the native app. For example, if I share the PWA url through facebook, I'd like other people open the PWA app when they click on the url in facebook if they have installed the PWA.
How can I achieve that?.
You don't need to implement anything to do that. Android does it for you. For example, if your PWA is hosted on https://my-pwa.com and the user clicks a link with the href https://my-pwa.com, Android first looks through your PWAs and if the URL matches, it opens the PWA. Otherwise Android opens the Chrome browser.
Just verified this on an Android 6 device.

Launch Twitter using device’s browser, not launch Twitter app on iOS device

I have an ionic 3 app that needs to launch my company’s Twitter page in the device’s browser. The Twitter link is like : https://www.twitter.com/mycompany.
When I add this link to my page, the behavior is like this:
If there is no Twitter app installed on the device, the ionic app
will launch the device browser with the Twitter url above.
If the Twitter app has been installed on the device, the ionic app will
launch the Twitter app, and users have to log in to use the Twitter
app.
This happens on iOS only, even when using InAppBrowser plugin.
Is there any way to always launch the link using the device’s browsers, even when the Twitter app has been installed? It really annoys when users have to create an account and log in to Twitter app just to view my company’s Twitter page.
Thanks.

open facebook app to login (meteor/cordova) iOS/Android

1.)
I have a native meteor app on my devices (ios/android.
2.)
I would like to enable a facebook login for my app (android/ios devices).
3.)
If the facebook app is installed on the device it should open the facebook app to login.
else it should open the browser.
Problem
there are so many facebook packages out there and its hard to choose one with the latest facebookSDK for meteor that works with cordova and allows me to open the installed facebook app. All packages had tested just opened a new browser window. can someone give me a hint for a working package that actually works?