How to use the @ionic-native/core.CordovaFunctionOverride function in @ionic-native/core

To help you get started, we’ve selected a few @ionic-native/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ionic-team / ionic-native / src / @ionic-native / plugins / geofence / index.ts View on Github external
repo: 'https://github.com/cowbell/cordova-plugin-geofence',
  platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class Geofence extends IonicNativePlugin {
  TransitionType = {
    ENTER: 1,
    EXIT: 2,
    BOTH: 3
  };

  /**
   * Subscribe to get notified when a transition is received
   * @return {Observable}
   */
  @CordovaFunctionOverride()
  onTransitionReceived(): Observable { return; }

  /**
   * Initializes the plugin. User will be prompted to allow the app to use location and notifications.
   *
   * @returns {Promise}
   */
  @Cordova()
  initialize(): Promise { return; }

  /**
   * Adds a new geofence or array of geofences. For geofence object, see above.
   *
   * @returns {Promise}
   */
  @Cordova()
github ionic-team / ionic-native / src / @ionic-native / plugins / index-app-content / index.ts View on Github external
/**
   * Clear all items stored for a given array of identifiers
   * @param {string[]} identifiers Array of identifiers to clear
   * @return {Promise} Resolve if successfully
   */
  @Cordova()
  clearItemsForIdentifiers(identifiers: string[]): Promise {
    return;
  }

  /**
   * If user taps on a search result in spotlight then the app will be launched.
   * You can register a Javascript handler to get informed when this happens.
   * @returns {Observable} returns an observable that notifies you when he user presses on the home screen icon
   */
  @CordovaFunctionOverride()
  onItemPressed(): Observable {
    return;
  }

  /**
   * You might want to avoid to update spotlight index too frequently.
   * Without calling this function a subsequent call to manipulate the index is only possible after 1440 minutes (= 24 hours)!
   * @param {number} intervalMinutes value => 0
   */
  @Cordova()
  setIndexingInterval(intervalMinutes: number) {
    return;
  }
}
github ionic-team / ionic-native / src / @ionic-native / plugins / three-dee-touch / index.ts View on Github external
* @param {string} type (optional) A type that can be used `onHomeIconPressed` callback
   * @param {string} title Title for your action
   * @param {string} subtitle (optional) A short description for your action
   * @param {string} iconType (optional) Choose between Prohibit, Contact, Home, MarkLocation, Favorite, Love, Cloud, Invitation, Confirmation, Mail, Message, Date, Time, CapturePhoto, CaptureVideo, Task, TaskCompleted, Alarm, Bookmark, Shuffle, Audio, Update
   * @param {string} iconTemplate (optional) Can be used to provide your own icon
   */
  @Cordova({
    sync: true
  })
  configureQuickActions(quickActions: ThreeDeeTouchQuickAction[]): void { }

  /**
   * When a home icon is pressed, your app launches and this JS callback is invoked.
   * @returns {Observable} returns an observable that notifies you when he user presses on the home screen icon
   */
  @CordovaFunctionOverride()
  onHomeIconPressed(): Observable {
    return;
  }

  /**
   * Enable Link Preview.
   * UIWebView and WKWebView (the webviews powering Cordova apps) don't allow the fancy new link preview feature of iOS9.
   */
  @Cordova({
    sync: true
  })
  enableLinkPreview(): void {}

  /**
   * Disabled the link preview feature, if enabled.
   */