2014-10-17 73 views
0

我的应用程序下载.zip,.js和.png,我想用另一个名为Blocklauncher的应用程序打开它们。 Blocklauncher有一个特定的活动设置来打开这些文件。对于.js文件有一个意图过滤器设置,因此应该打开它们。但.zip和.png文件并不那么容易。继承人什么.png文件活动看起来像BlockLunchers清单Android - 用另一个特定的应用程序打开文件

<activity android:name="net.zhuoweizhang.mcpelauncher.api.ImportSkinActivity"> 
      <intent-filter> 
       <action android:name="net.zhuoweizhang.mcpelauncher.action.SET_SKIN" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:mimeType="image/png" /> 
      </intent-filter> 
     </activity> 
     <activity-alias android:name="net.zhuoweizhang.mcpelauncher.ImportSkinActivity"  
android:exported="true" 
android:targetActivity="net.zhuoweizhang.mcpelauncher.api.ImportSkinActivity" /> 
     <activity android:name="net.zhuoweizhang.mcpelauncher.api.ImportTexturepackActivity"> 
      <intent-filter> 
       <action android:name="net.zhuoweizhang.mcpelauncher.action.SET_TEXTUREPACK" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:mimeType="*/*" /> 
      </intent-filter> 
     </activity> 

任何人有任何想法?谢谢!

回答

1

那么,如果BlockLauncher导入脚本与此:

Intent intentMTex = new Intent("net.zhuoweizhang.mcpelauncher.action.IMPORT_SCRIPT"); 
Uri texMPath = Uri.fromFile(new File(Environment.getExternalStorageDirectory().getPath() + "/Download/","Mech_Texture.zip")); 
intentMTex.setDataAndType(texMPath, "text/plain"); 

你有没有试图改变

intentMTex.setDataAndType(texMPath, "text/plain"); 

Intent("net.zhuoweizhang.mcpelauncher.action.IMPORT_SCRIPT); 

intentMTex.setDataAndType(texMPath, "image/png"); 

Intent("net.zhuoweizhang.mcpelauncher.action.SET_SKIN); 

? ():P

相关问题