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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<link rel="import" href="../paper-button/paper-button.html"> | |
<polymer-element name="my-element"> |
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
#!/usr/bin/php | |
<?php | |
// your Google Cloud Messenger API Key | |
$gcm_api_key = 'YOUR_API_KEY'; | |
// array of registration IDs from Android devices (recipients of your push message) | |
$registration_ids = array('REGISTRATION_ID1', 'REGISTRATION_ID2'); | |
// data to be sent to the Android device |
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
package com.example.android.localbroadcastmanager; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.IntentFilter; | |
import android.support.v4.content.LocalBroadcastManager; | |
import android.support.v7.app.ActionBarActivity; | |
import android.os.Bundle; | |
import android.view.View; |
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
package com.example.android.sampleform; | |
import android.support.v7.app.ActionBarActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.widget.EditText; | |
/** | |
* Demonstrates the activity lifecycle and saving data before the activity is destroyed | |
*/ |
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
var crypto = require('crypto'); | |
// the Base64 encoded Google Play license key / Base64-encoded RSA public key from the Google Play Dev Console | |
var publicKey = "ABCEDF1234...."; | |
/** sample | |
{ | |
"orderId":"12999763169054705758.1371079406387615", | |
"packageName":"com.example.app", | |
"productId":"exampleSku", |
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
/* | |
* Copyright (C) 2016 Evan Halley | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
public class ConnectionStreamDetectionExample { | |
/** | |
* Returns the correct input stream based on the content encoding | |
* @param connection | |
* @return | |
* @throws IOException | |
*/ | |
private static InputStream getInputStream(HttpURLConnection connection) throws IOException { | |
InputStream inputStream = null; |
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
/** | |
* Interface for interacting with a media player | |
* Created by evanhalley on 11/18/15. | |
*/ | |
public abstract class MediaPlayer { | |
protected PremoMediaPlayerListener mMediaPlayerListener; | |
protected ProgressUpdateListener mProgressUpdateListener; | |
public MediaPlayer(PremoMediaPlayerListener mediaPlayerListener, |
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
/** | |
* Plays media playback on the device audio output | |
* Created by evanhalley on 11/18/15. | |
*/ | |
public class LocalMediaPlayer extends MediaPlayer implements ExoPlayer.Listener, | |
ProgressUpdateListener { | |
private static final String TAG = LocalMediaPlayer.class.getSimpleName(); | |
private static final int ALLOCATION_SIZE = 65_535; | |
private static final int BUFFER_SIZE = 10 * 1_024 * 1_024; |
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
package com.emuneee.parkright; | |
import android.app.Activity; | |
import android.os.Build; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import com.google.android.things.pio.Gpio; | |
import com.google.android.things.pio.GpioCallback; | |
import com.google.android.things.pio.PeripheralManagerService; |
OlderNewer