Autore Topic: Shoutcast streaming - Ok su Emulatore No su Dispositivi reali  (Letto 2031 volte)

Offline GoldenV

  • Nuovo arrivato
  • *
  • Post: 7
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Huawei Sonic 2.3.4 -- SmartPad M705c ICS 4.0.3
  • Sistema operativo:
    Win 7 (Ice version)
Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« il: 06 Aprile 2012, 01:09:31 CEST »
0
Salutoni a tutti, vi spiego il problema:
premettendo che sono alle primissime armi con Android, ho creato la mia prima app che permette di ascoltare uno streaming audio Shoutcast, per il recupero dei metadata ho utilizzato il parsing di un url testuale relativo al canale radio,(in sintesi è l'url dei singoli metadata), ripeto sono alle prime armi, quindi ho cercato di arrangiarmi.

L'ho creata basandomi su SDK Android 2.3.3 standard, e sull'emulatore funziona tutto bene.

Ho il mio Vodafone Sonic, non so perchè ma non mi viene riconosciuto dal PC ("driver non trovati per il dispositivo") e di conseguenza non ho potuto fare il testing direttamente sul cell, invece dell'emulatore.

Per testare su device allora ho dovuto esportare l' apk e installarla a parte.

L'installazione si conclude correttamente e anche avviando l'app tutto bene... il problema sorge sul click del bottone "play", non si avvia lo streaming e nemmeno si aggiornano i metadata sulla TextView... Il tutto resta come in attesa e ci rimane sino a che non mi compare un messaggio per scegliere se terminare l'app manualmente o attendere che riprenda..

Vi posto quà sotto il Log, naturalmente è il log legato all'esecuzione dell'app su emulatore, relativo al primo click sul bottone per far partire lo streaming e al successivo click sul medesimo per metterlo in pausa:
Codice: [Seleziona]
04-05 22:53:08.329: DEBUG/AndroidRuntime(324): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<

04-05 22:53:08.329: DEBUG/AndroidRuntime(324): CheckJNI is ON

04-05 22:53:08.830: DEBUG/AndroidRuntime(324): Calling main entry com.android.commands.am.Am

04-05 22:53:08.849: INFO/ActivityManager(62): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=net.site50.redpurplelime/.LevelOne4DroidActivity } from pid 324

04-05 22:53:08.869: INFO/ActivityManager(62): Start proc net.site50.redpurplelime for activity net.site50.redpurplelime/.LevelOne4DroidActivity: pid=332 uid=10034 gids={3003}

04-05 22:53:08.889: DEBUG/AndroidRuntime(324): Shutting down VM

04-05 22:53:08.899: DEBUG/dalvikvm(324): GC_CONCURRENT freed 101K, 69% free 318K/1024K, external 0K/0K, paused 1ms+1ms

04-05 22:53:08.899: DEBUG/jdwp(324): adbd disconnected

04-05 22:53:08.960: INFO/dalvikvm(324): JNI: AttachCurrentThread (from ???.???)

04-05 22:53:08.960: INFO/AndroidRuntime(324): NOTE: attach of thread 'Binder Thread #3' failed

04-05 22:53:09.619: DEBUG/dalvikvm(332): GC_EXTERNAL_ALLOC freed 50K, 53% free 2550K/5379K, external 1625K/2137K, paused 186ms

04-05 22:53:09.989: INFO/ActivityManager(62): Displayed net.site50.redpurplelime/.LevelOne4DroidActivity: +1s123ms

04-05 22:53:15.260: INFO/StagefrightPlayer(34): setDataSource('http://66.90.103.76:9174/')

04-05 22:53:15.260: INFO/NuHTTPDataSource(34): connect to 66.90.103.76:9174/ @0

04-05 22:53:15.890: WARN/NuHTTPDataSource(34): Server did not give us the content length!

04-05 22:53:20.710: DEBUG/AudioSink(34): bufferCount (4) is too small and increased to 12

04-05 22:53:20.911: WARN/AudioFlinger(34): write blocked for 71 msecs, 1 delayed writes, thread 0xc658

04-05 22:53:25.981: WARN/AudioFlinger(34): write blocked for 77 msecs, 61 delayed writes, thread 0xc658

04-05 22:53:30.995: WARN/AudioFlinger(34): write blocked for 71 msecs, 124 delayed writes, thread 0xc658

04-05 22:53:36.020: WARN/AudioFlinger(34): write blocked for 70 msecs, 187 delayed writes, thread 0xc658

04-05 22:53:41.041: WARN/AudioFlinger(34): write blocked for 73 msecs, 250 delayed writes, thread 0xc658

04-05 22:53:46.086: WARN/AudioFlinger(34): write blocked for 71 msecs, 311 delayed writes, thread 0xc658

04-05 22:53:51.120: WARN/AudioFlinger(34): write blocked for 77 msecs, 374 delayed writes, thread 0xc658

04-05 22:53:56.222: WARN/AudioFlinger(34): write blocked for 88 msecs, 435 delayed writes, thread 0xc658

04-05 22:54:01.293: WARN/AudioFlinger(34): write blocked for 74 msecs, 498 delayed writes, thread 0xc658

04-05 22:54:06.360: WARN/AudioFlinger(34): write blocked for 72 msecs, 560 delayed writes, thread 0xc658

04-05 22:54:11.397: WARN/AudioFlinger(34): write blocked for 73 msecs, 621 delayed writes, thread 0xc658

04-05 22:54:16.472: WARN/AudioFlinger(34): write blocked for 79 msecs, 683 delayed writes, thread 0xc658

04-05 22:54:21.498: WARN/AudioFlinger(34): write blocked for 75 msecs, 745 delayed writes, thread 0xc658

04-05 22:54:22.630: INFO/StagefrightPlayer(34): setDataSource('http://66.90.103.76:9174/')

