How can I know if user has opened Notification List? - android

I am working in an application implementing an AccesibilityService, to detect when other applications are sending notifications. That is easy to do extending AccesibilityService class.
Now I would like to know, when the user opens the Notification List, but I have not found any documentation about it. The only similar thing is using new NotificationListenerService but I'm not sure if it can help. Also, my app is for 2.2+ devices, and the use of this class is for level 18+ .. (I think).
My question is if there is another way to know from my application if user have opened the notificationlist.
Thank you in advance.

no. you cannot be informed when user pulled down notification area.

Related

How to read notification and not show in status bar when application is closed or killed?

I am creating a demo for android and for that, I want to not show notifications for a specific application like WhatsApp, Facebook, Instagram, etc. And for that, I have added notificationlistner and it worked for me when the application is in the foreground or in the background but not in a killed state. And I want to make it happen in the application killed state.
It would be great if I get help with this.
I have a simpler answer for you- just don't have those apps on the phone you're using to demo. If necessary, buy a cheap used phone for your demo. Far less time and effort than trying hacks to make notifications of other apps disappear.

Is there a broadcast for when user starts and app in Android?

I'm working on an application that requires to know when user opens other apps.After some research, I came down to this ActivityManager class and getRunningAppProcesses() method. But they only give me the full list of apps, and won't tell which one is currently open. Then I came down to using getRunningTask() or getRecentTasks() but according to this question, google has deprecated these two methods!
Is there a broadcast for what I'm looking for? I mean like the same way that we receive a broadcast that the screen turns on or things like those!
Is there a broadcast for when user starts and app in Android?
No.

How to remove default action(BlockApp) in android wear notification?

I am working on Android wear notification. I am able to add action. Everything works fine. But I wanted to avoid the default action(Block app) which you find it as the last action item in all android wear notification in the notification.
How do I remove the default action?
You can't do that. They introduced the feature on Android 5.0.1 and it's embedded into the notification mechanism.
As per wear-user experience, it should be there to grant the user a grade of control on the applications those try to push content to the Context Stream. Imagine a scenario where an application continues to spam the stream; the user would definitely appreciate the possibility to prevent it.

Notification badge/counter in control app

I am working on a control-based (V2.0) SW2 app. Is it possible to set the badge-number (i.e. the notification counter) on the icon in the application view used in a notification-based app? I do not need anything else from the notification API, I just want to be able to set the badge-number and removing it after the user opens the control-based app.
Thank you,
Andrej
Unfortunately that is not currently possible without using both the Control and Notification APIs together. If you use both of them in your extension you may be able to achieve something similar to what you want but with the limitation that the extension will always start in Notification mode (this is a bug in the current implementation) so you wouldn't be able to go straight into the Control part of your extension.

Android : How to notify the user when the Application is not running

I am new to Android and have a problem with the Notifications. I know that this topic has been taken up earlier as well but I just wanted to know if there is any other way to go about it.
Problem : In my application I want that the user is notified that he/she has entered in the radius of a particular location. I have the functionality working when the application is alive and in the foreground. I will however want that the user is also notified when the application is not working and not there in the foreground.
In the previous posts I have found out that this can be done by using something called as the C2DM. Altough I am not much aware of it but by using C2DM I would be introducing an extra network trip. My question is that the only way to go about it? Can't this functionality be done any other way round, something locally like something of a daemon thread of sorts?
Also if C2DM is only the way, and as my application is not in my foreground will the C2DM also inform once the user reaches the radius of a particular location?
Will like to thank you all in advance. Please do let me know if any one of you have faced a situation/problem/requirement similar to this before and also if you can highlight the way forward for this?
I have the functionality working when the application is alive and in the foreground. I will however want that the user is also notified when the application is not working and not there in the foreground.
Use addProximityAlert() on LocationManager, and then it will not matter whether your app is in the foreground or not.

Categories

Resources