Skip to content

Commit

Permalink
Merge pull request #33 from qliqdev/isSupported
Browse files Browse the repository at this point in the history
android added isSupported method;
  • Loading branch information
johnborges authored Apr 10, 2023
2 parents 8ac0c1f + afd7ef0 commit 01e47ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public AppIconBase(Activity activity, Context context) {
activeIconName = "";
}

public Boolean isSupported() {
return true;
}

public String getName() {
ComponentName componentName = new ComponentName(this.activity, this.activity.getClass());
int status = pm.getComponentEnabledSetting(componentName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ public void load() {
implementation = new AppIconBase(this.getActivity(), this.getContext());
}

@PluginMethod()
public void isSupported(PluginCall call) {
JSObject r = new JSObject();
r.put("value", implementation.isSupported());
call.resolve(r);
}

@PluginMethod()
public void getName(PluginCall call) {
JSObject r = new JSObject();
Expand Down

0 comments on commit 01e47ca

Please sign in to comment.