2011年5月20日金曜日

Android User IDs and File Access

At install time, Android gives each package a distinct Linux user ID. The identity remains constant for the duration of the package's life on that device. On a different device, the same package may have a different UID; what matters is that each package has a distinct UID on a given device.
Because security enforcement happens at the process level, the code of any two packages can not normally run in the same process, since they need to run as different Linux users. You can use the sharedUserId attribute in theAndroidManifest.xml's manifest tag of each package to have them assigned the same user ID. By doing this, for purposes of security the two packages are then treated as being the same application, with the same user ID and file permissions. Note that in order to retain security, only two applications signed with the same signature (and requesting the same sharedUserId) will be given the same user ID.
 
Any data stored by an application will be assigned that application's user ID, and not normally accessible to other packages. When creating a new file with getSharedPreferences(String, int), openFileOutput(String, int), oropenOrCreateDatabase(String, int, SQLiteDatabase.CursorFactory), you can use the MODE_WORLD_READABLE and/orMODE_WORLD_WRITEABLE flags to allow any other package to read/write the file. When setting these flags, the file is still owned by your application, but its global read and/or write permissions have been set appropriately so any other application can see it.
 
R.attr
public static final int sharedUserId
Since: API Level 1
Specify the name of a user ID that will be shared between multiple packages. By default, each package gets its own unique user-id. By setting this value on two or more packages, each of these packages will be given a single shared user ID, so they can for example run in the same process. Note that for them to actually get the same user ID, they must also be signed with the same signature.
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.
Constant Value: 16842763 (0x0101000b)
 
public static final int sharedUserLabel
Since: API Level 3
Specify a label for the shared user UID of this package. This is only used if you have also used android:sharedUserId. This must be a reference to a string resource; it can not be an explicit string.
Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".
Constant Value: 16843361 (0x01010261)
 
public static final int largeHeap
Since: API Level 11
Request that your application's processes be created with a large Dalvik heap. This applies to all processes created for the application. It only applies to the first application loaded into a process; if using a sharedUserId to allow multiple applications to use a process, they all must use this option consistently or will get unpredictable results.
Must be a boolean value, either "true" or "false".
This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.
Constant Value: 16843610 (0x0101035a)
 
 

リコー、ペーパーレス会議を実現するiPadアプリ「TAMAGO Presenter」

 株式会社リコーは19日、ペーパーレス会議を実現するiPadアプリ「RICOH TAMAGO Presenter」を発表した。プロトタイプの位置づけで、App Storeから無償ダウンロードできる。
 RICOH TAMAGO Presenterは、iPadで会議資料を共有してペーパーレス会議を実現するアプリ。従来の会議では、紙資料の印刷・ホッチキス止め・差し替えなどの準備に手間がかかり、会議後には捨ててしまうこともしばしば。ムダが発生するほか、どの資料の説明をしているのか会議参加者が把握できないまま、会議が進んでしまうこともある。RICOH TAMAGO Presenterは、これらの課題を手軽に解決してくれる。

■資料を用意して「会議」を作成
 ペーパーレス会議を始めるために必要なものはiPadのみ。会議を主催する人が、資料をSafariまたはiTunesからiPadへダウンロードし、Presenterを起動して「会議作成」画面で新規会議を作成する。参加者はそれぞれのiPadでPresenterを起動し、「会議一覧」画面から任意の会議を選んで入室。入室パスワードを設定することも可能だ。
 参加者がそろったら資料を共有しての会議がスタート。資料は1会議につき3ファイルまで登録でき、会議主催者のiPadから全員のiPadへ無線LAN経由で転送される。

