【发布时间】:2020-04-24 12:17:46
【问题描述】:
我正在开发安卓应用程序
在编写代码以获取“正在加载”的流媒体标题时,我无法在希伯来语中收到标题
但我收到了他的胡言乱语
如果有人能帮我解决这个问题,我会很高兴的 enter image description here
@Override
protected IcyStreamMeta doInBackground(URL... urls)
{
try
{
streamMeta.refreshMeta();
Log.e("Retrieving MetaData","Refreshed Metadata");
}
catch (IOException e)
{
Log.e(MetadataTask2.class.toString(), e.getMessage());
}
return streamMeta;
}
@Override
protected void onPostExecute(IcyStreamMeta result)
{
try
{
title_artist=streamMeta.getTitle();
Log.e("Retrieved title_artist", title_artist);
if(title_artist.length()>0)
{
textView.setText(title_artist);
}
}
catch (IOException e)
{
Log.e(MetadataTask2.class.toString(), e.getMessage());
}
}
}
class MyTimerTask extends TimerTask {
public void run() {
try {
streamMeta.refreshMeta();
} catch (IOException e) {
e.printStackTrace();
}
try {
String title_artist=streamMeta.getTitle();
Log.i("ARTIST TITLE", title_artist);
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
【问题讨论】:
-
添加代码和避免粘贴链接的要求是有原因的。绕过它们只会让你的问题结束。请张贴Minimal, Reproducable Example,而不是链接到很多代码。
标签: java android url stream hebrew