Skip to content

Instantly share code, notes, and snippets.

@dagezi
Created March 12, 2014 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dagezi/9507492 to your computer and use it in GitHub Desktop.
Save dagezi/9507492 to your computer and use it in GitHub Desktop.
Potatotips #5 markdown

Googleの人から教えてもらった tips

Quipper

dagezi@{twitter, github, gmail.com}

adb lolcat

lolcat

logcatになるだけです

# adb lolcat
W/ActivityManager(  602): Unable to start service Intent { act=com.extscreen.service } U=0: not found
W/ActivityManager(  602): Unable to start service Intent { act=com.extscreen.service } U=0: not found
W/ActivityManager(  602): Duplicate finish request for ActivityRecord{663a00c0 u0 android/com.android.internal.app.ResolverActivity t96 f}
I/ActivityManager(  602): Process com.twitter.android (pid 20696) has died.
I/ActivityManager(  602): Process com.google.android.apps.plus (pid 20733) has died.
I/ActivityManager(  602): Process com.nianticproject.ingress (pid 23720) has died.
I/ActivityManager(  602): Process android.process.media (pid 20769) has died.
I/ActivityManager(  602): Process android.process.acore (pid 20809) has died.
D/MobileDataStateTracker(  602): default: setPolicyDataEnable(enabled=true)
I/ActivityManager(  602): Process com.google.android.keep (pid 21537) has died.
I/ActivityManager(  602): Process com.android.providers.calendar (pid 19267) has died.
I/PowerManagerService(  602): Going to sleep by user request...
I/ActivityManager(  602): Config changes=480 {1.0 440mcc10mnc ja_JP ldltr sw360dp w598dp h335dp 4

お試しを!

ここから本題

強制アップデートさせてみた

Quipper

dagezi@{twitter, github, gmail.com}

自己紹介

SASAKI Takesi (佐々木毅史) aka dagezi (大个子)

Q

教育関係の会社で Androidエンジニアやってます。

Quipperは Android、iOS、Rubyエンジニアなど募集してます!

Androidで専用端末

  • 例:某社の教育用デバイス
  • 配布後に updateしたい
  • GooglePlay使えない
  • Androidなダイアログだしたくない

でも system権限とれる!

AppDater作った

  • Serviceとして起動
  • 定期的に配布サイトチェック
  • 更新されていれば背後で取得
  • 頃合いを見てインストール
  • プロンプトとか一切出ません! UIはアプリで制御可能
  • ユーザは拒否できない!

インストーラの実際

f Paul Nonaka氏ありがとう!

うまく動いた!!

  • 半年間で 1000人ほどに 18回アップデートしほぼ成功

できてない点

  • インストールのステータス取得
  • エラーとかがコールバックで帰ってこない!
  • 回避策: PackageManager#getPackageInfo でうまく行ったかチェック
  • インストール失敗時の復帰に弱い
  • Systemの Certが必要
  • こればかりは現状では... rootを取ればできるかもしれないけど。

今後

  • Openにしようと思った
  • deploy環境も含めて提供したい
  • でもニッチすぎる
  • 内部的にはこれからも使うよ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment