0

A previous developer for my company created an application that serves as the launcher for multiple types of android phones. These phones are given out to employees to use for business purposes so the application limits access on the phone to applications that are allowed by us.

The application works fine on all versions of Android up until Lollipop. On phones that have lollipop on them a user is able to access the settings from the notification bar (something that the app blocks on previous versions of Android) and also by long pressing on the home button, the google app is launched (that was also blocked by the application on phones that have versions less than lollipop. Package name for this application is com.google.android.googlequicksearchbox).

I have been researching this for a couple of days and I cannot figure out what has changed with lollipop to make the app stop working. I tried it on a motorolla turbo 2 and a galaxy s5 that are running lollipop and the problem exists on both.


I tried multiple solutions:

Override or disable settings menu this link does not work for because it would basically run my application every time the user tries to access settings, which is a feature that we still give as administrative privilege to some people

Detect home button press in android I tried this link, as well as other links to override the functionality of the long press on the Home button but I couldn't capture the press on the Home button.


Question:

Q1: Is there a way to disable access to settings from notification bar, like hide the settings icon from the notification bar or even disable notification bar completely?

Q2: Is there a way to intercept long presses on the Home Button or to change what the long press on the home button does? Any help would be much appreciated. Thank you

Community
  • 1
  • 1
Marline
  • 269
  • 3
  • 10

1 Answers1

0

Problem Fixed.
The application logic was to get the foreground application package using getRunningTasks(int maxNum) which does not work after the lollipop update, so I added the code from the answer to this question: How to get recent tasks on Android "L"?

Thank you Marcin Orlowski .

Community
  • 1
  • 1
Marline
  • 269
  • 3
  • 10