I am developing an Android based application.
In my app communication between users plays a vital role. My app has
built-in E-mail options as a primary source of communication and I wants
to add WhatsApp option too.
Is there a way to add WhatsApp option inside my app which when chosen opens
open WhatsApp Application? If yes, I would love to know how?
You can first check if WhatsApp is installed on the device. The package name for the WhatsApp app is com.whatsapp.
If it's installed, then you can use an explicit intent to automatically take the user to the app to send a message.
You can not under any circumstances control how the user uses WhatApp. It merely opens the app for use. You may be able to guide a user to a particular contact, but that's going to be part of WhatsApp's api and is not guaranteed.
If it is not installed, then you can either remove the option from view since it simply can not be used, or send them to the play store to download it.
WhatsApp, to my knowledge, does not have an open API, so you can not directly integrate the service in to your app. You'll always have to be taken out of it.
Alternatively, you can also send the message as an SMS through an implicit intent. This will allow the user to use whatever messaging app they want so long as they handle SMS.
Related
If I create an application, which the user installs on his Android device, is it possible for that application, that from the background, it can access the currently opened browser tab, and if the user navigates to a specific domain with his browser, the app sends a push notification, or maybe notifies the user about a promotion on that domain?
well, for usual apps this isn't possible for security reasons obviusly. but it probably may be done using AccessibilityService. note that Google is filtering apps which have such big privileges and won't let your app to Play Store if it will be using AccessibilityService to such "trivial" operation (isn't very helpful, for sure isn't accessibility-kind-of)
I need to be able to control Android phone through my webapp. I need to know which permissions do I need to take from user from his/her google account. For example I need another user to be able to send an address to this user and this should open his Google Map with that address shown. Or send a message and it should be somehow opened on the user's phone. Is this all possible? If yes, then how. If no, what can be the closest we can achieve?
If your are creating an Android application that can be installed on users phone than as far as I know this is quite possible...
All you need to do is to use push notifications server like firebase to send the data from your webapp to an application on users phone. Then according to the request received the application has to determine which intent/Broadcast to send.
I have a mobile application in iOS and Android formats. I run a server containing a database of user telephone numbers, for the purposes of sending an SMS message via Twilio. However, I don't know what operating system each number is associated with. The app does not make HTTP contact with the server.
I want to send a link to each of my users by SMS, which will redirect to the appropriate app store depending on their operating system. Facebook does this - does anyone know how they do it? Do they detect the operating system via the phone number?
Basically, once user click on that link it should automatically redirects to appropriate app store.
Ah. You have users DB represented by the phone number only, right? So you don't actually know which smartphone user has Android or iOS. In this case you should use a special universal url (sent in SMS, most probably shortened) linked to a special webpage on your server with special js (JavaScript, web devs should help on this) intergated. This script should detect which type of device user is using while viewing a webpage and simply redirect to the corresponding market. Also you could provide just both app market links on your page so it will be up to user to choose - in this case no js needed, it could be a very simple html page.
So I'm thinking this may be impossible. But on each phone platform there is a convention to send an SMS link, that when clicked, will launch an application on the device and do something based on the parameters sent in the link.
Ex:
iPhone: Launch an app from a link in an SMS
Android: Launch Android app from within SMS/MMS message?
However is there anyway to do this that is effectively cross platform? For example I have an android phone with my app, and I send an invitation to a friend that has the same app but the iphone version (perhaps I don't know he has an iphone I just have a phone number). Is there a way to send a sms link that figures out it's being opened on an iphone, and sends the link to open the iphone version of the app? Perhaps there is a way to embed very simple logic into a hyperlink that changes based on what device it is? Is there any way to pull off something like this?
I realize I could send multiple links and have the user click the one that is appropriate, but that seems a little sloppy (especially as more platforms become available, it will be cumbersome to cram all the links into 1 SMS message for every device).
This is a difficult situation with no easy answer unfortunately.
Option A) You send a link that points to your server. This link identifies the device based on user agent and then forwards them to the proper sms: link for each platform.
Option B) If you know what type of device you are sending the link to beforehand, then you can determine the proper link on the server side before it is sent.
In several applications I have downloaded and installed from the Android Market I have found that there is a feature, this feature allows you to share information created by the application to other applications and services.
For example, I can use an application called Instant Heart Rate (IHR) that measures my heart rate, and if I click on the "Share" button I can send the image produced by IHR to Facebook, mail, and some other applications as well. This list of applications seems to fill automatically when I install more applications to my mobilephone.
What I want to know is, what is this feature called? I want to add this to my applications, both the sending and the receiving of information (images and texts mostly).
Thank you in advance for response.
What I want to know is, what is this feature called?
An ACTION_SEND Intent. Here's an old blog post of mine describing its use.