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

Commit

Permalink
Merge pull request #2 from LayoutXML/generic-object
Browse files Browse the repository at this point in the history
Added generic object
  • Loading branch information
LayoutXML authored Nov 9, 2018
2 parents d44276a + b7d8c48 commit c30087c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for AppListManager (Android Library)

## Version 2.1.0

- 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.

## Version 2.0.0
**NOTE**: This version introduces backwards incompatible changes. Follow the steps below on how to solve issues.

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ AppListManager is easy to use Android library, which minimizes developing time w

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.

**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.

[Download sample app from the Google Play store](https://play.google.com/store/apps/details?id=com.layoutxml.applistmanager).

**Step 1: Add the JitPack repository in your root build.gradle at the end of repositories:**
Expand All @@ -28,7 +26,7 @@ allprojects {
**Step 2. Add the dependency:**
```
dependencies {
implementation 'com.github.LayoutXML:AppListManager:2.0.0'
implementation 'com.github.LayoutXML:AppListManager:2.1.0'
}
```

Expand Down Expand Up @@ -132,6 +130,7 @@ AppData object contains these properties of applications and activities:
4. ActivityName (*String*) - activity name you would want to use for identifying or launching activities. For applications this variable is set to null.
5. PackageName (*String*) - application package name. For activities it's still application package name.
6. Permissions (*String[]*) - application permissions. For activities it's still application permissions.
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.

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)`.

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "com.layoutxml.applistmanager"
minSdkVersion 14
targetSdkVersion 28
versionCode 92
versionName "2.0.0"
versionCode 97
versionName "2.1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
4 changes: 2 additions & 2 deletions applistmanagerlibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 92
versionName "2.0.0"
versionCode 97
versionName "2.1.0"

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class AppData {
private Integer flags;
private String activityName;
private String[] permissions;
private Object object;

public String[] getPermissions() {
return permissions;
Expand Down Expand Up @@ -65,6 +66,14 @@ public void setIcon(Drawable icon) {
this.icon = icon;
}

public Object getObject() {
return object;
}

public void setObject(Object object) {
this.object = object;
}

@Override
public boolean equals(Object o){
if(o instanceof AppData){
Expand Down

0 comments on commit c30087c

Please sign in to comment.