我正在编写应用程序来打开HTML文件。 在某些设备(如Galaxy播放器,nexus one)中,当我尝试从电子邮件客户端打开html文件时,我的应用程序未显示在
“打开用”
打开“对话框,但如果我从我的应用程序显示的Gmail客户端打开相同的HTML文件
“打开用 ”
用“对话框打开。在其他设备(如Google nexus,S2等)中,我可以通过我的应用程序从电子邮件客户端,电子邮件客户端打开HTML文件。这是特定于设备的问题吗?
I am writing the application to open HTML files. In some devices (like Galaxy player,nexus one) when i try to open html file from Email client ,my application is not showing in
"open with"
open with " dialog ,but if i open the same HTML file from Gmail client my app is showing in
"open with "
open with" dialog . In other devices(like Google nexus ,S2 etc), i am able to open the HTML file through my application from Email client, Email client .is this device specific issue?
最满意答案
在某些设备中,电子邮件客户端没有以mime类型打开应用程序作为text / html.so我改变如下。
<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:mimeType="text/html"/> <data android:mimeType="text/plain"/> </intent-filter>然后,电子邮件应用程序可以在列表中显示我的应用程序。但它将显示我们何时使用opne HTML / Text文件。
In some devices Email client is not opening the app with mime type as text/html.so i changed like follows.
<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:mimeType="text/html"/> <data android:mimeType="text/plain"/> </intent-filter>Then email app is able to show my application in the list.but it will show when we tring to opne HTML/Text files.
更多推荐
HTML,打开,nexus,open,应用,电脑培训,计算机培训,IT培训"/> <meta name="descrip
发布评论