【Wearable / Material Design 満載】アプリ「Google I/O 2014」のソースコードが利用可能に

google_iosched 2

google_iosched

google/iosched

毎年ソースコード公開していますが, 勉強になります, これ.

どんな機能があるかを汎用的にまとめると

・ edit your personal schedule
・ Sync your schedule between all of your devices and website
・ View detailed Google+ profiles
・ +1 sessions right from the app
・ Participate in conversations on Google+
・ using the vector-based map
・ Get a reminder in your schedule are due to start
・ View information in the Developer Sandbox
・ Play live video streams
・ Beam from your NFC-enabled device to another using Android Beam
・ Scan on your NFC-enabled device
・ Send feedback from your phone/tablet, or from your Android Wear device

ビルド時の説明も細かくあります.

iosched_BUILDING_md_at_master_·_google_iosched

Building without Android Wear
If you do not wish to build the Android Wear component, you can remove or comment out the following line on android/build.gradle:

wearApp project(":Wearable")

Also, remove ':Wearable' from settings.gradle, leaving only ':android'.

iosched/BUILDING.md at master · google/iosched

確認する価値はあると思われます.

Google announced in a blog post that it has released the source code to the…
Google I/O 2014 App Source Code Now Available | Android Developers Blog


Tinder のような 横スワイプできるカードなUIライブラリ「AndTinder」

こんな人気記事あります.

2日で約3000語を暗記、スマフォ世代の英単語学習アプリ「mikan」はTinderライク - TechCrunch

mikanでは左右にスワイプすることで次々とカードをめくっていくようなUIを採用している。これは、去年あたりからアメリカの若者の間で流行している出会いアプリの「Tinder」が生み出し、多くのアプリが採用しているスマフォ・ネイティブといっていいUIだ。

「素早く振り分けができる」てことなのだろうが, Yes/No ボタンでも同じじゃね?

などと思いつつ, ライブラリを探す.

Swipeable-Cards/AndTinder at master · kikoso/Swipeable-Cards

20140730-133942

20140730-133956

20140730-134023

20140730-134040

使い方は簡単で,

レイアウト内に View コンテナとして埋め込んで,

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:orientation="vertical">

    <com.andtinder.view.CardContainer
        android:id="@+id/layoutview"
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1"/>
</LinearLayout>

利用 Activity でカード内のテキストと画像を指定.
スワイプ処理の Listener もここで.

public class MainActivity extends Activity {

  private CardContainer mCardContainer;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.mainlayout);

    mCardContainer = (CardContainer) findViewById(R.id.layoutview);

    Resources r = getResources();

    SimpleCardStackAdapter adapter = new SimpleCardStackAdapter(this);

    adapter.add(new CardModel("Title1", "Description goes here", r.getDrawable(R.drawable.picture1)));
    adapter.add(new CardModel("Title2", "Description goes here", r.getDrawable(R.drawable.picture2)));
    ...

    cardModel.setOnClickListener(new CardModel.OnClickListener() {
      @Override
      public void OnClickListener() {
        Log.i("Swipeable Cards","I am pressing the card");
      }
    });

    cardModel.setOnCardDimissedListener(new CardModel.OnCardDimissedListener() {
       @Override
       public void onLike() {
         Log.i("Swipeable Cards","I like the card");
       }

       @Override
       public void onDislike() {
         Log.i("Swipeable Cards","I dislike the card");
       }
    });

    adapter.add(cardModel);
    mCardContainer.setAdapter(adapter);
  }
}

このUI, 実際使ってみると, 気持ちよすぎてクセになるんだわー

Tinder


Google Play Store に apk をスクリプトでアップロードする

GoogleからこんなAPIが公開されています.

Awesome__Automated_Google_Play_publishing_via_an_API__May_add_this_into_my…

Awesome! Automated Google Play publishing via an API. May add this into my…

これまでのapkアップロードの方法は, ブラウザからapkをアップロードしていましたが.

APK-Google_Play_Developer_Console

このAPI何ができるのか.

API Reference - Google Play Developer API — Google Developers

ほとんどこれまでブラウザで操作してた「Google Developer Console」の内容は処理できる雰囲気.

apk を操作するのは以下.

Edits.apklistings

Edits.apks

サンプルとしてpythonなスクリプトあります.

