0
我尝试使用代码来实现对ARC从意图过滤器推出应用:谷歌浏览器ARC意图过滤器崩溃
<activity
android:name=".package.etc.MyActivity"
android:configChanges="mcc|mnc|locale|touchscreen|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
android:screenOrientation="sensorLandscape"
android:launchMode="singleTask"
android:label="@string/myactivity_name" >
<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:scheme="file" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.pdf" />
<data android:host="*" />
</intent-filter>
</activity>
在Android平板,它的工作原理。但在Chrome ARC应用程序崩溃。 Chrome ARC是否支持?
编辑
我得到了那一声
Fatal Exception: java.lang.IllegalArgumentException There is no Activity which handles filePath = file:///data/data/org.chromium.arc/external/C1373AC2527597D1C0BC66486DCC787F/Granizo.pdf mimeType=application/pdf
org.chromium.arc.helper.FileHandlerLaunchHelperActivity.buildLaunchIntent (FileHandlerLaunchHelperActivity.java:122)
org.chromium.arc.helper.FileHandlerLaunchHelperActivity.onMessage (FileHandlerLaunchHelperActivity.java:162)
org.chromium.arc.ArcMessageBridge$1.handleMessage (ArcMessageBridge.java:75)
org.chromium.arc.ArcMessageBridgeService$3.run (ArcMessageBridgeService.java:238)
EDIT 2
<activity
android:name="com.package.activities.MyActivity_"
android:configChanges="mcc|mnc|locale|touchscreen|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
android:screenOrientation="sensorLandscape"
android:launchMode="singleTask"
android:label="@string/myactivity_name" >
<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:scheme="file" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.pdf" />
<data android:host="*" />
</intent-filter>
</activity>
LogCat显示你什么? – CommonsWare
在chromebook上看不到logcat –
您当然可以。请参阅http://stackoverflow.com/a/29451047/115145和http://stackoverflow.com/a/29564350/115145和http://stackoverflow.com/a/32951857/115145 – CommonsWare