You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

functions.native.js 942B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // @flow
  2. import { NativeModules } from 'react-native';
  3. import { toState } from '../base/redux';
  4. import { getServerURL } from '../base/settings';
  5. /**
  6. * Retrieves the default URL for the app. This can either come from a prop to
  7. * the root App component or be configured in the settings.
  8. *
  9. * @param {Function|Object} stateful - The redux store or {@code getState}
  10. * function.
  11. * @returns {string} - Default URL for the app.
  12. */
  13. export function getDefaultURL(stateful: Function | Object) {
  14. const state = toState(stateful);
  15. return getServerURL(state);
  16. }
  17. /**
  18. * Returns application name.
  19. *
  20. * @returns {string} The application name.
  21. */
  22. export function getName() {
  23. return NativeModules.AppInfo.name;
  24. }
  25. /**
  26. * Returns the path to the Jitsi Meet SDK bundle on iOS. On Android it will be
  27. * undefined.
  28. *
  29. * @returns {string|undefined}
  30. */
  31. export function getSdkBundlePath() {
  32. return NativeModules.AppInfo.sdkBundlePath;
  33. }