Music player got crashed in android running on beagle

by Harishkumar V » Fri, 13 Mar 2009 21:04:52 GMT


Sponsored Links
 i,

I have android running on beagle.

When i click Music player, i got the following error on screen,

"The application Music (process com.android.music) has stopped unexpectedly.
Please try again"

in beagle, when i did logcat,

I/ActivityManager( 815): Starting activity: Intent {
action=android.intent.action.MAIN categories={android.intent.category}
I/ActivityManager( 815): Start proc com.android.music for activity
com.android.music/.VideoBrowserActivity: pid=1328 uid=1}
I/jdwp ( 1328): received file descriptor 10 from ADB
W/ResourceType( 1328): Failure getting entry for 0x7f020019 (t=1 e=25) in
package 0: 0xffffffb5
D/AndroidRuntime( 1328): Shutting down VM
W/dalvikvm( 1328): threadid=3: thread exiting with uncaught exception
(group=0x4000fe68)
E/AndroidRuntime( 1328): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime( 1328): java.lang.RuntimeException: Unable to start
activity ComponentInfo{com.android.music/com.android.mr
E/AndroidRuntime( 1328): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2156)
E/AndroidRuntime( 1328): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2172)
E/AndroidRuntime( 1328): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
E/AndroidRuntime( 1328): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1586)
E/AndroidRuntime( 1328): at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1328): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1328): at
android.app.ActivityThread.main(ActivityThread.java:3790)
E/AndroidRuntime( 1328): at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1328): at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 1328): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
E/AndroidRuntime( 1328): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:503)
E/AndroidRuntime( 1328): at dalvik.system.NativeStart.main(Native
Method)
E/AndroidRuntime( 1328): Caused by: android.view.InflateException: Binary
XML file line #18: Error inflating class java.lanr
E/AndroidRuntime( 1328): at
android.view.LayoutInflater.createView(LayoutInflater.java:512)
E/AndroidRuntime( 1328): at
com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.ja)
E/AndroidRuntime( 1328): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
E/AndroidRuntime( 1328): at
android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
E/AndroidRuntime( 1328): at
android.view.LayoutInflater.parseInclude(LayoutInflater.java:676)
E/AndroidRuntime( 1328): at
android.view.LayoutInflater.rInflate(LayoutInflater.java:613)
E/AndroidRuntime( 1328): at
android.view.LayoutInflater.inflate(LayoutInflater.java:407)
E/AndroidRuntime( 1328): at
android.view.LayoutInflater.inflate(LayoutInflater.java:320)
E/AndroidRuntime( 1328): at
android.view.LayoutInflater.inflate(LayoutInflater.java:276)
E/AndroidRuntime( 1328): at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:226)
E/AndroidRuntime( 1328): at
android.app.Activity.setContentView(Activity.java:1614)
E/AndroidRuntime( 1328): at
com.android.music



Music player got crashed in android running on beagle

by nagamatu » Sun, 15 Mar 2009 14:47:08 GMT


  couldn't load necessary resources for Music and Dialer applications
because of missing touchscreen configuration on my target environment.

--
nagamatu

On 33 10:32, Thomas Bandelier <thomas.bandel...@gmail.com>
wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


Other Threads

1. OOM errors during inflation

All of sudden I am seeing oddball OMM errors when inflating view trees.

The allocations are from really small (couple of K) to fairly large 
(couple of hundered K).

But ddms says the heap is only half full and there's around 2MB 
available. The app does not appear to be leaking.

What should I be checking?

Thanks all,

-- Ward

--~--~---------~--~----~------------~-------~--~----~

2. Get list from Website ( PHP , MySQL , HTTP request , XML )

Im having a problem.

I am trying to build a software that communicates with a website.
simply, i would like to have a php webpage that when i click a button
it creates an alert on the phone.

I planned on doing that by using a mysql database to with the website
where the click from the webpage will update the database, then the
mobile phone will (at intervals) make a request to the webpage or
database to retrieve that info.

Here's what im thinking of using:
PHP
Mysql
Android OS
Windows Mobile OS

I found a tutorial from Apress called 'Apress Android Tutorials July
2008' and found an example that was about 90% similar to what i want
(with the source code) but when i try it i get errors and I cant find
a way to contact Apress(site is down etc)

The example was called Chapter 5: Loading a List from the Web. when i
use eclipse with the source, the error i get is "UIThreadUtilities
cannot be resolved". I noticed that when i excluded the rest of the
code and specify to import UIThreadUtilities it doesnt work.

I know this message is a bit long and it involves a lot but If anyone
can please help:

1. request i send them the source code from Apress to see if it works
on their eclipse. So I know how to fix it.

or

2. recommend an alternative way for me to pull info from a URL(or php
page) or a database.




Heres the code its supposed to pick a list of radio stations via xml
parsing from a web location:
I get errors where it says UiThreadutilities and other related places