google/google-api-python-client

android-play-publisher-api/v2/python at master · googlesamples/android-play-publisher-api

android-play-publisher-api-master/v2/python/
├── README.md
├── basic_list_apks.py
├── basic_list_apks_service_account.py
├── basic_upload_apks.py
├── client_secrets.json
├── update_listings.py
├── upload_apks_rollout.py
└── upload_apks_with_listing.py

とりあえず, スクリプトから PlayStore にアクセスして apk のアップロード済みリストを取得してみる.

$ python basic_list_apks.py
usage: basic_list_apks.py [-h] [--auth_host_name AUTH_HOST_NAME]
                          [--noauth_local_webserver]
                          [--auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]]
                          [--logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
                          package_name
$ python basic_list_apks.py com.sample.package
versionCode: 92, binary.sha1: b364588222644f011a027d8ca00c99590a67ede5
versionCode: 93, binary.sha1: bfe26c13974454e893192802fb0ef09bbb0e9678
versionCode: 94, binary.sha1: f5affe6fef705365fd53441889405c88c930c535

効率的に自動化する使い方ができそう.

まずは以下から, APIのIDとキーの取得からやるとわかりやすいかも.

Google_Developers_Console

Google Developers Console


北朝鮮からのスカッドミサイルはどこまできていたのか

韓国軍は、北朝鮮が26日夜、西海岸から日本海に向けて「スカッド」とみられる短距離弾道ミサイルを発射し、およそ500キロ飛んで日本海に着弾したと明らかにしました。

韓国軍の合同参謀本部によりますと、北朝鮮は26日午後9時40分ごろ、南北の境界線に近い西海岸のファンヘ南道リョンヨン郡付近から日本海に向けて、短距離弾道ミサイル1発を発射しました。
ミサイルはおよそ500キロ飛んで日本海に着弾したということで、射程などから「スカッド」とみられるとしています。

北朝鮮が弾道ミサイル 日本海に着弾 NHKニュース

以下ということなので,

・南北の境界線に近い西海岸のファンヘ南道リョンヨン郡
・およそ500キロ飛んで日本海

Google Mapで計測してみる.

龍淵郡_-_Google_マップ

どれくらいの距離感なのか.

龍淵郡_-_Google_マップ 5

龍淵郡_-_Google_マップ 4

龍淵郡_-_Google_マップ 3

龍淵郡_-_Google_マップ 2

もう, すぐ近くまで来てるのですよ.


Related Categories :  GoogleNews


【急げ! あれっ?】日本のChromecastユーザーに600円分の「Chromeプロモーションクーポン」

ダッシュですよ!

日本のChromecastユーザーに600円分の「Chromeプロモーションクーポン」をプレゼントする。

 クーポンを入手するには、Chromecastをセットアップしてchromecast.com/offersにアクセスする。このクーポンは、Google Playの映画の購入あるいはストリーミングで利用できる。クーポン提供は7月31日まで。入手方法はヘルプセンターを参照されたい。

Chromecastが発売1周年を祝して600円のGoogle Playクレジットをプレゼント - ITmedia ニュース

以下を読んでから,

Chromecast_プロモーション_クーポン_-_Chromecast_ヘルプ

Chromecast プロモーション クーポン - Chromecast ヘルプ

急いで以下のリンクにアクセスです!!

chromecast.com/offers

....

あれっ....

https___support_google_com_chromecast_answer_chromecast_com_offers

なにこれ..

・・・

5分後アクセスしたら表示されたが,

Chromecast

Chromecast 2

あれ?

これって, 米国のみのキャンペーンじゃね?

クーポンの入手方法はChromecastアプリを起動して、メニューリストの「クーポンを確認」をタップ。するとWEBブラウザが起動して利用可能なクーポン名が表示されるので、「利用」をタップすると適用されます。ただ、残念ながらクーポンの配信国は米国のみです。

Google、Chromecastの発売1周年を記念して音楽聴き放題サービス「All Access」の3ヶ月無料クーポンを購入者全員にプレゼント – ガジェット通信

処理を進めていくと, テレビ画面にはこんな風に表示されて,

写真

パソコン上では, こうなっちゃいました.

Google_Play_Music

うーむぅ...

600円クーポン....

...

あ....

(つづく)