Quantcast
Channel: Yukiの枝折
Browsing all 146 articles
Browse latest View live

Bluetooth Low Energy

Android 4.3 (API Level 18) introduces built-in platform support for Bluetooth Low Energy in the central role and provides APIs that apps can use to discover devices, query for services, and read/write...

View Article


Travis CIをつかってGitHubのREADME.mdにbuildバッジをつけるまで.

Travis CI Site: https://travis-ci.org/Travis Lint: http://lint.travis-ci.org/Travis CIをつかってGitHubのREADME.mdにbuildバッジをつけるまで. Steps.まずはTravis CIに追跡させたいGitHub上のリポジトリを登録し紐づける. Travis...

View Article


gradleからdeploygateへアップロードする

Get Started.Projectルート直下にあるbuild.gradleにclasspathを追加. Moduleのbuild.gradleにdeploygate taskを追加.deploygate taskのパラメタをカスタマイズgradle uploadDeployGateでアップロードEdit...

View Article

Android : GoogleAnalyticsの導入

GoogleAnalyticsの簡単なサンプルです. Google Analytics Setup分析対象のアプリケーションからデータを受け取るアナリティクスプロパティとアプリビューを作成します. 詳細はGoogle Analytics V4の”詳細”セクションを参照. Add Google Play Services to Your ProjectGoogle Play...

View Article

Android : Google Sign-In

Google DevelopersPrerequisitesAndroid 2.3 以上, あるいは最新のGoogle Play Storeを搭載していること. 最新のAndroid SDK Toolsをインストールしていること.Google Play Service SDKをインストールしていること.コンパイルバージョンがAndroid2.3以上であること.Step 1: Google...

View Article


Android : EventBusでonEventが認識されない

onEventを実装しているがEventBusExceptionが発生し, Subscriberの登録に失敗する. EventBusはアプリのパッケージ名(applicationId)がjava, javaxまたはandroidから始まるものはSystemクラスのものとしてSubscriber登録をスキップする. //...

View Article

Android : AndroidStudio + PowerMock でstaticメソッドをmockする

確認環境Android Studio 1.1Android Gradle Plugin 1.1JUnit 4.12PowerMock 1.6.2はじめにAndroid Studio 1.1(android gradle plugin 1.1)からUnitTestがサポートされた. 今回はPowerMockを使ってstatic methodをモックするUnitTestを書いた. Android...

View Article

Android : Dagger

DaggerはSquare製のAndroidに特化された軽量で高速なDI Framework.@Injectによる依存関係の構築Google製のGuiceと比べてパフォーマンスが数倍速い@Injectでアノテートされたクラス間に依存関係をもたせ, ObjectGraphを構築していく. @Injectのアノテートはメソッドとフィールドに対して有効. class CoffeeMaker...

View Article


Android : Model-View-PresenterとAndroid

Model - View - Presenter と AndroidViewはデータを表示しユーザインタラクションを最前面で行う責務を持つUI層....

View Article


Android : Mortar - Say Goodbye to unwanted lifecycle

Mortar libraryこの章はmotar - GitHubの内容を参考に筆者の解釈のもと多くの加筆・修正が加えられています. Mortarについての正確な情報を確認するには上記のオリジナルページをご確認ください. 一言で言うと,...

View Article

Android Realm BrowserでRealmDBをのぞく

Android Realm BrowserでRealmの中身をのぞいてみるサンプル. サンプルプロジェクトはこちらはじめにRealmはモバイル向けに作られた軽量なNoSQL Database. 下記はAndroid向けに作られたrealm-javaについての記載である. パフォーマンスはSQLiteやOrmLite,...

View Article

Android : Robolectric 3.0

SetupAndroid Studio 1.2 で Robolectric3.0を準備する.build.gradleモジュールのbuild.gradleに下記ライブラリを追加.// UnitTest用. testCompile 'junit:junit:4.12' testCompile "org.mockito:mockito-core:1.9.5"// Robolectric用...

View Article

Android : espresso.contribでRecyclerViewをテスト

RecyclerViewのテストにespresso-contribライブラリを導入する.espresso-contribRecyclerViewActions: handles interactions with RecyclerViewsPickerActions: handles interactions with Date and Time pickers今回の環境は下記.Android...

View Article


RecyclerViewをModel-View-Presenterで書く

Writing RecyclerView by Model-View-Presenter RecyclerViewの実装をMVPアーキテクチャベースで実装する. MVPの実装を助けるライブラリとしてはmortarとdaggerを使用する. MainApp.javaアプリケーションスコープのMortarScopeを提供するためgetSystemServiceをオーバライドする....

View Article

Google I/O 2015

Keynote参考リンク Google I/O 2015 official https://events.google.com/io2015/Devivce“メールの検索が遅すぎる”そこからGMailプロダクトが始まった. GMap, YouTubeも同じく.さらに2つのプロダクトを作成した. Chrome. ブラウザが遅くセーフティではなかったからだ.Android. フラグメンテーション化され,...

View Article


Android M Preview 環境の準備

はじめに.M Preview環境のセットアップには下記サイトに従って進めるとよい. http://developer.android.com/preview/setup-sdk.html本稿は上記サイトをベースにいくつか加筆・修正したものとなる. Get Android Studio 1.3M Previewを試すにはAndroid Studio 1.3の環境を用意する必要がある....

View Article

Image may be NSFW.
Clik here to view.

Google Cloud Message 3.0 クイックスタート

参考https://developers.google.com/cloud-messaging/android/startGet ProjectGoogle公式のQuickStartアプリで簡単に始めることができる. サンプルプロジェクトは下記から取得する. $ git clone...

View Article


Image may be NSFW.
Clik here to view.

新しいパーミッションモデル - Runtime Permission

はじめに.caution!本稿はAndroid M Preview向けに限られた内容です. 本稿の一部または全てはM Preview以前のAndroid versionやM正式版で有効ではない可能性があります. 本稿の一部はPermissionsの内容を参考としています. より正確な情報を得たい場合はこちらもご参考ください. また,...

View Article

Image may be NSFW.
Clik here to view.

デバイス認証 - Confirm Credential

はじめにcaution!本稿はAndroid M Preview向けに限られた内容です. 本稿の一部または全ては既存のAndroid versionやAndroid M正式版およびそれ以降のAndroid versionにおいて有効ではない可能性があります. 本稿の一部はAuthenticationの内容を参考としています. より正確な情報を得たい場合はこちらもご参考ください. また,...

View Article

RecyclerView ItemTouchHelper

はじめにItemTouchHelper - Android DevelopersAndroid support libraryのRecyclerViewにItemTouchHelperが追加された. support library v22.2.0を導入することで使用できる. compile...

View Article
Browsing all 146 articles
Browse latest View live