0

So I am trying to create a project in which I have one activity with two buttons to start & stop my custom background service of the same app.

All I want in this service is to "show layout bounds" of all layout. To be more specific I want my background service to enable the show layout bounds option of developer options. How can I achieve this? I'm new to android but I guess that "show layout bounds" is a system service in the settings app. Now I want to use the same service in my app. Is it possible? For example, we can use the

getSystemService(WIFI_P2P_SERVICE)

and use the WiFi direct in our app. Can we do something like this to use the "show layout bounds" service?

Summing up : How can I use "show layout bounds" from developer options in my application?

Any references, ideas, links, appreciated.

Syed Rafaqat Hussain
  • 1,009
  • 1
  • 9
  • 33
  • Search for Accessibility Service (like https://developer.android.com/guide/topics/ui/accessibility/service). This seems the only possible way without requiring root access. – Meow Cat 2012 Mar 18 '21 at 07:11
  • (there's an app that does mostly the same thing, its package name is `com.toshiba_dealin.developerhelper` and I am not sure if it's on the Play Store.) – Meow Cat 2012 Mar 18 '21 at 07:17
  • Yes Accessibility service is what I needed & Thanks for that. But does it mean that I have to create my own accessibility service ? Can I not use the existing accessibility service ? – Hariprasad Mar 23 '21 at 03:02
  • A dev option is different from an accessibility service. Generally, it is not expected that an app would convince the users to turn the dev options on. – Meow Cat 2012 Mar 25 '21 at 06:03

0 Answers0