How to use the @capacitor/core.HapticsImpactStyle.Light function in @capacitor/core

To help you get started, we’ve selected a few @capacitor/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 jgw96 / Wavex / src / components / track-detail / track-detail.tsx View on Github external
async share() {
    console.log(location.href);
    console.log(location.origin);
    console.log(location.hostname);

    let shareURL = location.href;

    if (location.origin.includes('localhost')) {
      shareURL = `https://wavex-app.firebaseapp.com/${location.pathname}`;
    }

    if (Haptics) {
      Haptics.impact({
        style: HapticsImpactStyle.Light
      })
    }

    if (Share && !(window as any).Windows) {
      await Share.share({
        title: 'wavex',
        text: 'Check out this podcast!',
        url: shareURL,
        dialogTitle: 'Share this podcast'
      });
    }
    else if ((window as any).Windows) {
      console.log('trying to share');
      const DataTransferManager = (window as any).Windows.ApplicationModel.DataTransfer.DataTransferManager;

      const dataTransferManager = DataTransferManager.getForCurrentView();
github jgw96 / Wavex / src / components / pod-detail / pod-detail.tsx View on Github external
async share() {
    console.log(location.href);
    console.log(location.origin);
    console.log(location.hostname);

    let shareURL = location.href;

    if (location.origin.includes('localhost')) {
      shareURL = `https://wavex-app.firebaseapp.com/${location.pathname}`;
    }

    if (Haptics) {
      Haptics.impact({
        style: HapticsImpactStyle.Light
      })
    }

    if (Share && !(window as any).Windows) {
      await Share.share({
        title: 'wavex',
        text: 'Check out this podcast!',
        url: shareURL,
        dialogTitle: 'Share this podcast'
      });
    }
    else if ((window as any).Windows) {
      console.log('trying to share');
      const DataTransferManager = (window as any).Windows.ApplicationModel.DataTransfer.DataTransferManager;

      const dataTransferManager = DataTransferManager.getForCurrentView();
github jgw96 / Wavex / src / components / app-intro / app-intro.tsx View on Github external
async getStarted() {
    if (Haptics) {
      Haptics.impact({
        style: HapticsImpactStyle.Light
      })
    }
    
    const nav: any = await (this.nav as any).componentOnReady();
    nav.setRoot('app-home', null, { animated: false, direction: 'forward' });
    localStorage.setItem('seen', 'true');
  }
github jgw96 / Wavex / src / components / app-root / app-root.tsx View on Github external
async homePlay() {
    if (this.musicSrc) {

      if (Haptics) {
        Haptics.impact({
          style: HapticsImpactStyle.Light
        })
      }

      this.playing = true;
      if (this.audioEl) {
        await this.audioEl.play();

        if ((window as any).ExperimentalBadge) {
          (window as any).ExperimentalBadge.set();
        }

        if ((window as any).Windows) {
          this.systemMediaControls.playbackStatus = (window as any).Windows.Media.MediaPlaybackStatus.playing;
        }
      }
    } else {
github ionic-team / capacitor / example / src / pages / haptics / haptics.ts View on Github external
hapticsImpactLight(style) {
    this.hapticsImpact(HapticsImpactStyle.Light);
  }