This repository was archived by the owner on Jul 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 136
Get app info by apk file #59
Open
faisalansari0367
wants to merge
3
commits into
g123k:master
Choose a base branch
from
faisalansari0367:getAppInfoByApkFile
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/bin/sh | ||
| # This is a generated file; do not edit or check into version control. | ||
| export "FLUTTER_ROOT=E:\AndroidStudio\flutter" | ||
| export "FLUTTER_APPLICATION_PATH=C:\Users\FAISAL\Documents\GitHub\flutter_plugin_device_apps\example" | ||
| export "FLUTTER_TARGET=lib\main.dart" | ||
| export "FLUTTER_BUILD_DIR=build" | ||
| export "SYMROOT=${SOURCE_ROOT}/../build\ios" | ||
| export "OTHER_LDFLAGS=$(inherited) -framework Flutter" | ||
| export "FLUTTER_FRAMEWORK_DIR=E:\AndroidStudio\flutter\bin\cache\artifacts\engine\ios" | ||
| export "FLUTTER_BUILD_NAME=1.0.0" | ||
| export "FLUTTER_BUILD_NUMBER=1" | ||
| export "DART_OBFUSCATION=false" | ||
| export "TRACK_WIDGET_CREATION=false" | ||
| export "TREE_SHAKE_ICONS=false" | ||
| export "PACKAGE_CONFIG=.packages" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| import 'dart:convert'; | ||
| import 'dart:typed_data'; | ||
|
|
||
| enum ApplicationCategory { | ||
| /// Category for apps which primarily work with audio or music, such as | ||
| /// music players. | ||
| audio, | ||
|
|
||
| /// Category for apps which are primarily games. | ||
| game, | ||
|
|
||
| /// Category for apps which primarily work with images or photos, such as | ||
| /// camera or gallery apps. | ||
| image, | ||
|
|
||
| /// Category for apps which are primarily maps apps, such as navigation apps. | ||
| maps, | ||
|
|
||
| /// Category for apps which are primarily news apps, such as newspapers, | ||
| /// magazines, or sports apps. | ||
| news, | ||
|
|
||
| /// Category for apps which are primarily productivity apps, such as cloud | ||
| /// storage or workplace apps. | ||
| productivity, | ||
|
|
||
| /// Category for apps which are primarily social apps, such as messaging, | ||
| /// communication, email, or social network apps. | ||
| social, | ||
|
|
||
| /// Category for apps which primarily work with video or movies, such as | ||
| /// streaming video apps. | ||
| video, | ||
|
|
||
| /// Value when category is undefined. | ||
| undefined | ||
| } | ||
|
|
||
| class App { | ||
| final String appName; | ||
| final String apkFilePath; | ||
| final String packageName; | ||
| final String versionName; | ||
| final int versionCode; | ||
| final String dataDir; | ||
| final bool systemApp; | ||
| final int installTimeMillis; | ||
| final int updateTimeMillis; | ||
| final Uint8List appIcon; | ||
| final ApplicationCategory category; | ||
|
|
||
| App({ | ||
| this.appIcon, | ||
| this.appName, | ||
| this.apkFilePath, | ||
| this.packageName, | ||
| this.versionName, | ||
| this.versionCode, | ||
| this.dataDir, | ||
| this.systemApp, | ||
| this.installTimeMillis, | ||
| this.updateTimeMillis, | ||
| this.category, | ||
| }); | ||
|
|
||
| static List<App> fromList(List<Map<String, dynamic>> list) { | ||
| return List<App>.generate(list.length, (int i) { | ||
| final Map<dynamic, dynamic> map = list[i]; | ||
| assert(map['app_name'] != null); | ||
| assert(map['apk_file_path'] != null); | ||
| assert(map['package_name'] != null); | ||
| assert(map['version_name'] != null); | ||
| assert(map['version_code'] != null); | ||
| assert(map['system_app'] != null); | ||
| assert(map['install_time'] != null); | ||
| assert(map['update_time'] != null); | ||
| if (map['app_icon'] != null) { | ||
| return App( | ||
| appName: map['app_name'], | ||
| apkFilePath: map['apk_file_path'], | ||
| packageName: map['package_name'], | ||
| versionName: map['version_name'], | ||
| versionCode: map['version_code'], | ||
| dataDir: map['data_dir'], | ||
| systemApp: map['system_app'], | ||
| installTimeMillis: map['install_time'], | ||
| updateTimeMillis: map['update_time'], | ||
| appIcon: base64Decode(map['app_icon']), | ||
| category: _parseCategory(map['category'])); | ||
| } else { | ||
| return App( | ||
| appName: map['app_name'], | ||
| apkFilePath: map['apk_file_path'], | ||
| packageName: map['package_name'], | ||
| versionName: map['version_name'], | ||
| versionCode: map['version_code'], | ||
| dataDir: map['data_dir'], | ||
| systemApp: map['system_app'], | ||
| installTimeMillis: map['install_time'], | ||
| updateTimeMillis: map['update_time'], | ||
| category: _parseCategory(map['category']) | ||
| // appIcon: base64Decode(map['app_icon']), | ||
| ); | ||
| } | ||
| }); | ||
| } | ||
|
|
||
| static ApplicationCategory _parseCategory(Object category) { | ||
| if (category == null || (category is num && category < 0)) { | ||
| return ApplicationCategory.undefined; | ||
| } else if (category == 0) { | ||
| return ApplicationCategory.game; | ||
| } else if (category == 1) { | ||
| return ApplicationCategory.audio; | ||
| } else if (category == 2) { | ||
| return ApplicationCategory.video; | ||
| } else if (category == 3) { | ||
| return ApplicationCategory.image; | ||
| } else if (category == 4) { | ||
| return ApplicationCategory.social; | ||
| } else if (category == 5) { | ||
| return ApplicationCategory.news; | ||
| } else if (category == 6) { | ||
| return ApplicationCategory.maps; | ||
| } else if (category == 7) { | ||
| return ApplicationCategory.productivity; | ||
| } else { | ||
| return ApplicationCategory.undefined; | ||
| } | ||
| } | ||
|
|
||
| @override | ||
| String toString() { | ||
| return 'Application{' | ||
| 'appName: $appName, ' | ||
| 'apkFilePath: $apkFilePath, ' | ||
| 'packageName: $packageName, ' | ||
| 'versionName: $versionName, ' | ||
| 'versionCode: $versionCode, ' | ||
| 'dataDir: $dataDir, ' | ||
| 'systemApp: $systemApp, ' | ||
| 'installTimeMillis: $installTimeMillis, ' | ||
| 'updateTimeMillis: $updateTimeMillis, ' | ||
| 'category: $category}'; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be exposed in the version control, you can delete it by using git interactive rebase from you commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how can i change these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just add the file name to .gitignore file or search in google to how to remove a file from a repository or how to add a file to .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you the maintainer of this plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have knowledge flutter and native side communication because i want to collaborate with you i want to add some features and want to develop a plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I am not maintainer of this plugin, yes I have some knowledge of flutter and native code, I can help you if you want.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are trying to develop a file manager you should also checkout FileX, jideguru has already done awesome work in it, if you want to contact me you can email me.