top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Android: Getting the information of the package which created the intent

+2 votes
262 views

I changed the Android kitkat framework to add the logging statement whenever an application creates an intent. For the same I did changes in the file framework/base/core/java/android/content/Intent.java . However, there are different overloaded methods in this file for creating the intent. Some have the package info but other don't have.

Please let me know how to got the package from which the intent is created.

posted Jun 1, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+5 votes

I wanted to close the app (Say facebook app) that I open from my app via Intent.
Using intent I am providing option for users to open various apps installed in mobile. Now, I need to provide option to automatically close the opened app after 5-10 seconds.

Is it possible to achieve?
Thanks in advance.

+2 votes

As far as I know, when using forceStopPackage(), the alarm registered by this package will automatically unregistered. So does the same logic fit for jobscheduler? Please clarify

0 votes

Has anyone archived some third-party libs like jars, .so files into a module to generate an aar file? I put the .so files into jniLibs, but when I generate an aar files, I found the menu of the files was wrong with some empty dirs. And I put this aar file into my project, something goes wrong (crashes) when it calls .so files.

Can u help me to make it right?

+3 votes

I've been trying to figure out how an android app is installed by browsing AOSP.

The PackageManagerService.java has the gids for the corresponding permissions by parsing the platform.xml file.

PackageInstallerActivity parses and checks for any existing packages and then invokes the InstallAppProgress

I was able to follow the paths where the package is parsed and validated and PackagerManager.installPackage() method is invoked to install the package. I know this makes a native call to the JNI library. The corresponding aidl file is IPackageManager.aidl.

What I want to know is where can I find the Native cpp code related to this aidl mentioned above?

...