Disable the possibility to hide notifications in Android Lollipop - android

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.

Related

Android notifications service

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.

How to detect lock and unlock of screen pinning on android

I am working on an android app that should be used by students in some kind of practical test.
I am using the screen pinning that was introduced in Lollipop (startLockTask()), so when my app is launched the user needs to allow the locking.
I couldn't find a way to know when the user click ok for the locking and when he unlock the pinning? (The user can cancel the lock by holding both the Back and Recent buttons).
I am not looking for a way to know if the user currently in lock screen (getLockTaskModeState ()), i want to know if i have a way to handle the events of locking or unlocking.
I want that in the begining of the test i will be able to send information to my server if the users 'logged in' properly (by allowing the lock), and as well if the user unlock the device before the end of the test.
EDIT
Hey, people!
Please explain yourselves after downvoting!
If I wasn't exaplaining myself - i will try again if you will let me know.
I read a lot of questions and answers about general lock screen, but not the one of app pinning, I also read about check the status of the current task- if it is locked or not, but i didn't find answer to what i am asking - is there a way to handle the event of unlocking the 'screen pinning' of a specific app.
So please, explain your downvotes!
Device Admin Recevier class give you the event of pinning and unpinning... However the example use the class when the installed app is provisioned for device owner.. Not sure if you could use it. You may refer to this too : How to be notified when screen pinning is turned off in Android 5.0 Lollipop?
https://developer.android.com/reference/android/app/ActivityManager.html#getLockTaskModeState()
Just use the function as stated in the link.

Disable notifications in Android

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.

How to disable Accessibility "TalkBack" in your application?

My application uses TTS (text-to-speech) Engine, and the conflict I am running into is that Accessibility Talkback settings override anything TTS tries to say. I would like to disable the phone's talkback option if using my application.
Is there some sort of permission to handle this? I have not been able to find anything.
I know it's late, but I had the same problem few days ago.
If you want to "ovverride" the TalkBack with your own TTS engine you can simply add:
android:importantForAccessibility = "no"
to each view inside your Layout.
Now you can call your TtsSpeak() method inside your Activity.
IMPORTANT: This does not turn off the TalkBack App, but it will allow you to have a little bit more control over your App.
That is not allowed unless the phone is rooted. The accessibility functions on the phone are not to be changed by a developer, as a blind person may need them to use the phone.
Lg P875: having tried out Accessibility mode, the phone locked me out from scrolling - thus unable access Availability facility to reverse process. Nothing in User manual.
By accident I found selecting Settings icon, tap twice followed by long push on same icon. The screen released and I was able to terminate Talkback key. All back to normal, no thanks to LG user manual

Android OS - Stop user from closing app or using any OS functionality

My team is trying to build an Android application for a tablet that will be dedicated for this sole purpose. One of the requirements is that the application is the only thing running on the device (at least from the user's point of view). The user should not be able to close it or use any other functionality from the OS (settings, other apps, etc.).
We have been doing some research and so far have not found anything. Is this we are trying to do even possible ? Does anybody have any idea how we could approach this ? Maybe blocking the buttons ?
Thanks,
It is possible but would be ugly in the long run without a custom built rom (http://xda-developers.com has instructions on how to do this), I wouldn't know where to start code wise - but there are a couple of applications which portray this kind of functionality - TodlerLock is one such app - its designed to stop todlers from from doing anything on the device, whilst the application keeps them entertained. It appears to intercept all button presses and acts as a home application to do this for the home button.
Then there are the programs like estrongs security manager that allows a user to set a password for some or all applications and basically stops the application being run without the password (it appears to intercept the intents and opens the security manager requesting the password first, if it fails it finishes the intent) - this maybe a much easier option to use something like this - you could set a password for most things, including settings and the security application itself, everything bar your application. This will stop the user doing anything you dont want them doing without the password.
You would have to set up the device for the user before hand though, as any home screen intercepter application can be changed but the user - so you would have to set the default, then lock access to the settings so the user can't change this action.
I think the only way of doing this to have your own custom version of Android built only for you. Get the android source, remove what ever you don't want and build it. I am not sure if you would ever want not to close it but you can make sure they can't install anything else on your ROM.
Im not sure about this, but, intercept the home intent and write your own custom home?
It sounds a lot simpler than writing your own custom rom.
This is not possible without OS changes. You cannot override the home button.

Categories

Resources