I am working on the capability of starting an app via an SMS link or an email. It is all working fine. Custom links don't parse on Android phones, but that is another story. My http style link works great. But the issue is the behavior of apps like Messaging, Android GMail App, Android Mail app, Android Outlook app, Whatsapp, etc. ( Here is the scenario:
Go to app, like Messaging, Gmail, etc.
Click on the link to start up my app (app starts up correctly)
Hit the Home Button
Hit the icon of the app that I used to start up my own app
On Samsung phones, when I do step 4 (above), the Messaging and Outlook apps show my app, not the message or email list. The Gmail and Android Email apps behave correctly (in my opinion). These apps bring you back to where you were in that app. On my LG phone, the Messaging app behaves correctly. Whatsapp always seems to behave badly.
My main concern are messaging apps, as I want to use SMS as a way to start up my app. I think that the Messaging app should go back to the message list like my LG phone.
Is there a solution to this? Thanks
So the answer in this case is to add android:launchMode="singleTask" to the activity attribute in the manifest. Then all Messaging, Outlook, Mail, and Gmail apps all behave correctly.
Now have to figure out how to prevent the user from trying to open this app multiple times.
Related
I have read some articles and according to them, WhatsApp has no API for developers for sending personal messages. Though when I type
send a WhatsApp message in Google Assistant(Android mobile device) it shows a simple UI to choose a contact and type a message and a send button to send it directly from the assistant.
I also want to do this kinda thing with my messaging app.
My questions are
How to achieve this?
Has WhatsApp done this thing from their side to do this or Google Assistant did this?
Note: Not only WhatsApp I have noticed the same thing for the preloaded SMS messaging app in android devices.
Edit: The possible duplicate found has nothing to do with my question because it doesn't relate google assistant functionality.
Have you come across this answer?
https://stackoverflow.com/a/46683818/3138726
This would require user consent though. It will open up the screen with prefill text for that contact.
actually google got a permmesion from whatsapp company to do this, that is not possible to send messages from your own application
I have seen some apps that take me into a web page and after reach certain endpoint the browser closes itself automatically then I continue in the original app.
Another app that takes me to my SMS messaging app then autofill the textbox and when I click send, again the same thing happens the SMS app closes itself and then continue in the original app, how can I get the results of those intents.
In both cases, the app returns with data received I think it's from the backend
Have a look at Android deeplinks
Basically you create some deeplink for your app like yourapp://awesomeintent and the website calls this link. In your AndroidManifest.xml you register some activity for this deeplink with the help of intent-filters and then your app pops up as soon as any other app/website opens your deeplink.
Keep in mind: If the user has more than 1 app which can process the deeplink, Android will ask him which app he wants to choose to do so.
I wanted to create a chat browser that would send the message to an android app. For example, I do not have an app that my friend uses. However, I don't want to install the app. I will use this browser to send the message to my friend in his app. And when my friend gets this message in his app and he replies from his app, Me on the other hand will receive the message in this browser.
Are you developing both apps? If so, check out something like Firebase: https://www.firebase.com/. It is suited for exactly what you are looking for. Real-time updates to all clients that are connected.
These neat little App_Script created for Android with browser compatibility should do the trick. This takes both an input box and a message box.
Doing the desired function of sending and recievings Messages.
Documentation here
you will need to be in the same source Code as the other user or a mirror App like viber on the example you provided, on the other hand you could create an application to send regular texts to mobile phones, but that's another subject.
On Safari, it is possible to have the following setup:
I pay Apple $100 / month to be a web developer.
I put up a site, say foo.com
When a user visits foo.com on their iPhone, a message pops up, saying "foo.com would like to send you push notifications. Do you allow? YES NO"
If the user clicks yes, then I can send the user push notifications:
without using SMS
without the user ever installing my app
On Android, is it possible to do the same ?
I know that there is something called GCM. However, every GCM tutorial I have found involves:
* writing code in Java
* installing an app on the android device
I also know of other commercial tools that will do the push for me.
However, my question is. On Android, is the following possible:
I register to be a Google dev of some sort.
I put up some code on foo.com
When a user visits foo.com on their android phone, a message pops up saying "foo.com would like to send you push notificaions. Allow? Yes No"
If the user clicks yes, then, by talking to some Google server, I can now send the user push notifications (without the user installing an Android app).
On iOS, we have https://developer.apple.com/notifications/safari-push-notifications/
I want to find the equivalent for Android.
Thanks!
Nope, you would need to get them to deploy an application onto their phone for you to then register and send push notifications to. You have to right that application as well, most likely in java. I don't even think your idea would work on iPhones either without a native app as well..
I can't seem to find a document on how to push to Gear2 from my Android app. The closest I can find is this tutorial on building the Integrated app, but it's a fetching scheme (data only transferred when the user presses a button on the watch) http://developer.samsung.com/events/developer-blog/blog/Tutorial-How-to-build-a-Basic-Integrated-Gear-Application
So I'm wondering is the push is done via standard Android Wearable Notification, like here ? http://developer.android.com/training/wearables/notifications/creating.html
or any pointer to documents?
Thanks.
http://img-developer.samsung.com/contents/cmm/SamsungGearApplication_UIDesignGuideline_1.0.pdf.
section 3.4
Notifications app section.
I don't think any code is necessary (though I haven't tested this myself)
The default behaviour is to push all notifications, but it can be controlled using Gear Manager App.