How to get all target filters for an application (using root)

I am working on a system application and I need to know programmatically what application intentions can process. I saw other questions related to this, but none of them seemed to answer, but did not seem to care about system privileges.

The PackageManager only seems to provide methods for requesting actions for a given intent. I cannot find a way to get intentions for this type of activity.

For example, if I have an activity that has intent filters defined as such:

<intent-filter>
    <action android:name="android.intent.action.BOOT_COMPLETED"/>
    <action android:name="android.intent.action.USER_PRESENT"/>
</intent-filter>

And I know the name of the project class and the name of the package, I would like to know from the package manager (or any other source) what it can handle (in this case, BOOT_COMPLETEDtoo USER_PRESENT).

+4
source share
3 answers
Good question. I don’t think it’s possible to find out what intentions an application can handle. Some standard actions and translation actions are listed in http://developer.android.com/reference/android/content/Intent.html . If you are writing your own application that has its own filters for intentions, then I do not think that other applications will know what might affect your application, because there is no way to publish them or announce them to the world, I suppose.

But it’s possible that you can make a call for a specific intent, and if it returns null, then you know for sure that there are no applications on the device that can handle this particular intent.

NTN.

+3

, , :

Android - ?

5-

, , , . , .

+1

you can try the decompiler, for example "DexDump" (available on GooglePlay), and get the "AndroidManifest.xml" application that you want to learn about.

0
source

Source: https://habr.com/ru/post/1524598/


All Articles