2013-06-29 37 views
3

我正在開發一個應用程序,並且我需要用戶能夠打開我的應用程序,例如,當從gmail應用程序或下載文件夾中單擊附件時,或者從「文件資源管理器」。用我的Android應用程序打開文件

我已經一直在使用谷歌搜索,甚至在這裏發現了一些問題,但我無法完成這項工作。

這是我Manifest.xml文件看起來像:

<receiver android:name="MySMS2CloudReceiver"> 
<intent-filter> 
    <action android:name="android.intent.action.ACTION_VIEW" /> 
    <action android:name="android.intent.action.ACTION_EDIT" /> 
    <action android:name="android.intent.action.ACTION_PICK" /> 
    <data android:scheme="http" /> 
    <data android:pathPattern=".*\\.xml" />  
    <data android:host="*" /> 
    <data android:mimeType="application/rss+xml" /> 
    <data android:mimeType="application/atom+xml" /> 
    <data android:mimeType="application/xml" /> 
    <data android:mimeType="text/xml" /> 
</intent-filter>  
</receiver> 

我的廣播接收器:

public class MySMS2CloudReceiver extends BroadcastReceiver { 
    @Override 
    public void onReceive(Context context, Intent intent) { 
     Log.d("MySMS2CloudReceiver", "Leaving onReceived..."); 
    } 
} 

但現在,當我從電子郵件,在彈出的點擊附加文件與標題「完成行動使用」我的應用程序甚至沒有列出...

任何想法可能發生什麼?

謝謝!

回答

相關問題