API-23 で「can’t find referenced class org.apache.http.*」

API-23 に上げるとサードパーティなライブラリ群に対して, こんな...

error

削除されているのですね.

API_Differences_between_22_and_23

API Differences between 22 and 23

各ライブラリが対応されるまではどうしたらよいのか.

...
android {
       useLibrary 'org.apache.http.legacy'
       ...
}
...

Apache HTTP connection with Android 6.0 (Marshmallow) - Stack Overflow

なんだか気持ち悪い.

動作の変更点 | Android Developers


C2DM 終了 GCMへの移行は10月までに

こんなの表示されてます. デベロッパーコンソール.

c2dm_gcm

C2DM のサポートがまもなく終了 Android Cloud to Device Messaging(C2DM)のサポートが完全に終了し、以降のサポートが提供されなくなることを 4 月に発表いたしました。C2DM は、次世代の C2DM である Google クラウド メッセージング(GCM)に代わります。C2DM を使用しているアプリの GCM への移行に十分な時間をかけられるよう、移行期限は 10 月まで延長されています。

ClientLogin for Google Cloud Messaging (GCM) has been shut down - Google グループ

該当するかどうかは, 「gcm.jar」 を利用しているかをみればよい.と.

C2DM をまだ使用しているアプリがある場合は、できる限り速やかに GCM に移行してください。2015 年 10 月までにアプリを最新の GCM ライブラリに移行しないと、C2DM プッシュ メッセージングが正常に機能しなくなります。C2DM を使用しているかどうかは、実装で gcm.jar ライブラリまたは GCM ヘルパー ライブラリを使用しているかで判断できます。

取得したトークンの文字列自体ははそのまま使えるのだろうと思います.

Cloud Messaging   |   Google Developers

変更の詳細手順は以下から.

Try Cloud Messaging for Android   |   Cloud Messaging   |   Google Developers


JSON の処理速度を4倍以上にアップできる「LoganSquare」

The fastest JSON parsing and serializing library available for Android. Based on Jackson's streaming API, LoganSquare is able to consistently outperform GSON and Jackson's Databind library by 400% or more1. By relying on compile-time annotation processing to generate code, you know that your JSON will parse and serialize faster than any other method available.

benchmarks

For the curious, the buildscript and apply plugin lines add the apt plugin, which is what allows us to do compile-time annotation processing. The first dependency is what tells Gradle to process your JSON annotations, and the second dependency is our tiny 19kb runtime library that interfaces with the generated code for you.

hvisser / android-apt — Bitbucket

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
    }
}
apply plugin: 'com.neenbedankt.android-apt'

dependencies {
    apt 'com.bluelinelabs:logansquare-compiler:1.1.0'
    compile 'com.bluelinelabs:logansquare:1.1.0'
}

bluelinelabs/LoganSquare


Android の タッチイベント とか

今や重なりあったアクション付きのUIが流行りとなり, 当然「タッチイベント」も重なり合ってくるわけでのメモ.

devsbuild_it_sites_default_files_PRE_andevcon_mastering-the-android-touch-system_pdf

andevcon_mastering-the-android-touch-system.pdf

「親から子(背面から前面)に伝わっていく」ので, activity → view.

Android のタッチイベントを理解する(その1) - Unmotivated

なので, 早めに捉えると範囲が広く, 遅めに捉えると限定的で実装手間も少なくできる.

Android: Difference between onInterceptTouchEvent and dispatchTouchEvent? - Stack Overflow

親で伝搬を止める.

...
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
    boolean response = super.onInterceptTouchEvent(event);
    float x = event.getX();
    switch (event.getActionMasked()) {
    case MotionEvent.ACTION_DOWN:
        mTouchX = x;
        break;
    case MotionEvent.ACTION_MOVE:
        float dX = Math.abs(x - mTouchX);
        if (dX > minSwipeDistance)
            return true;
        break;
    }
    return response;
}
...

子から伝搬を止めるのをやめさせる.

...
findViewById(R.id.button)
    .getParent()
    .requestDisqllowInterceptTouchEvent(true);
...

ほとんどのユーザからのイベントは重なっていることを実感するなど.

Correctly detecting a swipe on a GridView placed inside a ViewPager in Android - Stack Overflow


コードを貼るだけ簡単で綺麗な「Share Button」

簡単で綺麗ですよ.

とりあえず貼っておけばいいですよね, こーゆーの.

Share_Button_-_give_your_website_more_social_traffic 2

Share_Button_-_give_your_website_more_social_traffic

スマホでもこんなかんじに表示されます.

20150118-141400

5行のコードを貼るだけです.

Share_Button_-_give_your_website_more_social_traffic 3

まずは貼って試してみよう!!

Share Button - give your website more social traffic