I have a live streaming app where you can be recording for hours and when the user receives a text message or a phone call, the vibration is trnaslated into sound and rippling video on the streaming.
Is it possible to somehow programmatically disable all notifications or do I have to ask the user to do so by himself?
You cannot control notifications from other apps. There is indeed a solution for rooted devices.
'Standards' part in this guide says:
One of the unfortunate problems Android users face is that there is no
centralized control for how notifications work. This means that if
there is an application prompting you with a notification, short of
uninstalling the application, there isn’t much you can do. Starting in
Android 4.1, users received a buried binary setting to 'Turn off
notifications’ for a specific app.
No, unfortunately not. Perhaps on rooted devices, but ¯_(ツ)_/¯. Best way seems to navigate the user to the related setting to disable all notifications, as you have also mentioned.
Related
I have created a mini App that helps me playing with beacons.
-what i have done so far-
So until now, I have successfully connected my App to the beacon, made 2 texts, so when I'm in the app and get in the beacon's range, the texts are changing so I can see that, move 2m away or turning the beacon upside down so it simulates Out of range, and it will show the message that I'm not in the range anymore.
So far so good, I have also successfully made the app to show notifications when I get close to the beacon, and when I click the notification to open a second activity.
-the problem-
Now, I want to show a notification when I get in the beacon's range, and the app is closed (not in the background). And after, when I click on that Notification to open my app / open App Google Play's Page if not installed.
I have searched on the internet but I haven't found anything conclusive.
If you guys know anything, or have you accomplished this task, it would be great if you can help with it.
If you need more info like, my activities code I can upload it, but I considered unimportant.
Thanks!
Two points:
In order to make a phone react to a beacon without your app installed (e.g. to launch a PlayStore page) you need an app prei-nstalled on all phones that does this for you. The Google Play Services app used to do this through the Nearby feature, but it was discontinued in Nov. 2018 because of spam concerns. Since then this is no longer possible to do.
If you do have your app installed it is a straightforward process to detect in the background and send notifications. The Android Beacon Library provides instructions here:. https://altbeacon.github.io/android-beacon-library/notifications.html
You could create a BoradcastReceiver that intercept the android.intent.action.BOOT_COMPLETED.
In that way, you can launch a part of your app when you turn on the device.
There, you can use a Service or something that can manage the interactions with Beacons.
(BTW, i never worked with Beacons, i don't know what are the policies that you must follow).
If you don't need to launch the app when the device is turned on, anyway you can use a simple Service
Here the link to the documentation of receivers documentation.
I want to know the process flow of android apps like i have an app in my device by which it blocks the apps in background. Eg - If the app is forbidding the whatsapp then there will not be any notification in the device untill and unless the app is opened by user.
I want to basic mechanism how the app is doing this as it blocks the apps and also disable data for that forbidden app.
You can not block notifications of any other Android Application or disable its background processes. You might be able to achieve that on a rooted device but that's something not appreciated.
Again if you want to disable data programmatically, you require a rooted device. You can read that here.
If you want to achieve Single-Purpose Device, read here.
Since Android Lollipop, the user can hide notifications of an application from Android settings.
I'm writing a parental control application and I'm searching for a way to disable this functionality.
Indeed, I want notifications to be always displayed, even if the child doesn't want to see them.
I saw that on tablets (not on phones) we can create a specific profile to block access to the settings app, but I don't want to lock the settings app, and the trick needs to work on phones too.
I also looked in manifest file to see if an option was there to explicitly enable/disable this but I found nothing.
Please note that my app does have admin privileges.
After hours of head scratching and hundred of coffees, nothing came to me from Android developer website or any other website, I'm desparated.
So finally, is there a way to disable the possibility to hide notifications in Android Lollipop?
Disabling the ability to hide unwanted notification would be undoing what that feature is. As far as I know there is no way to do that.
EDIT:
However - there is an broadcast send after each settings change (WiFi turn on / off etc.). Some settings blocking apps are using this to revert changes made before entering password - maybe there is an intent that does the same for hiding notification.
I was trying to port my existing app from SW 1 to SW 2 and stumbled upon the limitation that it is not allowed to have notifications and a control for the same app (even when setting LAUNCH_MODE to CONTROL).
As a workaround I tried to register 2 services, one for the notification and one for the control. As they share the same app package name, this didn't work and only the first that registered was available.
Is there a better workaround?
Or will this limitation be addressed in a future update? My app really depends on both, the notifications and the control.
A distant workaround may be to use only the Control, and build some sort of a notification mechanism as part of the Control. I did exactly that in my Log app: https://play.google.com/store/apps/details?id=eir.log
The notification mechanism is triggered by a different event, in the same BroadcastReceiver. Works wonderfully for me.
I believe this is indeed not possible today. One option for you would be to start up your control extension from a notification list item. So from where you read your notification you can enable a menu and then in that option start up your control. Have a look at the SMS app to get an idea.
Not possible and no workaround available. We have to wait for Sony to fix this issue though they haven't mentioned when they will address it.
We have posted a blog on Sony Developer World regarding this topic:
http://developer.sonymobile.com/2013/12/26/using-both-the-control-notification-apis-for-customised-uis-in-your-smartwatch-2-extension-code/
Basically what the title is saying. I'm trying to make a small app that can determine what audio file was just played for a notification, and react based on that. Is there a way to monitor all incoming notifications on android to get this effect?
I ended up going with the "Accessibility Service" as a way to read all incoming system notifications, and then handled them appropriately depending on what type of even was happening. I discovered that this is also how applications like Tasker handle similar functionality.
More information is available here:
http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html
No, the stream of notifications is not available to applications. (It would be a security hole, allowing any installed app to read your email, for example.)