use of com.getcapacitor.JSObject in project capacitor-firebase by robingenz.
the class FirebasePerformancePlugin method isPerformanceCollectionEnabled.
@PluginMethod
public void isPerformanceCollectionEnabled(PluginCall call) {
Boolean enabled = implementation.isPerformanceCollectionEnabled();
JSObject result = new JSObject();
result.put("enabled", enabled);
call.resolve(result);
}
use of com.getcapacitor.JSObject in project capacitor-firebase by robingenz.
the class FirebaseAnalyticsPlugin method logEvent.
@PluginMethod
public void logEvent(PluginCall call) {
String name = call.getString("name");
if (name == null) {
call.reject(ERROR_NAME_MISSING);
return;
}
JSObject params = call.getObject("params");
implementation.logEvent(name, params);
call.resolve();
}
use of com.getcapacitor.JSObject in project capacitor-jitsi-meet by calvinckho.
the class Jitsi method leaveConference.
@PluginMethod()
public void leaveConference(PluginCall call) {
Intent leaveBroadcastIntent = BroadcastIntentHelper.buildHangUpIntent();
LocalBroadcastManager.getInstance(getContext()).sendBroadcast(leaveBroadcastIntent);
JSObject ret = new JSObject();
ret.put("success", true);
call.resolve(ret);
}
use of com.getcapacitor.JSObject in project capacitor-updater by Cap-go.
the class CapacitorUpdaterPlugin method notifyDownload.
public void notifyDownload(int percent) {
JSObject ret = new JSObject();
ret.put("percent", percent);
notifyListeners("download", ret);
}
use of com.getcapacitor.JSObject in project capacitor-updater by Cap-go.
the class CapacitorUpdaterPlugin method list.
@PluginMethod
public void list(PluginCall call) {
ArrayList<String> res = implementation.list();
JSObject ret = new JSObject();
ret.put("versions", new JSArray(res));
call.resolve(ret);
}
Aggregations