2011-07-20 17 views

答えて

3

コンタクトソースコードを一日中検索した後、私は次の解決策を考え出した:

  1. は、Googleの市場に行くとデータを取り込む「意図インターセプト」
  2. をインストールします。この場合は、次のようになります。

処置: android.intent.action.VIEW

データ:内容://com.android.contacts/data/1425

ウリ:内容://com.android.contacts/data/1425

タイプ

com.telenav.app.android.sprint

com.google.android.apps.maps

uk.co.ashtonbrsc:ヌル

3の活動は、この目的に合致します私はその後、私が得ている必要があるかを調べるためにドキュメントに行ってきました

...

.android.intentintercept

http://developer.android.com/guide/appendix/g-app-intents.html

あなたが想像していたように、私は「ジオ」スキームが使用されていないことにショックを受けました。 (なぜ私はソースコード内でgeo URIを見つけることができなかったのかを説明します)。


EDIT:私はアプリの意図-フィルタを実装しようとしています。それがこの作品...これをハックする

そう簡単ではありません - それはまた、「ビューの作業アドレス」以外の意図(良くない)

 <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 
      <category android:name="android.intent.category.DEFAULT" /> 

      <data android:mimeType="*/*" android:scheme="content" android:host="com.android.contacts" /> 

     </intent-filter> 

EDIT 2をキャプチャ:これは私はこのシナリオの

 <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
      <data android:mimeType="vnd.android.cursor.item/*" android:host="com.android.contacts" /> 
     </intent-filter> 

EDIT 3を考え出すことができる最高の意思-フィルタ:私はより良い行うことができます...これはEXACTインテントフィルタであります使用する

 <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
      <data android:mimeType="vnd.android.cursor.item/*" android:host="com.android.contacts" android:pathPrefix="/data" android:scheme="content"/> 
     </intent-filter> 
関連する問題