I am making an android program that needs to do something when I receive a message from the Skype app. My Skype will be logged in, and it will be a service or activity waiting for someone to message me, and when it does it will play a song. Does anyone know how, code-wise, I can tell if I have received a message from the Skype app?
If there is no way to do this, how can I have a service scan the notification bar for a notification that contains the text "skype" and react right when it's received?
Thanks for any help.
If skype broadcasts intent upon message reception ( look into decumentation of skype if there is one ) you may just receive it ( via broadcast receiver ) in your application and do something. Incase it does not, there may be still workauround to snoop into status bar:
Detect a new Android notification
for skype notifications
In general "no". There's no way to do that on non-modified system.
You cant intervene other app's events and/or processing directly. It is only possible if Skype itself has provided an open interface (like Service Binding, Broadcast, etc.) to allow third-party integration. But as per my knowledge, I don't think its possible with Skype's own app.
However, if you use Skype's SDK and offer your own implementation of messenger service, then of course you'll be the in-charge.
According to this post in the Skype Developer Forum, the app does not send broadcast events (which would be the usual way to be programmatically notified of incoming messages).
Related
I´d like to control an app with another app.
As far as I know apps in background get paused.
Is there any way to send commands/clicks etc to another app by my control app?
Thanks
Not generally. If you wrote both apps, you are welcome to implement your own control IPC mechanism. An accessibility service can do what you want to a limited extent for arbitrary apps, but nobody with any sense will install your accessibility service, given that you can do all sorts of nasty things to the user and so there are security warnings that get raised when the user goes to activate your accessibility service. On rooted devices, there are probably many more options.
If you want to send click events to another App, you can achieve it by Broadcast Receiver.
You have to send a broadcast message and the other app must have a receiver to receive the trigger.
you can get more information about broadcast receiver by this link https://developer.android.com/guide/components/broadcasts.html
What you are looking for is a service. In a bounded service, Inter process communication is extremely easy, read here.
https://developer.android.com/guide/components/bound-services.html
You simply bound both your apps to a service they can talk to eachother.
Is it possible to invoke an ACTION programatically on a Notification from a NotificationListenerService?
I have written a Notification Listener service that reads out all the incoming notifications and dismisses when done. But I'm not sure if we can perform any ACTIONs on the incoming notifications.
For eg: On a WhatsApp message notification I can read the package name, sender and message details but is there a way to send a reply back to the sender?
Currently Android Wear is doing this so I'm wondering if it is following a generic approach of acting upon a Notification or it has a specific API to WhatsApp service.
When ever a whatsapp notification is received via notification listerner service there is one another notification thats received (hidden) which has a tag value something like this XXXXXXX#s.whatsapp.net (xxxxxxx being the phonenumber), I think this somehow holds the key to sending a reply to this user.
I am working on other app logic, which does not require you to send back replies but I found this interesting but could not get enough time to check it myself.
Yes, you can do it by this function:
sbn.notification.actions[0].actionIntent.send()
Yes, we can perform actions on notifications. Pushbullet app on Android has an ability to reply to WhatsApp, Hangouts, Facebook messenger etc when user enters the message form desktop which means that there is a way. I am still trying to figure out how to do it.
I have never developed something in Android before, but now my company has put me on a project which includes android.
My question is this: Is it possible to write an application that runs in the background and waits for triggers (if that is the correct word for it). For instance lets say I want my application to do something as soon as you open your emails or as soon as you get an email. Is there some API that I can use to interact with other applications such as Mail. The application does not have to have any GUI, it will literally just push some information notifications on the mail just received or opened.
I don't require a to technical answer, but rather just yes or no, and indeed yes, where can I get more info on it. Also if it is not possible, is there some workaround to achieve this. I have googled it, but most of the links are how to send an email from your application.
Thanks
EDIT: So it can even be triggered when a notification is received. Then I just want to look at the notification and determine if it is an email?
You could register BroadCastReceiver for the actions that you need to be caught
I am developing a POC Message client in Android. This app mimics a messaging application, there is no server interaction. The application starts a new chat with a random user. I want to use Broadcast receiver & message object ( as in a real application ). As there is no server interaction, I want to create a Broadcast sender part in this app, which should randomly generate some messages; My app receives these messages through Broadcast receiver, process the message & show on UI. So, while demoing, it looks like a real messaging app.
If any one knows a simulator engine app in Android which I can use instead of developing a broadcast sender inside my app, Please let me know.
Or, if any one can suggest some better idea for implementing a mimic messaging application, please advise. Thanks in advance.
You can create a service for your app which will always listen on ACTION/signal/message you want. It will activate your app if it gets specific message. And it will run always in the background so that user will never notice it. Hope this will give you a hint.
Is there a way to intercept an SMS with BroadcastReceiver as for example here
but without showing any notifications to the user and immediately deleting the message that contains for example some keyword
EDIT:
What I need is to have some communication between android phones, one to one, and I thought that sending SMS messages would solve the problem, but the SMS notification are not needed for that, maybe the WAP PUSH messages would better for that but I have no idea how to send them from android phone.
If someone has any idea that would help, please put it here :)
Some guys from the Ericsson lab presented their push solution during the droidcon this year (with some additional reasoning why push is good).
Here's the link to their site:
https://labs.ericsson.com/apis/mobile-java-push/blog/push-android-droidpush-droidcamp
I would recommend PUSH or a web service to do the task your requesting.
WAP is a SMS message with a URL, it's goal is to allow users to download content from the web, kinda like a MMS message but for phones without MMS capability. Usually it's a premium message (Meaning the end user pays for these).
As for SMS, I don't think you can delete these from the phone without the knowledge of the user. Think legal on this. Would you want to receive and send SMS messages without your knowledge? SMS can also bill your phone so I'm thinking legally I would recommend avoiding this.
Another note if you're going to use SMS is that you would need a short code and a aggragator. Even if you have the short code and aggragator you still need the users permission to send reoccurring messages to their phone via application/phone.
I would recommend these links for reading:
Android Push Notification
http://www.anddev.org/calling_a_web_service_from_android-t348.html
Web Services
Yes, you could intercept Android SMS without notification icon.
Here is the solution: Can we delete an SMS in Android before it reaches the inbox?
check out Xtify - similar to C2D for Froyo with the ability to push intents but, Xtify does a lot more and does it across Android, iPhone and Blackberry.
xtify uses an SDK for easy implementation and has a web console and web service to configure messages to one, some or all of your users.
you can create rules that determine when a message gets sent – you can even push notifications using location as the trigger as the SDK runs in the background and provides access to persistent location.
reach out with questions to business#xtify.com