04-05 22:54:22.630: ERROR/MediaPlayer(332): setDataSource called in state 16

04-05 22:54:22.630: WARN/System.err(332): java.lang.IllegalStateException

04-05 22:54:22.640: WARN/System.err(332):     at android.media.MediaPlayer.setDataSource(Native Method)

04-05 22:54:22.640: WARN/System.err(332):     at net.site50.redpurplelime.LevelOne4DroidActivity.onClick(LevelOne4DroidActivity.java:158)

04-05 22:54:22.640: WARN/System.err(332):     at android.view.View.performClick(View.java:2485)

04-05 22:54:22.640: WARN/System.err(332):     at android.view.View$PerformClick.run(View.java:9080)

04-05 22:54:22.640: WARN/System.err(332):     at android.os.Handler.handleCallback(Handler.java:587)

04-05 22:54:22.640: WARN/System.err(332):     at android.os.Handler.dispatchMessage(Handler.java:92)

04-05 22:54:22.640: WARN/System.err(332):     at android.os.Looper.loop(Looper.java:123)

04-05 22:54:22.650: WARN/System.err(332):     at android.app.ActivityThread.main(ActivityThread.java:3683)

04-05 22:54:22.650: WARN/System.err(332):     at java.lang.reflect.Method.invokeNative(Native Method)

04-05 22:54:22.650: WARN/System.err(332):     at java.lang.reflect.Method.invoke(Method.java:507)

04-05 22:54:22.660: WARN/System.err(332):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)

04-05 22:54:22.660: WARN/System.err(332):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

04-05 22:54:22.660: WARN/System.err(332):     at dalvik.system.NativeStart.main(Native Method)

04-05 22:54:22.660: ERROR/MediaPlayer(332): prepareAsync called in state 16

04-05 22:54:22.660: WARN/System.err(332): java.lang.IllegalStateException

04-05 22:54:22.660: WARN/System.err(332):     at android.media.MediaPlayer.prepare(Native Method)

04-05 22:54:22.660: WARN/System.err(332):     at net.site50.redpurplelime.LevelOne4DroidActivity.onClick(LevelOne4DroidActivity.java:169)

04-05 22:54:22.670: WARN/System.err(332):     at android.view.View.performClick(View.java:2485)

04-05 22:54:22.670: WARN/System.err(332):     at android.view.View$PerformClick.run(View.java:9080)

04-05 22:54:22.670: WARN/System.err(332):     at android.os.Handler.handleCallback(Handler.java:587)

04-05 22:54:22.670: WARN/System.err(332):     at android.os.Handler.dispatchMessage(Handler.java:92)

04-05 22:54:22.670: WARN/System.err(332):     at android.os.Looper.loop(Looper.java:123)

04-05 22:54:22.670: WARN/System.err(332):     at android.app.ActivityThread.main(ActivityThread.java:3683)

04-05 22:54:22.670: WARN/System.err(332):     at java.lang.reflect.Method.invokeNative(Native Method)

04-05 22:54:22.670: WARN/System.err(332):     at java.lang.reflect.Method.invoke(Method.java:507)

04-05 22:54:22.681: WARN/System.err(332):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)

04-05 22:54:22.681: WARN/System.err(332):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

04-05 22:54:22.681: WARN/System.err(332):     at dalvik.system.NativeStart.main(Native Method)

Questo invece è il codice della mia activity:

Codice (Java): [Seleziona]
package net.site50.redpurplelime;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import org.apache.http.util.ByteArrayBuffer;
import android.app.Activity;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;




public class LevelOne4DroidActivity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
       
        //DICHIARAZIONE VARIABILI E OGGETTI
        public TextView meta;
        public Button playstop;
        public String soundUrl = "http://66.90.103.76:9174/";
        public MediaPlayer mp;
        //public Media myMedia;
        public String myString = null;
        public String splitted[] = null;
        private final Handler handlerB = new Handler();
       
       
       
        //GESTIONE DEL MENU
        @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.layout.menu, menu);
        return true;
    }
       
        @Override
    public boolean onOptionsItemSelected(MenuItem item) {
     
        switch (item.getItemId()) {

        case R.id.item01:
            Uri uri = Uri.parse("[url=http://www.radiolevelone.com/radio/?cat=13"]Palinsesto &laquo;  Radio Level One[/url]);
            startActivity(new Intent( Intent.ACTION_VIEW, uri));
            return true;
           
        case R.id.item02:
            final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
            emailIntent.setType("plain/text");
            emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{ "info@radiolevelone.com"});
            LevelOne4DroidActivity.this.startActivity(Intent.createChooser(emailIntent, "Invio mail..."));
            return true;
            default:
                    return super.onOptionsItemSelected(item);
       
        case R.id.item03:
             Uri uri2 = Uri.parse("http://www.redpurplelime.site50.net");
             startActivity(new Intent( Intent.ACTION_VIEW, uri2));
             return true;

        case R.id.item04:
            Uri uri3 = Uri.parse("[url=http://www.radiolevelone.com/radio/?cat=8"]Staff &laquo;  Radio Level One[/url]);
            startActivity(new Intent( Intent.ACTION_VIEW, uri3));
            return true;
       
        }
            }
       
       
        //RECUPERO METADATA
        public void metaRecupero()
        {
                try {
                        /* Define the URL we want to load data from. */
                URL myURL = new URL("http://yp.shoutcast.com/Metadata_Info1.php?surl=http://66.90.103.76:9174/");
               
                /* Open a connection to that URL. */
                URLConnection ucon = myURL.openConnection();
               
                /* Define InputStreams to read * from the URLConnection. */
                InputStream is = ucon.getInputStream();
                BufferedInputStream bis = new BufferedInputStream(is);
                               
                /* Read bytes to the Buffer until* there is nothing more to read(-1). */
                ByteArrayBuffer baf = new ByteArrayBuffer(50);
                int current = 0;
                while((current = bis.read()) != -1)
                        {
                      baf.append((byte)current);
                    }
         
                /* Convert the Bytes read to a String. */
                myString = new String(baf.toByteArray());
                }
               
                catch (Exception e)     {
                        /* On any Error we want to display it. */
                        myString = e.getMessage();
                }

                /* Split data & Show the String on the GUI. */
            splitted = myString.split("'");
           
                //meta = (TextView)findViewById(R.id.tvmeta);
                        meta.setText(" "+splitted[1]+" ");
                        //splitted=null;
               
            Runnable metadata = new Runnable()
            {
                public void run()
                {
                  metaRecupero();      
                }
            };
           
            handlerB.postDelayed(metadata,10000);

        }
       
       
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        //INIZIALIZZO LA VIEW
        meta = (TextView)findViewById(R.id.tvmeta);
               
       
        playstop = (Button) findViewById(R.id.bplay);
        playstop.setOnClickListener(this);
       
        mp = new MediaPlayer();
    }


        public void onClick(View v) {
                // TODO Auto-generated method stub
                if (v.getId() == R.id.bplay){
                       
                        try {
                                //mp.setOnPreparedListener(this);
                                mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
                                try {
                                        mp.setDataSource(soundUrl);
                                } catch (IllegalArgumentException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                } catch (IllegalStateException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                                mp.prepare();
                        } catch (RuntimeException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        } catch (IOException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        }

                        //metaRecupero();
                       
                        //CONTROLLO PLAY E PAUSE:
                        if (!mp.isPlaying())
                        {
                                playstop.setText("PAUSA");
                                mp.start();
                               
                                metaRecupero();
                        }
                        else
                        {
                                playstop.setText("PLAY");
                                mp.pause();
                        }
                }

        }
       
        protected void onDestroy() {
                // TODO Auto-generated method stub
                super.onDestroy();
                if(!mp.isPlaying())
                {
                        mp.stop();
                }
               
                mp.reset();
                finish();
        }

}

