This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'> | |
<style> | |
.onoffswitch { | |
position: relative; width: 120px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example Dynamic Link | |
this.firebaseDynamicLinks.onDynamicLink() | |
.then((res: any) => directTheUserToContent(res)) | |
.catch((error: any) => console.error(error)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sample app.component.js | |
import { Component } from '@angular/core'; | |
import { Platform } from 'ionic-angular'; | |
import { StatusBar, Splashscreen } from 'ionic-native'; | |
import { TabsPage } from '../pages/tabs/tabs'; | |
// Branch import | |
declare var Branch; | |
@Component({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app.component.ts | |
constructor() { | |
const branchInit = () => { | |
if (!platform.is('cordova')) { return } | |
Branch.initSession( (data) => { | |
console.log('Branch Initialized'); | |
if (data.$deeplink_path) { | |
this.logger.logEvent('deeplink', {}); | |
console.log('Routing Link' + JSON.stringify(data.$deeplink_path)); | |
this.routeLink(data.$deeplink_path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app.module.ts | |
import { InAppPurchase2 } from '@ionic-native/in-app-purchase-2'; | |
// ... | |
providers: [ InAppPurchase2 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configurePurchasing() { | |
if (!this.platform.is('cordova')) { return; } | |
console.log('Starting Configurations'); | |
let productId; | |
try { | |
if (this.platform.is('ios')) { | |
productId = this.program.appleProductId; | |
} else if (this.platform.is('android')) { | |
productId = this.program.googleProductId; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fired when a purchase has been approved by the store | |
this.store.when(productId).approved() | |
// Fired when a purchase is registered with the store | |
this.store.when(productId).registered() | |
// Fired if a purchase is updated | |
this.store.when(productId).updated() | |
// If the user cancels a purchase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Previous Video That A User Might Go Back To --> | |
<video [hidden]="!isCurrent" [autoplay]="isCurrent" muted="true" playsinline looped preload="auto"></video> | |
<!-- Current Video That Should Autoplay --> | |
<video [hidden]="!isCurrent" [autoplay]="isCurrent" muted="true" playsinline looped preload="auto"></video> | |
<!-- Next Video, Preloaded for content --> | |
<video [hidden]="!isCurrent" [autoplay]="isCurrent" muted="true" playsinline looped preload="auto"></video> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// workout-completion.page.ts | |
animations: [ | |
trigger('shift', [ | |
state('previous', style({ | |
opacity: 0, | |
transform: 'translateX(-100%)', | |
'-webkit-transform' :'-webkit-translateX(-100%)' | |
})), | |
state('current', style({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// workout-completion.page.ts | |
public vidState1 = 'previous'; | |
public vidState2 = 'current'; | |
public vidState3 = 'next'; | |
@ViewChild('video1') video1; | |
@ViewChild('video2') video2; | |
@ViewChild('video3') video3; | |
// Setup Video Buffer Array, which will contain the urls that we wish to load into each video element | |
public videoBuffer: Array<any> = [this.emptyVideo, this.emptyVideo, this.emptyVideo]; | |
public emptyVideo = { |
OlderNewer