1

I want to create an application in android where at some point all the messaging application should be disabled to use for the user.

I am preparing a background process that will keep watching the users action on the android device. In some particular scenerios I want to restrict user of using any type of messaging application, that is to ultimately restrict him/her from typing text. I hope this gives you a better idea on my needs.

To implement that I need to know whether the currently running application is having a messaging feature or not. I want to know this from development point of view

Can anyone suggest on this ?

sbhatt
  • 381
  • 1
  • 4
  • 16

1 Answers1

3

You can do it using the intent worn the action intent_SEND. This is a similar question and the first accepted answer is what you are looking for .... how to get list of installed instant messenger apps?

Community
  • 1
  • 1
Sami Eltamawy
  • 9,874
  • 8
  • 48
  • 66
  • Thanks for the link. what I understand here is using intent_SEND we can worn once user tries to send the message, but my actual requirement is like user should not be able to open the application that has messaging feature. Also I want to make this enabling/disabling on run time in some fixed criteria. Will that help me in doing so ? – sbhatt Mar 01 '14 at 16:20
  • All the apps that can handle the messaging feature are programatically registered in the `BroadCastReceiver` with filter of `intent_SEND`. **So, you cannot prevent apps from receiving this intent** It is out of your scope – Sami Eltamawy Mar 01 '14 at 16:24
  • @Shraddhabhatt, feel free to ask any further questions and if you find my answer useful don`t forget to vote it up. – Sami Eltamawy Mar 01 '14 at 16:25
  • Got your point, I appreciate your efforts, I have one more question, can that be done like even though the application is opened by the user, but the user should not be able to type any text in that case ? – sbhatt Mar 01 '14 at 16:49
  • @Shraddhabhatt, You want to prevent user from typing in the other apps? – Sami Eltamawy Mar 01 '14 at 16:56
  • Yes user should not be allowed to type text in some fixed criteria – sbhatt Mar 01 '14 at 16:58
  • in your app or other apps? – Sami Eltamawy Mar 01 '14 at 16:59
  • I am preparing a background process that will keep watching the users action on the android device. In some particular scenerios I want to restrict user of using any type of messaging application, that is to ultimately restrict him/her from typing text. I hope this gives you a better idea on my needs. – sbhatt Mar 01 '14 at 17:02
  • That can be any texting app, like whats app, viber, etc – sbhatt Mar 01 '14 at 17:03
  • I understand you now. I am afraid to tell you that you are not allowed to do that. Google prevents any app to intersect the user action inside other apps to prevent the Malwares and Viruses from the harmful actions – Sami Eltamawy Mar 01 '14 at 17:04
  • ok but what I think here is If I get a list of apps that has a messaging feature on runtime I can just disable the KeyBoard access for user. How that appeals ? – sbhatt Mar 01 '14 at 17:09
  • Here there will be no intervention on other applications. – sbhatt Mar 01 '14 at 17:09
  • No, you can`t. Simple you will disable it and the application will enable it. – Sami Eltamawy Mar 01 '14 at 17:12
  • Didn`t you find any of the above statements useful enough to give my vote up! – Sami Eltamawy Mar 01 '14 at 17:13