I want to fire an event when the user opens his messages from a particular sender. I am thinking of using a Service which fires that event when the user opens his messages.
First, I would like to know if this thing is feasible? I mean, is it possible to get the info that the user has opened his messages (of a particular user in Android)?
Second, is using Service the only way I can get through it? Is there any other method?
Thank you guys in advance :) ...
I mean, is it possible to get the info that the user has opened his messages (of a particular user in Android)?
You fail to say what sort of "messages" you are referring to, or what app those "messages" would be viewed in.
That being said, unless the app's developer is leaking private data (like "message" recipients) via some broadcast Intent, you cannot get the information you seek.
Related
Just a bit of app background, this app allows users to click on a number from the application and redirects it to the phone app.
And once the call is done, it will redirect the user back to the app then it retrieves the call information of this particular number (such as timestamp, duration, etc)
However, I come across a race issue where I don't get the latest call log on some phones; meaning Android writes the call log after the app reads the CallLog provider (I can't be certain for how big this window gap).
To put this in simple technical flow:
User click the phone number on the app
Broadcast receiver is triggered
App start Phone activity
Call ends after some period
Broadcast receiver listen to the event
Get call details
With this in place, is there some steps that I missed? or do you have a better solution to handle this?
Thanks.
I've been trying to look up solution but I just can't seem to find one that suits my need. It could be that I'm not using the correct keyword, so I'm gonna try to explain it the best I can.
Simply saying, I'm building an Android application. The application need to detect some other activities on the phone and show some message.
For example:
User launch MyApplication.
User received some notification from another app. (a phone call, text message, email, whatever)
MyApplication shows a message via toast or dialog, saying that "you just received an notification from another app"
I'm not entirely sure what function I should be looking for here, any help is appreciated.
Thanks!
You will want to look at NotificationListenerService, this will let you receive calls from the system when new notifications are posted or removed, or their ranking changed.
Once you receive a callback from the NotificationListenerService, you will want to create a Toast.
Take a look at this tutorial should help you get started.
To detect when other apps ask the OS to display a Notification, you would need to implement a NotificationListenerService. The user would then not only need to install your app, but also go into Settings and specifically allow you to monitor notifications.
I'm using Parse service in an application I'm developing, push notifications are now working, I can send perfectly ...
But I want to implement some actions in determidos cases example: Send url to be opened as soon as the user clicks on the notification, make a call, open the map with a planned route, and more.
I wonder if this is possible, and if we had someone who already knows the way I should go.
Thanks!
You can certainly send additional information to trigger an event inside your app, such as url opens, opening maps, etc.
First, you need to send a payload with your push notification that tells the app what to do. You can learn about that here:
https://parse.com/docs/push_guide#options/Android
Second, you need to create a handler inside your Android app that recognizes your push payload and knows what to do with it. You can find the appropriate start under "Responding with a Custom Activity" here:
https://parse.com/docs/push_guide#receiving-responding/Android
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 want user to confirm By selecting yes or no that whether he/she is sure to open the message application or not.
This will be similar to CALL CONFIRM android app which confirms when making a call.
I can also manage if someone let me know a thing like broadcast receiver as in the case of making a call.
Like i would be able to confirm when send button is pressed in message application.
This is my first question on this forum. :)
it can be achieved in more than one way,
create a service and monitor activity stack, if activity matches com.android.mms.* you can show your notification to user
create an application with all the intents for launching the messaging application, you can find out all possible intents from stock messaging application's android manifest file for your ref
http://www.netmite.com/android/mydroid/2.0/packages/apps/Mms/AndroidManifest.xml