1 package pl.org.nowoczesnapolska.wlmobi;
7 import org.json.JSONArray;
8 import org.json.JSONException;
10 import android.util.Log;
12 import com.phonegap.api.Plugin;
13 import com.phonegap.api.PluginResult;
15 public class MenuInterface extends Plugin{
17 public static String infoLabel = "Proszę czekać...";
18 public static Boolean infoEnabled = false;
21 public PluginResult execute(String action, JSONArray args, String callbackId) {
22 if (action.equals("setInfoButton")) {
24 return this.setInfoButton(args.getString(0), args.getString(1));
25 } catch (JSONException e) {
26 return new PluginResult(PluginResult.Status.ERROR, "Param errrors");
30 return new PluginResult(PluginResult.Status.INVALID_ACTION);
34 private PluginResult setInfoButton(String label, String enabled) {
36 infoEnabled = enabled.equals("true");
38 return new PluginResult(PluginResult.Status.OK);