I don't know how to use the path setDataSource(path) of MediaPlayer?

by rylance » Tue, 14 Apr 2009 16:01:22 GMT


Sponsored Links
 Hi

If you have pushed the songs to the root of your sdcard then just use
setDataSourece("/sdcard/mySongName.mp3"), make sure you have set the path to
your image in Eclipse (if you are using Eclipse), make sure you are using
the correct run configuration a simple test would be from shell run adb
shell ls /sdcard (or use ddms file browser) then you can see if you have
successfully "installed" your image file.

The important thing to remember is that mp3's location on your pc is
irrelevant and that the phone plays songs from the "sdcard".





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



Other Threads

1. AndroidManifest.xml reg.

Hi All,

I was playing around with the Hello Android program and got the
following questions regarding the AndroidManifest.xml file:

1. An application can have multiple "Activity"-ies, likewise is it
possible to declare multiple applications in a single manifest file?
If yes how to shift focus between the declared applications?

2. Modified the HelloAndroid manifest file as shown below:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.android.hello"
      android:versionCode="1"
      android:versionName="1.0.0">

    <application android:icon="@drawable/icon2"
android:label="MyTestApp">
    </application>
</manifest>

MyTestApp.java is located in the src/com/android/hello directory.

package com.android.hello;

class MyTestApp
{
        public static void main(String args[])
        {
                System.out.println("MyTestApp:main() called");
        }
}

The project built fine but generated the following messages which I
could not understand:

[2008-12-30 13:16:38 - HelloAndroid] The Manifest defines no activity!
[2008-12-30 13:16:38 - HelloAndroid] The launch will only sync the
application package on the device!
[2008-12-30 13:16:38 - HelloAndroid] Only Syncing Application Package

Questions:
a. Is it possible to have an application without any associated
activity? Can such an application have intents (and intent filters) to
process?

b. Please explain what the message "The launch will only sync the
application package on the device!" mean.

Thanks in advance. And thanks for patiently reading this far...
--~--~---------~--~----~------------~-------~--~----~

2. aTrackDog (App Version Tracker) Public Beta

Hello,

aTrackDog tracks all Android apps version even out of the Market. It
helps you manage installed apps version and keep them up-to-date
without any extra effort.

You could download the updated version from Market in few taps. Or you
could use aTrackDog to track app versions outside of the market (such
as EA games) as well.

Download link
http://atrackdog.a0soft.com/aTrackDog-v1-00-20081218.apk


PS: We'll put aTrackDog on market soon, when the manual is done....


--
gasolin
--~--~---------~--~----~------------~-------~--~----~

3. Screen Goes Black Between Activities, and Next Activity never shows up.

4. Modifying menu options by device manufacturers

5. Tab host

6. How to implement the Billboard in Android' opengl es

7. Show outlines of all stars in ratingBarStyleIndicator?