This file contains hidden or 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
| angular.module('constants',[]) | |
| .constant('ENV',{ | |
| name: 'dev', | |
| baseUrl: 'http://dev.whatever.com', | |
| magicKey: '123-456-789', | |
| someOtherThing: { | |
| id: 1, | |
| arrayOfSomeStuff: [1,2,3,4,5] | |
| } | |
| }); |
This file contains hidden or 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
| angular.module('starter.controllers', ['svl.popout']) | |
| .controller('MainCtrl', function($scope, $ionicPopover,svlPopoutDelegate) { | |
| $scope.toggled = false; | |
| $scope.radOffset = -Math.PI/4; | |
| $scope.radStep = Math.PI/8; | |
| $scope.showPopout = function($event){ | |
| if ($scope.toggled){ | |
| svlPopoutDelegate.hide(); |
This file contains hidden or 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
| .config(function($stateProvider, $urlRouterProvider) { | |
| $stateProvider | |
| .state('app', { | |
| url: '/app', | |
| abstract: true, | |
| templateUrl: 'templates/menu.html', | |
| controller: 'AppCtrl' | |
| }) |
This file contains hidden or 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
| package com.sciencevikinglabs.reverseplugin; | |
| import org.apache.cordova.CordovaWebView; | |
| import org.apache.cordova.CallbackContext; | |
| import org.apache.cordova.CordovaPlugin; | |
| import org.apache.cordova.CordovaInterface; | |
| import org.json.JSONArray; | |
| import org.json.JSONException; | |
| import org.json.JSONObject; |
This file contains hidden or 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
| <intent-filter> | |
| <action android:name="android.intent.action.SEND" /> | |
| <category android:name="android.intent.category.DEFAULT" /> | |
| <data android:mimeType="text/plain" /> | |
| </intent-filter> |
This file contains hidden or 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
| .config(function($stateProvider, $urlRouterProvider) { | |
| $stateProvider | |
| .state('app', { | |
| url: '/app', | |
| abstract: true, | |
| templateUrl: 'templates/menu.html' | |
| }) | |
| .state('app.weather', { |
This file contains hidden or 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
| ionic plugin add https://github.com/phonegap-build/PushPlugin.git | |
| ionic add ngCordova | |
| ionic add ionic-service-core | |
| ionic add ionic-service-push |
This file contains hidden or 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
| angular.module('yourTotallyAwesomeApp') | |
| .run(function($ionicPlatform, $ionicPush, $ionicUser) { | |
| $ionicPlatform.ready(function() { | |
| //A cheat check to make sure we're on a device | |
| if(window.plugins){ | |
| $ionicPush.register({ | |
| canRunActionsOnWake: true, | |
| onNotification: function(notification) { |
This file contains hidden or 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
| device_token = 'example_token' | |
| ionic_private_key = 'your_ionic_private_key_here' | |
| ionic_app_id = 'your_ionic_app_id_here' | |
| form_data = { | |
| 'tokens' => [device_token], | |
| 'notification' => { | |
| 'alert' => "Hello Push World!", | |
| 'android' => { | |
| 'payload' => { |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| public class FireBullet : MonoBehaviour { | |
| public GameObject bullet; | |
| public float maxCoolDown; | |
| private float timer; | |
| private bool canShoot; |