jaredrummler/APKParser

Questions about the library

Closed this issue · 7 comments

  1. Can it parse Intent-Filters?
  2. How is it in terms of memory? I remember the original library (for PC) was quite memory consuming, which caused OOM sometimes when I tried it on Android:
    hsiafan/apk-parser#19
  3. Can you please put a sample too, and not just a library?
    Also, can you split the code , so that it would be possible to use via gradle? Maybe via https://jitpack.io/ ?
  4. What about the license? Does it require to put info about the repo in the "about" screen of apps, or something?

Can it parse Intent-Filters?

No, but I will add this.

How is it in terms of memory? I remember the original library (for PC) was quite memory consuming, which caused OOM sometimes when I tried it on Android:
hsiafan/apk-parser#19

Depends on usage. Parsing a single APK should not cause an OutOfMemoryError.

Can you please put a sample too, and not just a library?
Also, can you split the code , so that it would be possible to use via gradle? Maybe via https://jitpack.io/ ?

I'll add it to maven central soon. Probably in a couple weeks. This is not a high priority project for me. I just added a sample project but all it does for now is parse the AndroidManifest.xml. I will add more samples in the following weeks.

What about the license? Does it require to put info about the repo in the "about" screen of apps, or something?

Putting it in the about section of your app is fine. The original author of the library already addressed this.

  1. This might help:
    hsiafan/apk-parser@73643b1
  2. No matter how large the APK is?
  3. Thank you.
  4. Nice. Should it be pointed to here, or to the other project, or both?
  1. Thanks, I just added it. Example usage:
ApplicationInfo appInfo = getPackageManager().getApplicationInfo("com.android.settings", 0);
ApkParser parser = ApkParser.create(appInfo);
AndroidManifest manifest = parser.getAndroidManifest();
for (AndroidComponent activity : manifest.activities) {
  String activityName = activity.name;
  List<IntentFilter> intentFilters = activity.intentFilters;
  // do stuff
}
  1. It depends what you are doing. If you are only getting the AndroidManifest you should be good. All it is doing is extracting and parsing the AndroidManifest.xml from the APK (ZIP).

  2. Pointed here. All you are required to do is include the license in your project: https://raw.githubusercontent.com/jaredrummler/apk-parser/master/LICENSE.txt

  1. Thank you. Please put the sample code in the project as a sample, or at least on the main page

  2. Nice !

  3. English isn't my main language, and it looks like "lawyer" language, which even in Hebrew it's hard for me to understand. :(

Added to the README

Feel free to use the library in any of your projects; BSD is a permissive license. All you need to do is add attribution somewhere in your app (many apps don't even do this).

You can find many examples in the Play Store on how others show licenses for open source projects. There are some good libraries for attribution here.

Added to maven central. See the README.

Thank you for all you effort.