Skip to content

Commit 01e47ca

Browse files
authored
Merge pull request #33 from qliqdev/isSupported
android added isSupported method;
2 parents 8ac0c1f + afd7ef0 commit 01e47ca

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

android/src/main/java/com/mycompany/plugins/example/AppIconBase.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ public AppIconBase(Activity activity, Context context) {
3030
activeIconName = "";
3131
}
3232

33+
public Boolean isSupported() {
34+
return true;
35+
}
36+
3337
public String getName() {
3438
ComponentName componentName = new ComponentName(this.activity, this.activity.getClass());
3539
int status = pm.getComponentEnabledSetting(componentName);

android/src/main/java/com/mycompany/plugins/example/AppIconPlugin.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ public void load() {
1616
implementation = new AppIconBase(this.getActivity(), this.getContext());
1717
}
1818

19+
@PluginMethod()
20+
public void isSupported(PluginCall call) {
21+
JSObject r = new JSObject();
22+
r.put("value", implementation.isSupported());
23+
call.resolve(r);
24+
}
25+
1926
@PluginMethod()
2027
public void getName(PluginCall call) {
2128
JSObject r = new JSObject();

0 commit comments

Comments
 (0)