我的代码
public boolean queuePictureStreamForPrinting( Bitmap bMap )
{
Log.e( TAG, "Printing in queue");
//Uri uri = Uri.parse("file:///sdcard/PrintFolder/");
Uri uri = Uri.parse("file:///android_asset/www/images");
//uri = Uri.fromFile( bMap );
Intent i = new Intent(PRINT_ACTION );
i.setPackage("com.dynamixsoftware.printershare");
i.setDataAndType( uri, "application/x-android-picture-stream" );
i.putExtra( "scaleFitToPage", true );
startActivity( i );
return true;
}
当我通过该功能时,它会给我一个错误
01-06 16:38:12.647: E/AndroidRuntime(343): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.dynamixsoftware.printershare.print dat=file:///android_asset/www/images typ=application/x-android-picture-stream pkg=com.dynamixsoftware.printershare (has extras) }**
我做错了什么?
<activity android:name=".PrintUtils" android:label="@string/app_name">
<intent-filter>
<action android:name="android.content.Intent.ACTION_VIEW" />
<category android:name="android.intent.category.DEFAULT"/>
<grant-uri-permission android:path="com.dynamixsoftware.printershare" android:pathPattern="string" />
</intent-filter>
</activity>