Vorrei riuscire almeno a capire cosa sbaglio e per quale motivo l'emulatore riesce ad eseguire l'app mentre il mio device (Android 2.3.4) no  :-(

Grazie in anticipo

Offline Ricky`

  • Amministratore
  • Utente storico
  • *****
  • Post: 3489
  • Respect: +506
    • Github
    • Google+
    • rciovati
    • Mostra profilo
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #1 il: 06 Aprile 2012, 12:25:46 CEST »
0
Ciao,
Non ho letto il codice molto approfonditamente però mi sembra che fai la chiamata http per andare a prendere i metadata nel thread della ui e chiaramente vai a bloccarlo.
Dovresti andare a fare la chiamata in un thread separato, prova a dare un occhio alla classe AsyncTask.

Offline GoldenV

  • Nuovo arrivato
  • *
  • Post: 7
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Huawei Sonic 2.3.4 -- SmartPad M705c ICS 4.0.3
  • Sistema operativo:
    Win 7 (Ice version)
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #2 il: 06 Aprile 2012, 16:53:07 CEST »
0
Ciao,
Non ho letto il codice molto approfonditamente però mi sembra che fai la chiamata http per andare a prendere i metadata nel thread della ui e chiaramente vai a bloccarlo.
Dovresti andare a fare la chiamata in un thread separato, prova a dare un occhio alla classe AsyncTask.

Ho letto un attimo e ho provato a modificare il codice in questo modo:
Codice (Java): [Seleziona]
package net.site50.redpurplelime;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import org.apache.http.util.ByteArrayBuffer;
import android.app.Activity;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;


public class LevelOne4DroidActivity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
       
        //DICHIARAZIONE VARIABILI E OGGETTI
        private TextView meta;
        private String myString = null;
        private String splitted[] = null;
       
       
        public Button playstop;
        public String soundUrl = "http://66.90.103.76:9174/";
        public MediaPlayer mp;
       
        private final Handler handlerB = new Handler();
       
       
       
        //GESTIONE DEL MENU
        @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.layout.menu, menu);
        return true;
    }
       
        @Override
    public boolean onOptionsItemSelected(MenuItem item) {
     
        switch (item.getItemId()) {

        case R.id.item01:
            Uri uri = Uri.parse("[url=http://www.radiolevelone.com/radio/?cat=13"]Palinsesto &laquo;  Radio Level One[/url]);
            startActivity(new Intent( Intent.ACTION_VIEW, uri));
            return true;
           
        case R.id.item02:
            final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
            emailIntent.setType("plain/text");
            emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{ "info@radiolevelone.com"});
            LevelOne4DroidActivity.this.startActivity(Intent.createChooser(emailIntent, "Invio mail..."));
            return true;
            default:
                    return super.onOptionsItemSelected(item);
       
        case R.id.item03:
             Uri uri2 = Uri.parse("http://www.redpurplelime.site50.net");
             startActivity(new Intent( Intent.ACTION_VIEW, uri2));
             return true;

        case R.id.item04:
            Uri uri3 = Uri.parse("[url=http://www.radiolevelone.com/radio/?cat=8"]Staff &laquo;  Radio Level One[/url]);
            startActivity(new Intent( Intent.ACTION_VIEW, uri3));
            return true;
       
        }
            }
       
       
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        //INIZIALIZZO LA VIEW
        meta = (TextView)findViewById(R.id.tvmeta);    
       
        playstop = (Button) findViewById(R.id.bplay);
        playstop.setOnClickListener(this);
       
        mp = new MediaPlayer();
    }


   
  //------------------------------------------------------------------------------------------------------------------
       
        //RECUPERO METADATA
        private class metaRecupero extends AsyncTask<String, Void, String>
        {
                @Override
                protected String doInBackground(String... splitted) {
                try {
                        /* Define the URL we want to load data from. */
                URL myURL = new URL("http://yp.shoutcast.com/Metadata_Info1.php?surl=http://66.90.103.76:9174/");
                //URL myURL = new URL("");
                /* Open a connection to that URL. */
                URLConnection ucon = myURL.openConnection();
               
                /* Define InputStreams to read * from the URLConnection. */
                InputStream is = ucon.getInputStream();
                BufferedInputStream bis = new BufferedInputStream(is);
                               
                /* Read bytes to the Buffer until* there is nothing more to read(-1). */
                ByteArrayBuffer baf = new ByteArrayBuffer(50);
                int current = 0;
                while((current = bis.read()) != -1)
                        {
                      baf.append((byte)current);
                    }
         
                /* Convert the Bytes read to a String. */
                myString = new String(baf.toByteArray());
                }
               
                catch (Exception e)     {
                        /* On any Error we want to display it. */
                        myString = e.getMessage();
                }
                /* Split data & Show the String on the GUI. */
            splitted = myString.split("'");
           
            //tentativo riciclo mystring
            myString =(" "+splitted[1]+" ");
           
                return myString;
                }

               
                @Override
                protected void onPostExecute(String myString) {
                                           
                        meta.setText(myString);
 
                }                      
        }      
                       
        public void readMeta(final View v) {
                metaRecupero task = new metaRecupero();

        task.execute(splitted);
            Runnable metadata = new Runnable()
            {
                public void run()
                {
                  readMeta(v);          
                }
            };
           
            handlerB.postDelayed(metadata,10000);
                }
  //--------------------------------------------------------------------------------------------------------------         
     
        public void onClick(View v) {
                // TODO Auto-generated method stub
                if (v.getId() == R.id.bplay){
                       
                        try {
                                //mp.setOnPreparedListener(this);
                                mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
                                try {
                                        mp.setDataSource(soundUrl);
                                } catch (IllegalArgumentException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                } catch (IllegalStateException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                                mp.prepare();
                        } catch (RuntimeException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        } catch (IOException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        }

                       
                        //CONTROLLO PLAY E PAUSE:
                        if (!mp.isPlaying())
                        {
                                playstop.setText("PAUSA");
                                mp.start();
                               
                                readMeta(v); //Avvio il recupero dei metadata

                        }
                        else
                        {
                                playstop.setText("PLAY");
                                mp.pause();
                        }
                }

        }
       
        protected void onDestroy() {
                // TODO Auto-generated method stub
                super.onDestroy();
                if(!mp.isPlaying())
                {
                        mp.stop();
                }
               
                mp.reset();
                finish();
        }

}

Credo di aver fatto tutto in maniera corretta (o almeno spero).
Su emulatore funziona e i metadata vengono aggiornati correttamente, funziona tutto, installando l'apk su dispositivo però si presenta lo stesso problema di prima: al click sul pulsante di avvio l'app va in stallo, anche aspettando parecchi minuti non succede nulla, solo dopo multipli tap sul button compare il messaggio "attività non risponde: termina - attendi"  :-(

Offline GoldenV

  • Nuovo arrivato
  • *
  • Post: 7
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Huawei Sonic 2.3.4 -- SmartPad M705c ICS 4.0.3
  • Sistema operativo:
    Win 7 (Ice version)
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #3 il: 06 Aprile 2012, 17:21:13 CEST »
0
Dimenticavo il nuovo Log:  O:-)

Codice: [Seleziona]
04-06 15:06:20.077: DEBUG/AndroidRuntime(459): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<

04-06 15:06:20.077: DEBUG/AndroidRuntime(459): CheckJNI is ON

04-06 15:06:20.537: DEBUG/AndroidRuntime(459): Calling main entry com.android.commands.pm.Pm

04-06 15:06:20.678: DEBUG/dalvikvm(293): GC_EXPLICIT freed 3K, 54% free 2545K/5511K, external 1625K/2137K, paused 40ms

04-06 15:06:20.687: WARN/ActivityManager(62): No content provider found for:

04-06 15:06:20.707: WARN/ActivityManager(62): No content provider found for:

04-06 15:06:20.717: DEBUG/PackageParser(62): Scanning package: /data/app/vmdl1711056695.tmp

04-06 15:06:20.797: INFO/PackageManager(62): Removing non-system package:net.site50.redpurplelime

04-06 15:06:20.807: INFO/ActivityManager(62): Force stopping package net.site50.redpurplelime uid=10034

04-06 15:06:20.807: INFO/Process(62): Sending signal. PID: 436 SIG: 9

04-06 15:06:20.887: DEBUG/PackageManager(62): Scanning package net.site50.redpurplelime

04-06 15:06:20.887: INFO/PackageManager(62): Package net.site50.redpurplelime codePath changed from /data/app/net.site50.redpurplelime-2.apk to

/data/app/net.site50.redpurplelime-1.apk; Retaining data and using new

04-06 15:06:20.887: INFO/PackageManager(62): Unpacking native libraries for /data/app/net.site50.redpurplelime-1.apk

04-06 15:06:20.897: DEBUG/installd(35): DexInv: --- BEGIN '/data/app/net.site50.redpurplelime-1.apk' ---

04-06 15:06:21.007: DEBUG/dalvikvm(468): DexOpt: load 20ms, verify+opt 36ms

04-06 15:06:21.018: DEBUG/installd(35): DexInv: --- END '/data/app/net.site50.redpurplelime-1.apk' (success) ---

04-06 15:06:21.018: WARN/PackageManager(62): Code path for pkg : net.site50.redpurplelime changing from /data/app/net.site50.redpurplelime-2.apk to

/data/app/net.site50.redpurplelime-1.apk

04-06 15:06:21.018: WARN/PackageManager(62): Resource path for pkg : net.site50.redpurplelime changing from /data/app/net.site50.redpurplelime-2.apk to

/data/app/net.site50.redpurplelime-1.apk

04-06 15:06:21.018: DEBUG/PackageManager(62):   Activities: net.site50.redpurplelime.LevelOne4DroidActivity

04-06 15:06:21.027: INFO/ActivityManager(62): Force stopping package net.site50.redpurplelime uid=10034

04-06 15:06:21.107: INFO/installd(35): move /data/dalvik-cache/data@app@net.site50.redpurplelime-1.apk@classes.dex -> /data/dalvik-cache/data@app@net.site50.redpurplelime-

1.apk@classes.dex

04-06 15:06:21.107: DEBUG/PackageManager(62): New package installed in /data/app/net.site50.redpurplelime-1.apk

04-06 15:06:21.188: INFO/ActivityManager(62): Force stopping package net.site50.redpurplelime uid=10034

04-06 15:06:21.277: DEBUG/dalvikvm(62): GC_EXPLICIT freed 838K, 46% free 4270K/7879K, external 3125K/3903K, paused 62ms

04-06 15:06:21.317: DEBUG/dalvikvm(128): GC_EXPLICIT freed 28K, 51% free 2908K/5895K, external 4623K/5618K, paused 59ms

04-06 15:06:21.377: DEBUG/dalvikvm(168): GC_EXPLICIT freed 85K, 52% free 2756K/5703K, external 1625K/2137K, paused 63ms

04-06 15:06:21.437: WARN/RecognitionManagerService(62): no available voice recognition services found

04-06 15:06:21.647: DEBUG/dalvikvm(62): GC_EXPLICIT freed 221K, 47% free 4218K/7879K, external 3125K/3903K, paused 47ms

04-06 15:06:21.647: INFO/installd(35): unlink /data/dalvik-cache/data@app@net.site50.redpurplelime-2.apk@classes.dex

04-06 15:06:21.647: DEBUG/AndroidRuntime(459): Shutting down VM

04-06 15:06:21.667: DEBUG/dalvikvm(459): GC_CONCURRENT freed 101K, 72% free 295K/1024K, external 0K/0K, paused 1ms+0ms

04-06 15:06:21.667: DEBUG/jdwp(459): Got wake-up signal, bailing out of select

04-06 15:06:21.667: DEBUG/dalvikvm(459): Debugger has detached; object registry had 1 entries

04-06 15:06:22.147: DEBUG/AndroidRuntime(473): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<

04-06 15:06:22.147: DEBUG/AndroidRuntime(473): CheckJNI is ON

04-06 15:06:22.597: DEBUG/AndroidRuntime(473): Calling main entry com.android.commands.am.Am

04-06 15:06:22.667: INFO/ActivityManager(62): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000

cmp=net.site50.redpurplelime/.LevelOne4DroidActivity } from pid 473

04-06 15:06:22.767: DEBUG/AndroidRuntime(473): Shutting down VM

04-06 15:06:22.777: INFO/ActivityManager(62): Start proc net.site50.redpurplelime for activity net.site50.redpurplelime/.LevelOne4DroidActivity: pid=482 uid=10034 gids={3003}

04-06 15:06:22.797: DEBUG/dalvikvm(473): GC_CONCURRENT freed 103K, 69% free 320K/1024K, external 0K/0K, paused 1ms+1ms

04-06 15:06:22.797: DEBUG/jdwp(473): Got wake-up signal, bailing out of select

04-06 15:06:22.797: DEBUG/dalvikvm(473): Debugger has detached; object registry had 1 entries

04-06 15:06:22.937: DEBUG/dalvikvm(33): GC_EXPLICIT freed 11K, 53% free 2538K/5379K, external 1625K/2137K, paused 161ms

04-06 15:06:23.017: DEBUG/dalvikvm(33): GC_EXPLICIT freed <1K, 53% free 2538K/5379K, external 1625K/2137K, paused 61ms

04-06 15:06:23.097: DEBUG/dalvikvm(33): GC_EXPLICIT freed <1K, 53% free 2538K/5379K, external 1625K/2137K, paused 83ms

04-06 15:06:23.507: DEBUG/dalvikvm(482): GC_EXTERNAL_ALLOC freed 53K, 53% free 2550K/5379K, external 1625K/2137K, paused 171ms

04-06 15:06:23.848: INFO/ActivityManager(62): Displayed net.site50.redpurplelime/.LevelOne4DroidActivity: +1s80ms

04-06 15:06:28.937: DEBUG/dalvikvm(128): GC_EXPLICIT freed 109K, 51% free 2902K/5895K, external 4672K/5618K, paused 45ms

04-06 15:06:29.917: INFO/StagefrightPlayer(34): setDataSource('http://66.90.103.76:9174/')

04-06 15:06:29.927: INFO/NuHTTPDataSource(34): connect to 66.90.103.76:9174/ @0

04-06 15:06:30.557: WARN/NuHTTPDataSource(34): Server did not give us the content length!

04-06 15:06:34.017: DEBUG/dalvikvm(213): GC_EXPLICIT freed 8K, 55% free 2597K/5703K, external 1625K/2137K, paused 68ms

04-06 15:06:34.917: DEBUG/AudioSink(34): bufferCount (4) is too small and increased to 12

04-06 15:06:35.098: WARN/AudioFlinger(34): write blocked for 74 msecs, 3240 delayed writes, thread 0xc658

04-06 15:06:39.057: DEBUG/dalvikvm(293): GC_EXPLICIT freed 6K, 54% free 2544K/5511K, external 1625K/2137K, paused 72ms

04-06 15:06:40.167: WARN/AudioFlinger(34): write blocked for 75 msecs, 3301 delayed writes, thread 0xc658

04-06 15:06:44.098: DEBUG/dalvikvm(306): GC_EXPLICIT freed 2K, 54% free 2539K/5511K, external 1625K/2137K, paused 68ms

04-06 15:06:45.224: WARN/AudioFlinger(34): write blocked for 70 msecs, 3361 delayed writes, thread 0xc658

04-06 15:06:50.288: WARN/AudioFlinger(34): write blocked for 79 msecs, 3422 delayed writes, thread 0xc658

04-06 15:06:55.334: WARN/AudioFlinger(34): write blocked for 74 msecs, 3484 delayed writes, thread 0xc658

04-06 15:07:00.367: WARN/AudioFlinger(34): write blocked for 73 msecs, 3544 delayed writes, thread 0xc658

04-06 15:07:05.402: WARN/AudioFlinger(34): write blocked for 73 msecs, 3606 delayed writes, thread 0xc658

04-06 15:07:10.477: WARN/AudioFlinger(34): write blocked for 78 msecs, 3668 delayed writes, thread 0xc658

04-06 15:07:15.610: WARN/AudioFlinger(34): write blocked for 71 msecs, 3729 delayed writes, thread 0xc658

04-06 15:07:20.667: WARN/AudioFlinger(34): write blocked for 79 msecs, 3793 delayed writes, thread 0xc658

04-06 15:07:25.714: WARN/AudioFlinger(34): write blocked for 70 msecs, 3855 delayed writes, thread 0xc658

04-06 15:07:30.786: WARN/AudioFlinger(34): write blocked for 76 msecs, 3919 delayed writes, thread 0xc658

04-06 15:07:35.836: WARN/AudioFlinger(34): write blocked for 75 msecs, 3980 delayed writes, thread 0xc658

04-06 15:07:40.879: WARN/AudioFlinger(34): write blocked for 71 msecs, 4041 delayed writes, thread 0xc658

04-06 15:07:45.950: WARN/AudioFlinger(34): write blocked for 76 msecs, 4101 delayed writes, thread 0xc658

04-06 15:07:50.972: WARN/AudioFlinger(34): write blocked for 76 msecs, 4162 delayed writes, thread 0xc658

04-06 15:07:52.331: INFO/StagefrightPlayer(34): setDataSource('http://66.90.103.76:9174/')

04-06 15:07:52.337: ERROR/MediaPlayer(482): setDataSource called in state 16

04-06 15:07:52.337: WARN/System.err(482): java.lang.IllegalStateException

04-06 15:07:52.367: WARN/System.err(482):     at android.media.MediaPlayer.setDataSource(Native Method)

04-06 15:07:52.367: WARN/System.err(482):     at net.site50.redpurplelime.LevelOne4DroidActivity.onClick(LevelOne4DroidActivity.java:176)

04-06 15:07:52.367: WARN/System.err(482):     at android.view.View.performClick(View.java:2485)

04-06 15:07:52.367: WARN/System.err(482):     at android.view.View$PerformClick.run(View.java:9080)

04-06 15:07:52.367: WARN/System.err(482):     at android.os.Handler.handleCallback(Handler.java:587)

04-06 15:07:52.367: WARN/System.err(482):     at android.os.Handler.dispatchMessage(Handler.java:92)

04-06 15:07:52.377: WARN/System.err(482):     at android.os.Looper.loop(Looper.java:123)

04-06 15:07:52.377: WARN/System.err(482):     at android.app.ActivityThread.main(ActivityThread.java:3683)

04-06 15:07:52.377: WARN/System.err(482):     at java.lang.reflect.Method.invokeNative(Native Method)

04-06 15:07:52.377: WARN/System.err(482):     at java.lang.reflect.Method.invoke(Method.java:507)

04-06 15:07:52.377: WARN/System.err(482):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)

04-06 15:07:52.377: WARN/System.err(482):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

04-06 15:07:52.377: WARN/System.err(482):     at dalvik.system.NativeStart.main(Native Method)

04-06 15:07:52.377: ERROR/MediaPlayer(482): prepareAsync called in state 16

04-06 15:07:52.387: WARN/System.err(482): java.lang.IllegalStateException

04-06 15:07:52.387: WARN/System.err(482):     at android.media.MediaPlayer.prepare(Native Method)

04-06 15:07:52.387: WARN/System.err(482):     at net.site50.redpurplelime.LevelOne4DroidActivity.onClick(LevelOne4DroidActivity.java:187)

04-06 15:07:52.387: WARN/System.err(482):     at android.view.View.performClick(View.java:2485)

04-06 15:07:52.387: WARN/System.err(482):     at android.view.View$PerformClick.run(View.java:9080)

04-06 15:07:52.387: WARN/System.err(482):     at android.os.Handler.handleCallback(Handler.java:587)

04-06 15:07:52.397: WARN/System.err(482):     at android.os.Handler.dispatchMessage(Handler.java:92)

04-06 15:07:52.397: WARN/System.err(482):     at android.os.Looper.loop(Looper.java:123)

04-06 15:07:52.397: WARN/System.err(482):     at android.app.ActivityThread.main(ActivityThread.java:3683)

04-06 15:07:52.397: WARN/System.err(482):     at java.lang.reflect.Method.invokeNative(Native Method)

04-06 15:07:52.397: WARN/System.err(482):     at java.lang.reflect.Method.invoke(Method.java:507)

04-06 15:07:52.397: WARN/System.err(482):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)

04-06 15:07:52.397: WARN/System.err(482):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

04-06 15:07:52.407: WARN/System.err(482):     at dalvik.system.NativeStart.main(Native Method)

04-06 15:08:07.388: WARN/KeyCharacterMap(482): No keyboard for id 0

04-06 15:08:07.388: WARN/KeyCharacterMap(482): Using default keymap: /system/usr/keychars/qwerty.kcm.bin

04-06 15:08:07.968: WARN/TimedEventQueue(34): Event 93 was not found in the queue, already cancelled?

04-06 15:08:07.968: WARN/ActivityManager(62): Duplicate finish request for HistoryRecord{40712298 net.site50.redpurplelime/.LevelOne4DroidActivity}

04-06 15:08:09.633: WARN/libutils.threads(34): Thread (this=0x26418): don't call waitForExit() from this Thread object's thread. It's a guaranteed deadlock!

04-06 15:08:13.047: DEBUG/dalvikvm(482): GC_EXPLICIT freed 244K, 53% free 2583K/5447K, external 3539K/4371K, paused 47ms

Offline djdedo

  • Utente normale
  • ***
  • Post: 209
  • Respect: +15
    • Mostra profilo
  • Dispositivo Android:
    Galaxy S2
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #4 il: 07 Aprile 2012, 11:41:38 CEST »
0
Ciao anche io tempo fa ho implementato un mediaplayer shoutcast. Dando un rapido sguardo al codice ho notato che hai utilizzato mp.prepare(). Questo metodo non può essere utilizzato per effettuare streaming perchè appunto ti blocca la UI finchè non riesce a collegarsi. Io l'ho implementato utilizzando prepareAsync() che appunto sposta in un asynctask la connessione al server lasciando libera la UI. Per utilizzare questo metodo la tua activity deve implementare un OnPreparedListener che si occuperà di lanciare l'esecuzione dello stream. Ti scrivo un pò di codice
Codice (Java): [Seleziona]
// mp.prepare();

mp.prepareAsync();
m.setOnPreparedListener(this);


// ----- altro codice --------


// devi fare l'override di questo metodo quando implementi OnPreparedListener
@Override
public void onPrepared(MediaPlayer mp) {
       mp.start();
}


Io la implementarei così (e l'ho implementata così :) ) magari è questo il tuo problema. Ti consiglio comunque di cercare i driver per utilizzare il tuo telefono direttamente in eclipse altrimenti sarà solo un tirare ad indovinare

Offline GoldenV

  • Nuovo arrivato
  • *
  • Post: 7
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Huawei Sonic 2.3.4 -- SmartPad M705c ICS 4.0.3
  • Sistema operativo:
    Win 7 (Ice version)
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #5 il: 09 Aprile 2012, 01:46:26 CEST »
0
Grazie dei consigli  :-)

Sono riuscito a configurare il cellulare e finalmente anche ad eseguire il debug diretto su dispositivo.

Ho modificato il codice come consigliato, quindi:

- Recupero metadata (parse stringa) su Asynctask
- Utilizzato il metodo prepareAsinc()

Dopo aver verificato che il recupero metadata funzionasse correttamente anche su dispositivo, mi sono concentrato sul MediaPlayer, ho modificato il sorgente della main activity in modo da far partire lo streaming diretto solo se pronto (non ho implementato lo start/pausa al click del bottone, a problema risolto lo reimplementerò) il sorgente ora è il seguente:
Codice (Java): [Seleziona]
package net.site50.redpurplelime;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import org.apache.http.util.ByteArrayBuffer;
import android.app.Activity;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnPreparedListener;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;


public class LevelOne4DroidActivity extends Activity implements OnClickListener, OnPreparedListener {
    /** Called when the activity is first created. */
       
        //DICHIARAZIONE VARIABILI E OGGETTI
        private TextView meta;
        private String myString = null;
        private String splitted[] = null;
       
        public Button playstop;
        public String soundUrl = "http://66.90.103.76:9174/";
        //public String soundUrl = "http://listen.radionomy.com/talent-webradio.m3u";
        public MediaPlayer mp;
       
        private final Handler handlerB = new Handler();
       
       
       
        //GESTIONE DEL MENU
        @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.layout.menu, menu);
        return true;
    }
       
        @Override
    public boolean onOptionsItemSelected(MenuItem item) {
     
        switch (item.getItemId()) {

        case R.id.item01:
            Uri uri = Uri.parse("[url=http://www.radiolevelone.com/radio/?cat=13"]Palinsesto &laquo;  Radio Level One[/url]);
            startActivity(new Intent( Intent.ACTION_VIEW, uri));
            return true;
           
        case R.id.item02:
            final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
            emailIntent.setType("plain/text");
            emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{ "info@radiolevelone.com"});
            LevelOne4DroidActivity.this.startActivity(Intent.createChooser(emailIntent, "Invio mail..."));
            return true;
            default:
                    return super.onOptionsItemSelected(item);
       
        case R.id.item03:
             Uri uri2 = Uri.parse("http://www.redpurplelime.site50.net");
             startActivity(new Intent( Intent.ACTION_VIEW, uri2));
             return true;

        case R.id.item04:
            Uri uri3 = Uri.parse("[url=http://www.radiolevelone.com/radio/?cat=8"]Staff &laquo;  Radio Level One[/url]);
            startActivity(new Intent( Intent.ACTION_VIEW, uri3));
            return true;
       
        }
            }
       
       
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        //INIZIALIZZO LA VIEW
        meta = (TextView)findViewById(R.id.tvmeta);    
       
        playstop = (Button) findViewById(R.id.bplay);
        playstop.setOnClickListener(this);
       
        mp = new MediaPlayer();
        mpPrepare(); //Preparo il MediaPlayer
    }


        //@Override
        public void onPrepared(MediaPlayer mp) {
                // TODO Auto-generated method stub

                mp.start();
                playstop.setText("PAUSA onPrepared");
        }    
   
 
  //------------------------------------------------------------------------------------------------------------------
       
        //RECUPERO METADATA
        private class metaRecupero extends AsyncTask<String, Void, String>
        {
                @Override
                protected String doInBackground(String... splitted) {
                try {
                        /* Define the URL we want to load data from. */
                URL myURL = new URL("http://yp.shoutcast.com/Metadata_Info1.php?surl=http://66.90.103.76:9174/");
                //URL myURL = new URL("");
                /* Open a connection to that URL. */
                URLConnection ucon = myURL.openConnection();
               
                /* Define InputStreams to read * from the URLConnection. */
                InputStream is = ucon.getInputStream();
                BufferedInputStream bis = new BufferedInputStream(is);
                               
                /* Read bytes to the Buffer until* there is nothing more to read(-1). */
                ByteArrayBuffer baf = new ByteArrayBuffer(50);
                int current = 0;
                while((current = bis.read()) != -1)
                        {
                      baf.append((byte)current);
                    }
         
                /* Convert the Bytes read to a String. */
                myString = new String(baf.toByteArray());
                }
               
                catch (Exception e)     {
                        /* On any Error we want to display it. */
                        myString = e.getMessage();
                }
                /* Split data & Show the String on the GUI. */
            splitted = myString.split("'");
           
            //tentativo riciclo mystring
            myString =(" "+splitted[1]+" ");
           
                return myString;
                }
       
                @Override
                protected void onPostExecute(String myString) {
                                           
                        meta.setText(myString);
 
                }                      
        }      
                       
        public void readMeta(final View v)
        {
                metaRecupero task = new metaRecupero();

        task.execute(splitted);
            Runnable metadata = new Runnable()
            {
                public void run()
                {
                  readMeta(v);          
                }
            };
           
            handlerB.postDelayed(metadata,10000);
        }
  //--------------------------------------------------------------------------------------------------------------         

        public void mpPrepare(){
                try {
                        mp.setAudioStreamType(AudioManager.STREAM_MUSIC);

                        try {
                                mp.setDataSource(soundUrl);
                               
                        } catch (IllegalArgumentException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        } catch (IllegalStateException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        } catch (IOException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        }
                       
                        mp.setOnPreparedListener(this);
                        mp.prepareAsync();
                } catch (RuntimeException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }              
        }


       
        public void onClick(View v) {
                // TODO Auto-generated method stub
                if (v.getId() == R.id.bplay){
                         
                         readMeta(v); //Avvio il recupero dei metadata

                         playstop.setText("Loading..."); //metto in attesa
                     
                         //mpPrepare(); //Preparo il MediaPlayer
               

                         if(mp.isPlaying())
                         {
                         
                         }
                         else
                         {
                         
                         }
                }      
        }


        protected void onDestroy() {
                // TODO Auto-generated method stub
                super.onDestroy();
                if(mp.isPlaying())
                {
                        mp.stop();
                }
               
                mp.release();
                mp=null;
                finish();
        }
}

Il Log misteriosamente non mi ha dato nessun warning, ma solo 2 errori, questi:

Codice: [Seleziona]
04-09 01:10:12.890: ERROR/PlayerDriver(90): It's not sprint!

04-09 01:13:48.390: ERROR/MediaPlayerService(90): http use PV_PLAYER

Ho fatto qualche ricerca su PV_PLAYER, ma non ho trovato nulla di interessante in merito e che potesse farmi capire la causa dell'errore...
« Ultima modifica: 09 Aprile 2012, 02:47:31 CEST da GoldenV »

Offline djdedo

  • Utente normale
  • ***
  • Post: 209
  • Respect: +15
    • Mostra profilo
  • Dispositivo Android:
    Galaxy S2
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #6 il: 10 Aprile 2012, 11:50:36 CEST »
0
Non sto capendo ma il codice funziona oppure non ti parte lo streaming? Dove ti da errore? E sopratutto che errore ravvedi?

Offline GoldenV

  • Nuovo arrivato
  • *
  • Post: 7
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Huawei Sonic 2.3.4 -- SmartPad M705c ICS 4.0.3
  • Sistema operativo:
    Win 7 (Ice version)
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #7 il: 10 Aprile 2012, 21:46:55 CEST »
0
Lo streaming non parte, le restanti funzioni dell'app continuano a funzionare benissimo, anche il parsing dell'url contenente i metadata in forma testuale procede e sono aggiornati regolarmente.

Il log degli errori è quello del mio post precedente.

Offline Carlos

  • Utente junior
  • **
  • Post: 74
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Zopo ZP1000
  • Play Store ID:
    Giovanni Miceli
  • Sistema operativo:
    Windows 8
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #8 il: 16 Aprile 2012, 21:53:04 CEST »
0
Ciao, siete riusciti a far partire lo streaming audio ?
Ho testato questo codice anche io e purtroppo rimane la scritta LOADING ma non si sente nulla.


Offline GoldenV

  • Nuovo arrivato
  • *
  • Post: 7
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Huawei Sonic 2.3.4 -- SmartPad M705c ICS 4.0.3
  • Sistema operativo:
    Win 7 (Ice version)
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #9 il: 16 Aprile 2012, 22:15:39 CEST »
0
Purtroppo non ancora. Su emulatore funziona benissimo, su dispositivo nada...

Offline Carlos

  • Utente junior
  • **
  • Post: 74
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Zopo ZP1000
  • Play Store ID:
    Giovanni Miceli
  • Sistema operativo:
    Windows 8
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #10 il: 17 Aprile 2012, 18:40:29 CEST »
0
Ma a me non sta funzionando neanche sull'emulatore.

Potresti inviarmi il progetto completo ? Cosi lo testo e ci lavoro anche io ?
Ti mando in privato la mia mail

Offline Carlos

  • Utente junior
  • **
  • Post: 74
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Zopo ZP1000
  • Play Store ID:
    Giovanni Miceli
  • Sistema operativo:
    Windows 8
Re:Shoutcast streaming - Ok su Emulatore No su Dispositivi reali
« Risposta #11 il: 17 Aprile 2012, 20:39:39 CEST »
0
Intanto ho testato il link http://66.90.103.76:9174/ e il server risulta down.

Attendo il progetto
Ciao