Skip to content

Instantly share code, notes, and snippets.

View flyingzl's full-sized avatar
🎯
Focusing

石头 flyingzl

🎯
Focusing
  • Chengdu,China
View GitHub Profile
@flyingzl
flyingzl / gist:c587e20bb264c3049546834c5177961a
Created June 17, 2016 10:48 — forked from amitsaxena/gist:9cb0712e572c39a41edc
CustomURL: Launch app if app is installed, else open an alternate URL (Android all browsers)
<script type="text/javascript">
var custom = "myapp://custom_url";
var alt = "http://mywebsite.com/alternate/content";
var g_intent = "intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end";
var timer;
var heartbeat;
var iframe_timer;
function clearTimers() {
clearTimeout(timer);
//
// API.swift
//
// Created by Taro Minowa on 6/10/14.
// Copyright (c) 2014 Higepon Taro Minowa. All rights reserved.
//
import Foundation
typealias JSONDictionary = Dictionary<String, AnyObject>
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'