Url schema for Whatapp in android - android

I want to launch whatsapp from my hybrid application using phonegap. I went through the whatsapp url schemas.It is working fine with iOS . Here is the schema is used for iOS:
href = "whatsapp://send?abid=123&text=hello"
reference from :
http://www.whatsapp.com/faq/en/iphone/23559013
As described abid is address book id. If I give correct abid the application redirect to the particular contact.
But as per my reading abid is not possible in android . Currently I am using url with out abid which redirects the application to the recent chats. so is there any way to redirect the application to the particular contact ?

For Android, use Webintent plugin
EDIT
See whatsapp phonegap plugin.
iOS supports a generic URL scheme for whatsapp ("whatsapp://send?abid=").
However on Android the URL scheme is currently not supported.
This plugin implements the send-via-whatsapp functionality on Android.

Two recent solutions (July 2017)
There's been many changes in that need lately but finally after years I've found, tested and refered two new different solutions that should work with any device (one is official). I've mentioned them in THIS OTHER ANSWER (because S.O. policies I had to put a link to the solution, no duplicates).

Related

How to open flutter application from url?

For example, i have case in my flutter app when user can recover his password.
In that case user will receive link on e-mail, and i want by clicking on that link, my flutter app will open, and route to specific screen.
You'll want to view this from the perspective of: How do I open my iOS/Android app from a URL, ie. App Deep Linking.
They each have their own respective implementations:
android/app-links
apple/allowing_apps_and_websites_to_link_to_your_content
Or you can go with more comprehensive SDKs that are capable of doing both for you:
Firebase Dynamic Links
Branch.io Deep Linking
There is a nice plugin for this,
https://github.com/avioli/uni_links
it also has a detailed explanation on how you need to configure iOS and Android for it to work (which is the hardest part imho); another nice source of information is this blog post
So here , you must use a dynamic link.
The best solution is the use of Firebase Dynamic Links .
One of the advantages of Firebase Dynamic Links: Convert mobile web users to native app users
With Dynamic Links, you can seamlessly transition users from your
mobile website to the equivalent content within your app. And because
the links survive the app install process, even new users can pick up
where they left off on your mobile site without missing a beat.
Another solution is to switch to native solutions: Android and iOS.
You can use app_links, that supports Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler (desktop included) for Android, iOS, macOS, web and Windows.

How to launch an app from a SMS message in Android and iOS, along with encrypted data for the apps to use

I'm developing an app for iOS and Android that i want users to be able to launch when they receive a SMS message that contains a link.
The link includes the app package as well as encrypted data in the following format:
"com.app.myapp://?<encrypted data>" (the <> brackets are not included and the encrypted data is never over 120 characters)
On iOS, this works perfectly as the SMS link comes in correctly hyperlinked to include all of the encrypted data, the app launches and all is well.
Android on the other hand, the link comes in broken...only the "com.app.myapp" is hyperlinked, which still launches the app when clicked, but it does not pass the encrypted data. So it seems like Android is breaking the link.
One fix i had for android was to add "http://" to the beginning of the link, this kept the hyperlink fully intact in Android, but on iOS the link with http would no longer launch the app.
Also removing the ':' after the package name fixed it for Android, but again broke the iOS functionality.
I know its not an app issue, its more a Android Messages issue / possibly a link formatting issue.
Is there another solution i can try?
You cannot add http:// in front of com.app.myapp:// because they are both uri schemes. You should familiarize yourself with the difference between URI Schemes and App Links. Since you are using URI schemes to accomplish this, you should not be using .. Your URI scheme should look something like myapp:// not com.app.myapp://. This is probably why Android Messenger is ignoring everything after the ://.
An easier solution would be to use Branch SDK and pass along the encrypted data in the link data.
EDIT
Android messenger does not recognize raw URI schemes as clickable links. You probably still need to use http for android. You should look into using Android app links and iOS universal links. These take a bit more set up but should handle links in both cases

Linking to external android apps through html

I'm a First time developer who is developing a basic WebView based app for android devices. I have some links that lead to profiles on facebook, twitter & instagram etc. At the moment whenever these links are clicked the relevant profiles open but in website form and not app. How can I make these links open the relevant app instead of the website. For example whenever I click on instagram it loads the mobile website for instagram instead of launching the actual app. Also if I have a telephone number set using href="tel: how can I set it to launch the phone app with the telephone number filled in. Sorry if these are stupid questions but I am very new to app development and am still learning. Many thanks for your time.
You will need to use the application specific URL schemes:
A good read on what this is:
https://fokkezb.nl/2013/08/26/url-schemes-for-ios-and-android-1/
Once you understand what this is you will need to do some research to find the URL scheme and correct url for every app you want to target
Example: fb://profile/
Phone number this might work: 2125551212

How to open spotify links in both android and ios device?

I did a Google search for opening spotify URLs/URIs on native app, and found the following URI scheme to open the links in the native app.
spotify://spotify:artist:12Chz98pHFMPJEknJQMWvI
This above link seems to be working fine on ios devices, but i am not able to open this on android device(HTC One). Any suggestions ?
Have you tried entering just the spotify:artist:12Chz98pHFMPJEknJQMWvI in android. I believe the spotify:// may be directing it towards the app, but i think android directs its apps with a different command. Also, just in case it is the same for android, you need to have the app installed on your phone if you dont already have it for the directing command to work properly.
android refer this link
ios refer this link
some reference from above link
have run into a similar need in an app. My solution was to create a client that hits the Spotify API to return either XML or JSON of the search. For instance, if you want Muse, you would hit the API with the following URL:
http://ws.spotify.com/search/1/artist?q=muse
From the XML or JSON, you'll be able to extract the link to the particular artist within their URL scheme:
spotify:artist:12Chz98pHFMPJEknJQMWvI
Chop off the spotify:artist: portion and append that onto a Spotify artist link:
http://open.spotify.com/artist/12Chz98pHFMPJEknJQMWvI
Then, using the Spotify URL scheme and UIApplication, you can open the Spotify app to that particular artist's page:
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:
#"spotify://http://open.spotify.com/artist/12Chz98pHFMPJEknJQMWvI"]];
Note, using URL schemes to access features of another app is generally undocumented and can be a fragile endeavor. If Spotify in the future decides to change anything about this, it will break this functionality without warning.
The quick fix I made was to directly call the uri with any modification on the original uri.
which is 'spotify:artist:4gzpq5DPGxSnKTe4SA8HAU' or 'spotify:track:1dNIEtp7AY3oDAKCGg2XkH'

Android Deeplink in Mandrill Template

I am trying to put an android deeplink my mobile developer gave me in a mandrill email template:
the deep link he gave me is:
intent://products/?batch=1#Intent;scheme=productstore;package=com.productmakers.store;end
What is the proper syntax for embedding this in an template? Ive tried:
"intent://products/?batch=1#Intent;scheme=productstore;package=com.productmakers.store;end"
<a>intent://products/?batch=1#Intent;scheme=productstore;package=com.productmakers.store;end</a>
<a>"intent://products/?batch=1#Intent;scheme=productstore;package=com.productmakers.store;end"</a>
Are you sure the emails you send out will be opened on Android devices only? Those deeplinks will not resolve on other devices.
The specific syntax of links you're trying work on Chrome Version 25+. https://developer.chrome.com/multidevice/android/intents
I recommend using http://urx.com/documentation to redirect customers to the best possible place to consume your content. It works provided the link you're sharing has the required meta-tags.
Use it like
window.location = 'intent://products/?batch=1#Intent;scheme=productstore;package=com.productmakers.store;end'
or
link text
I hope this answers your question!

Categories

Resources