2011-09-29 56 views

回答

1

我敢肯定的是Google+應用具有文本/純和圖像/ *意圖過濾器。下面是他們在清單:

<activity android:theme="@style/CircleBrowserTheme" android:name=".phone.PostActivity" android:launchMode="singleTop" android:logo="@drawable/ic_menu_stream"> 
     <intent-filter> 
      <action android:name="android.intent.action.SEND" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
      <data android:mimeType="text/plain" /> 
     </intent-filter> 
     <intent-filter> 
      <action android:name="android.intent.action.SEND" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
      <data android:mimeType="image/*" /> 
     </intent-filter> 
     <intent-filter> 
      <action android:name="android.intent.action.SEND_MULTIPLE" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
      <data android:mimeType="image/*" /> 
     </intent-filter> 
    </activity> 

所以,你應該能夠putExtra一個字符串到你的意圖和的setType(「text/plain的」),並且將最有可能的工作就好了。看起來你不能同時發送文本和圖片,但是,因爲G +上的SEND_MULTIPLE只拍攝圖像。

相關問題