■会議をサクサク進められる軽快なUI
 会議が始まると発表者が会議を進行する。特徴はフリック操作して資料のページをめくると、無線LANを介して、その動きがすべてのiPadで反映される点だ。参加者が自分でページをめくる必要がないため、今どこを説明しているのか迷う心配がない。
 しかし、中には資料を先読みしたい人もいるだろう。その場合は画面上部の「同期・非同期ボタン」をタッチして「Share」を「Local」に変えればいい。「Local」モードの時には発表者以外の参加者も自由にページをめくることが可能となる。再び「Share」に戻せば、即座に現在進行中のページを表示してくれる。
 発表者の切り替えも可能だ。参加者が画面上部の「発表者」ボタンを押すと、即座に自分が発表者になれる。画面をフリックすれば、今まで発表者だった人のiPadも自動でページがめくられる。誰が発表者になるか、白熱した会議では「発表者」ボタンの取り合いになるかもしれない。それもまた軽快なUIだからこそ可能な楽しみだ。
 このほか、無線プロジェクタを使った画面投影にも対応する。「プロジェクタ」ボタンを押すと、自動で無線プロジェクタが検出され、iPadの画面上で利用したいプロジェクタを選択する――と、プロジェクタの電源まで自動でオンにしてくれる。
 会議が終わった後は参加者のiPadに資料は残らず、セキュリティも確保できる。とはいえ、後で資料を見返したい場合もあるので、PDF閲覧アプリ「GoodReader」への転送にも対応する。

■フィードバックから機能をシンプルに厳選
 非常にシンプルに、しかし効果的な機能を厳選した印象だ。利用にあたって、サーバーを用意しなくていい点も使いやすい。それもそのはず、「シンプルさがRICOH TAMAGO Presenterで目指したコンセプトでした」と、リコー グローバルマーケティング本部 ビジネスディベロップメントセンター クラウド開発室 TAMAGO-TFの岸宜之氏は語る。
 「どんな機能を搭載するかは、ユーザーに試用していただきフィードバックから吟味しました。例えば、別途サーバーを用意しなくていい点も、中小企業にも導入しやすいようこだわった部分です」。
 「もちろんこんな機能もあると便利というアイデアはたくさんありました。例えば、資料のダウンロードをGoogle Docsからも行えれば利便性は広がるかもしれない。しかし、お客さまの中にはNotes/Dominoを利用している方もいるでしょう。それらすべてのニーズに応えて複雑にしてしまうより、アプリ自体はシンプルなまま、必要に応じてほかのソリューションと連携・カスタマイズできる方向性にしました」。
 今後の新機能としては、手書きメモ機能、議事録作成に便利なPDFページ単位での会話録音機能、OCRを活用した画像取り込み機能、遠隔からの会議参加機能、ならびにAndroid対応などの追加を検討しているという。「どれを実現させるか、また実現したものを標準機能とするか、オプション機能とするかも、ユーザーのフィードバックを参考にするつもりです」(岸氏)。
 なお、動作条件は、iPad(3G+Wi-Fiモデル、Wi-Fiモデル)、iOS 4.2.1。接続環境は、IEEE 802.11a/b/g/n無線LAN(同一ブロードキャストドメイン内であること)。同時接続数に制限はないが、ネットワーク負荷の兼ね合いで1会議にiPad10台以下を推奨。閲覧できる文書フォーマットはPDFのみで、1文書あたり最大10MBまでを推奨する。連携するプロジェクタは「RICOH IPSiO PJ X3240N/IPSiO PJ WX3230N」。

■アイデアのタマゴを産み落とす「TAMAGO」プロジェクト
 同アプリは「TAMAGO」という新規事業を企画するプロジェクトにおいて開発された。「昨今、スマートデバイスの登場などITの環境は変化し、ペーパーレス会議のようなコスト削減策が次々と提案されてきています。とはいえ、紙やPCでこそ利便性やコストメリットが生み出される分野もある。当社としてはスマートデバイス、PC、紙それぞれのメリットをうまくすみ分けて、本当に便利なものを市場に提供したいと考えています。TAMAGOプロジェクトは、そういった新しい価値を、当社の従来製品と連携させながら提案していくのが目的で、TAMAGO Presenterはその第1号として産まれました」。
 従来、法人市場においては「複合機」のリコーだったが、最近では2010年にプロジェクタ市場に参入するなど、活躍の場を広げつつある。今後はテレビ会議などにも参入する予定で、今回のRICOH TAMAGO Presenterはその付加価値にもなる。
 そして、今後も新しい"タマゴ"が産み落とされていく予定だ。「RICOH TAMAGO Presenter以外にも、さまざまな"タマゴ"を"TAMAGO"ブランドで展開していきます。基本的には今回のようなプロトタイプをどんどん公開して、フィードバックを反映していく。いずれ立派なニワトリに成長することを目指し、タマゴを温めてヒヨコを孵(かえ)すイメージですね」。