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
apply plugin: 'com.android.application' | |
apply plugin: 'android-apt' | |
apply plugin: 'android-power-assert' | |
group = 'net.granoeste' | |
version = '1.0.0' | |
def AAVersion = '3.0.1' | |
android { |
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
<plugin> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<configuration> | |
<source>1.6</source> | |
<target>1.6</target> | |
<encoding>UTF-8</encoding> | |
<!-- does not work. --> | |
<!-- | |
<compilerArguments> | |
<AandroidManifestFile>${project.basedir}/src/main/AndroidManifest.xml</AandroidManifestFile> |
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> | |
<script> | |
window.MediaSource = window.MediaSource || window.WebKitMediaSource; | |
function testTypes(types) { | |
for (var i = 0; i < types.length; ++i) | |
console.log("MediaSource.isTypeSupported(" + types[i] + ") : " + MediaSource.isTypeSupported(types[i])); | |
} |
setup maven-android
####環境変数 export ANDROID_HOME=/opt/android_sdk_linux
####Maven Android SDK Deployer のインストール git clone https://github.com/mosabua/maven-android-sdk-deployer.git cd maven-android-sdk-deployer
####SDKをMavenリポジトリへインストール
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.google.cast</groupId> | |
<artifactId>com.google.cast</artifactId> | |
<version>1.0.6</version> | |
<packaging>apklib</packaging> | |
<name>com.google.cast</name> |
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
import android.content.Context; | |
import android.os.Handler; | |
import android.os.Looper; | |
import com.squareup.otto.Bus; | |
public final class BusProvider { | |
private static final Object sLock = new Object(); | |
private static MyBus sInstance; |
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
Thread.currentThread().equals(context.getMainLooper().getThread()); |
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
/* Input / Output Memo */ | |
BufferedReader r = new BufferedReader( | |
new InputStreamReader( | |
new FileInputStream( filename ), encoding )); | |
String line = r.readLine(); |
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 MyApplication extends Application { | |
@Override | |
public void onCreate() { | |
// To use the CookieSyncManager, the host application has to call the following when the application starts: | |
CookieSyncManager.createInstance(this); | |
} | |
} |