======================================================================
package com.apress.radio;

import java.io.InputStream;
import java.util.List;
import java.util.Vector;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.DefaultHttpClient;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.Locator;
import org.xml.sax.XMLReader;

import android.app.Activity;
import android.app.ListActivity;
import android.content.Context;
import android.graphics.Color;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.speech.recognition.Logger;
import android.util.Log;
import android.view.UIThreadUtilities;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;



public class StationPicker extends ListActivity {

        Vector<StationData> stationListVector = new Vector<StationData>();
        SAXParser parser = null;
        XMLReader reader = null;
        XMLHandler handler = new XMLHandler();
        ArrayAdapter<StationData> adapter = null;
        Activity ctx = this;


        class XMLHandler implements org.xml.sax.ContentHandler
        {
                StationData currentStation;
                String lastName;

                public void endDocument(){}
                public void     endPrefixMapping(String prefix){}
                public void     ignorableWhitespace(char[] ch, int start, int 
length)
{}
                public void processingInstruction(String s, String a){}
                public void setDocumentLocator(Locator l){}
                public void     skippedEntity(String name){}
                public void     startDocument(){}
                public void     startPrefixMapping(String prefix, String s){}
                 public void characters(char[] ch, int start, int length)
                 {
                         if(lastName.equals("title") && 
currentStation.title.length() == 0)
                         {
                                 currentStation.title = String.copyValueOf(ch, 
start, length);
                         }
                         else if(lastName.equals("audioUrl") && 
currentStation.url.length()
== 0)
                         {
                                 currentStation.url = String.copyValueOf(ch, 
start, length);
                         }
                 }
                public void startElement(String uri, String localName, String 
qName,
Attributes atts)
                {
                        lastName = localName;
                        if(localName.equals("station"))
                        {
                                currentStation = new StationData();
                        }
                }

                 public void endElement(String uri, String localName, String 
qName)
                 {
                         if(localName.equals("station"))
                                {
                                 if(currentStation != null)
                                         stationListVector.add(currentStation);
                                }
                 }
        }


        class StationData
        {
                public String title = "";
                public String url = "";

                public String toString()
                {
                        return title;
                }
        }

        private void initList()
        {
                adapter = new ArrayAdapter<StationData>(StationPicker.this,
R.layout.list_element, R.id.textElement);
        setListAdapter(adapter);
        }

    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        try
        {
                setContentView(R.layout.main);
                SAXParserFactory f = SAXParserFactory.newInstance();
                parser = f.newSAXParser();
                reader = parser.getXMLReader();
                reader.setContentHandler(handler);
                initList();
        } catch (Exception e)
        {
                Log.e("StationPicker", "Parser FAIL!");
        }
    }

    protected void onListItemClick(ListView l, View v, int position,
long id)
    {
        StationData selectedStation = stationListVector.elementAt
(position);
        MediaPlayer player = new MediaPlayer();
        try
        {
                player.setDataSource(selectedStation.url);
                player.start();
        }
        catch (Exception e)
        {
                Log.e("PlayerException", "SetData");
        }
    }

    public void onStart()
    {
        super.onStart();

        Thread t = new Thread()
        {
                public void run()
                {
                        HttpUriRequest request = null;
                        HttpResponse resp = null;
                        InputStream is = null;

                        DefaultHttpClient client = new DefaultHttpClient();

                        try{
                                //Build the request
                                request = new 
HttpGet("http://www.wanderingoak.net/
stations.xml");
                                //Execute it using the default HTTP Client 
settings;
                                resp = client.execute(request);
                                //Pull out the entity
                                HttpEntity entity= resp.getEntity();
                                //Snag the response stream from the entity
                                is = entity.getContent();
                                //Initalize a new XML  parser
                                reader.parse(new InputSource(is));


                                Runnable r = new Runnable()
                                {
                                        public void run()
                                        {
                                                TextView t = (TextView) 
findViewById
(R.id.loadingStatus);
                                                t.setText("Stations Loaded");

                                                try{
                                                        for(int i=0; i < 
stationListVector.size(); i++)
                                                                
adapter.addObject(stationListVector.elementAt(i));
                                                }catch (Exception e)
                                                {
                                                        Log.e("Fail", 
"Superfail");
                                                }
                                                getListView().invalidate();
                                        }
                                };

                                
UIThreadUtilities.runOnUIThread(StationPicker.this,r);

                        }
                        catch (Exception e)
                        {
                                Log.e("Stations()", "Exception", e);
                        }
                }
        };
        t.start();

    }
}

--~--~---------~--~----~------------~-------~--~----~

3. Install Android on a LapTop

4. API Demos APK not running.

5. Market spam in comments and email to developers

6. sample source code for beginner

7. Just got notice of my first chargeback, any other devs getting them?