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