Skip to content
This repository was archived by the owner on May 3, 2021. It is now read-only.

Commit c30087c

Browse files
authored
Merge pull request #2 from LayoutXML/generic-object
Added generic object
2 parents d44276a + b7d8c48 commit c30087c

File tree

6 files changed

+19
-7
lines changed

6 files changed

+19
-7
lines changed

.idea/caches/build_file_checksums.ser

0 Bytes
Binary file not shown.

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog for AppListManager (Android Library)
22

3+
## Version 2.1.0
4+
5+
- Added a new generic type object to AppData (variable called object). It is an additional variable that you can use for your own needs. If you need multiple variables, create a new wrapper object (new type) to hold those variables. Can be used with `getObject()` and `setObject(Object)`, where Object is any type.
6+
37
## Version 2.0.0
48
**NOTE**: This version introduces backwards incompatible changes. Follow the steps below on how to solve issues.
59

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ AppListManager is easy to use Android library, which minimizes developing time w
1111

1212
To receive application and activity lists using this library you must implement listeners and invoke methods. Additionally, to receive these lists automatically you must also register a receiver (in the manifest file and code). All listeners must be registered, and all unfinished tasks must be destroyed. Guide below explains exactly how to do all that. You can also inspect the included sample app that uses most of the features.
1313

14-
**NOTE**: Version 2.0.0 introduces backwards incompatible changes. Check the steps in [CHANGELOG.md](https://github.com/LayoutXML/AppListManager/blob/master/CHANGELOG.md) on how to solve issues.
15-
1614
[Download sample app from the Google Play store](https://play.google.com/store/apps/details?id=com.layoutxml.applistmanager).
1715

1816
**Step 1: Add the JitPack repository in your root build.gradle at the end of repositories:**
@@ -28,7 +26,7 @@ allprojects {
2826
**Step 2. Add the dependency:**
2927
```
3028
dependencies {
31-
implementation 'com.github.LayoutXML:AppListManager:2.0.0'
29+
implementation 'com.github.LayoutXML:AppListManager:2.1.0'
3230
}
3331
```
3432

@@ -132,6 +130,7 @@ AppData object contains these properties of applications and activities:
132130
4. ActivityName (*String*) - activity name you would want to use for identifying or launching activities. For applications this variable is set to null.
133131
5. PackageName (*String*) - application package name. For activities it's still application package name.
134132
6. Permissions (*String[]*) - application permissions. For activities it's still application permissions.
133+
7. Object (*Object* (any object type)) - additional variable that you can use for your own needs. If you need multiple variables, create a new wrapper object (new type) to hold those variables.
135134

136135
All these variables have getters and setters that can be used with `.set<Name>` and `.get<Name>`. For example, package name can be accessed with `.getPackageName()` and `.setPackageName(String)`.
137136

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66
applicationId "com.layoutxml.applistmanager"
77
minSdkVersion 14
88
targetSdkVersion 28
9-
versionCode 92
10-
versionName "2.0.0"
9+
versionCode 97
10+
versionName "2.1.0"
1111
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1212
}
1313
buildTypes {

applistmanagerlibrary/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66
defaultConfig {
77
minSdkVersion 14
88
targetSdkVersion 28
9-
versionCode 92
10-
versionName "2.0.0"
9+
versionCode 97
10+
versionName "2.1.0"
1111

1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313

applistmanagerlibrary/src/main/java/com/layoutxml/applistmanagerlibrary/objects/AppData.java

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class AppData {
1515
private Integer flags;
1616
private String activityName;
1717
private String[] permissions;
18+
private Object object;
1819

1920
public String[] getPermissions() {
2021
return permissions;
@@ -65,6 +66,14 @@ public void setIcon(Drawable icon) {
6566
this.icon = icon;
6667
}
6768

69+
public Object getObject() {
70+
return object;
71+
}
72+
73+
public void setObject(Object object) {
74+
this.object = object;
75+
}
76+
6877
@Override
6978
public boolean equals(Object o){
7079
if(o instanceof AppData){

0 commit comments

Comments
 (0)