0

I need an event to watch if the root accessibility is taken or not on android device.

I did without using eventlistener. This program stores the root access information on SQLite database. In some period, it checks the current root access info and stored root access info. If it is changed, it gives warning. But i want to give warning as soon as the root access info changed, not in some period.

How can i do that? Is custom event listener works for that? I need recommendation for the best way.

SBerg413
  • 14,515
  • 6
  • 62
  • 88
aysbtl_
  • 339
  • 1
  • 3
  • 18

1 Answers1

0

As I understood that you want to check if device is rooted or not? Then this link may helps you:Determine if running on a rooted device
Note that, it can be dangerous to do apply the suggestions on the link. Have a look at my answer there.

By the way, rooting needs shutdown/restart on device so you don't need an event listener or sth like that. That will be useless. Just query at your applications startup (which means onCreate of your application) if device is rooted or not by suggestions at link I've posted.

Community
  • 1
  • 1
Devrim
  • 15,345
  • 4
  • 66
  • 74
  • I did this issue by using SQLite. It's not detect as soon as changed. I mentioned above. I used RootTools library. It checks every 5 min. and updates database.. But I will look also this link. Thank you;) – aysbtl_ Oct 25 '13 at 13:03