私はオーディオストリーミングアプリを構築しています。メディアプレーヤーを起動するために使用するコードは次のとおりです。
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("http://wunh.org:8000/"), "audio/*");
startActivity(intent);
このコードは、私の Droid フォン (Android 2.3.4) で正常に動作します。電話のメディア プレーヤーが起動し、ステーションが再生されます...
ただし、Nexus 7 (Android 4.2) では機能しません。「Google Play ミュージック」と「ビデオ プレーヤー」の両方が同じエラー コードで失敗します。
12-04 11:49:25.373: E/MediaPlayer(13331): エラー (1,-1004)
UPD: 関連するすべての logcat エントリは次のとおりです。
12-04 14:04:21.573: D/MediaPlayer(17933): Couldn't open file on client side, trying server side
12-04 14:04:21.573: I/AwesomePlayer(128): setDataSource_l(URL suppressed)
12-04 14:04:21.583: V/ChromiumHTTPDataSource(128): connect on behalf of uid 10036
12-04 14:04:21.583: I/ChromiumHTTPDataSource(128): connect to <URL suppressed> @0
12-04 14:04:21.633: I/ActivityManager(481): Displayed com.google.android.music/.AudioPreview: +83ms
12-04 14:05:24.733: I/ChromiumHTTPDataSourceSupport(128): Request failed with status 4 and os_error -118
12-04 14:05:24.733: I/AwesomePlayer(128): mConnectingDataSource->connect() returned -1004
12-04 14:05:24.733: E/MediaPlayer(17933): error (1, -1004)
12-04 14:05:24.733: E/MediaPlayer(17933): Error (1,-1004)
どんな提案でも大歓迎です。
-ドミトリー