我正在尝试播放一个网址,但它没有播放,而我使用的代码在下面......日志显示Mediaplayer错误(1,-1002),开始状态为0,错误(-38,0)为什么......?我哪里出错了......你可以帮帮我怎么玩........
import java.io.IOException;
import android.app.Activity;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;
public class BacaFatihahActivity extends Activity {
final String songs_urIs= "http://stream.radiosai.net:8002/";
// private TextView txt_song_title;
private MediaPlayer mediaplayer;
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ImageButton btn_play = (ImageButton) findViewById(R.id.button_play);
ImageButton btn_pause = (ImageButton) findViewById(R.id.button_pause);
ImageButton btn_next = (ImageButton) findViewById(R.id.button_next);
ImageButton btn_previous = (ImageButton) findViewById(R.id.button_Previous);
//txt_song_title = (TextView) findViewById(R.id.txt_song_title);
mediaplayer = new MediaPlayer();
mediaplayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
btn_play.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
try { …Run Code Online (Sandbox Code Playgroud) 我想为手机创建一个插件,它传递并返回javascript和android之间的值.
任何人都可以建议如何做到这一点?
任何身体都可以帮助如何在Android媒体播放器中流式传输实时网址...我尝试了这么长但相同的结果....如果有任何身体之前做过的话请帮助
我们可以通过android中的异步任务流式传输音频文件.如果你做了,给我一个例子.
大家好我试图上传一个PDF文件到我的PHP服务器脚本我pdf文件是在Android手机上它将只在SD卡上所以我想通过javascript使用phonegap打开Android设备的SD卡.